Skip to content

Instantly share code, notes, and snippets.

@bjorn2404
Created March 28, 2016 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save bjorn2404/9a2a4a7df4fb48664196 to your computer and use it in GitHub Desktop.
Save bjorn2404/9a2a4a7df4fb48664196 to your computer and use it in GitHub Desktop.
WordPress load remote images if they don't exist on the local development server NGINX. vagrant provision after editing site conf file.
location ~ ^/wp-content/uploads/(.*) {
if (!-f $request_filename) {
rewrite ^/wp-content/uploads/(.*)$ http://www.remotesite.com/wp-content/uploads/$1 redirect;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment