-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
This isn't obvious to everyone. So here's a tip!
If you'd like to mock the uploads of the production environment of the site you are working on. Then just (so you don't have to use a local copy of the production uploads):
- Create
~/data/{CONTAINER}/wp-content/uploads/.htaccesscontaining (before wp directive):
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) http://{PRODUCTION_URI}/wp-content/uploads/$1
</IfModule>
All uploads with local file paths will now be served from the production site.
If you by any reason have a different structure for the uploads folder, just change it in the rule
Enjoy!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels