How Does WordPress Rewrite Media Files URLs
-
I am using a plugin which moves uploaded files to a remote location and reroutes any requests to those files because in the postmeta table, the meta_value for _wp_attached_file is still the local file location. Even though it’s safer to do it that way, I really don’t like the whole filter-at-load-time business because when the plugin is running, the home page is taking 20s to load.
Even though I have manually rewritten the values to replace them with the S3 bucket full URLs ( hxxps://s3.amazonaws.com/url/to/image.ext ), in the media library and on the front-end WordPress still tries to find them on the local server ( hxxps://1ocalhost/url/to/image.ext ).
WordPress seems to be replacing everything before ‘wp-content’ with ‘hxxp://localhost/’. How do I change this behaviour?
- The topic ‘How Does WordPress Rewrite Media Files URLs’ is closed to new replies.