One common issue with local development is how to handle uploaded files.
You could copy the entire wp-content/uploads/
directory but that can use up disk space for little benefit.i
Another option is to rewrite all HTTP requests for images to the live site.
Here’s how to do it:
Nginx
Add this line in the location / {
block:
rewrite ^/wp-content/uploads/(.*)$ https://{live site domain}/wp-content/uploads/$1;
Apache
Add this line to the .htaccess
file:
RewriteRule ^wp-content/uploads/(.*)$ http://{live site domain}/wp-content/uploads/$1 [NC,L]