Last active
November 17, 2023 09:27
-
-
Save mckernanin/f75f8bcd74af84730723 to your computer and use it in GitHub Desktop.
Example nginx config to get WordPress uploads from remote if they don't exist locally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# save space, and grab uploads from the live site | |
location /wp-content/uploads/ { | |
if (!-e $request_filename){ | |
rewrite ^/wp-content/uploads/(.*) http://yourlivesite.com/wp-content/uploads/$1 redirect; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment