Diego Betto

Use remote images and media on local development env

How many times you needed to copy remote website to test some changes?
And every time you needed to download wp-content/uploads to view images and media, right?
With this three lines you can “use” remote files in your local dev environment.
Just add to your local .htaccess (change paths and hosts, of course)

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$
RewriteRule ^(.*)$ https://your-remote-website.com/$1 [QSA,L]
Exit mobile version