Skip to content

Instantly share code, notes, and snippets.

@bmodena
Last active October 8, 2022 12:45
Show Gist options
  • Save bmodena/5817812e841000df9c41071904522315 to your computer and use it in GitHub Desktop.
Save bmodena/5817812e841000df9c41071904522315 to your computer and use it in GitHub Desktop.
Production images on Local development environment in Wordpress
# ReWrite image URLS to pull from production enviroment
# 1 - add this to your .htacess file
# 2 - swap [YOUR-DOMAIN] withy our production domain name
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$
RewriteRule ^(.*)$ https://[YOUR-DOMAIN].com/$1 [QSA,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment