Skip to content

Instantly share code, notes, and snippets.

@ClementParis016
Last active November 29, 2018 14:45
Show Gist options
  • Save ClementParis016/9ede52a06af18d679157097586daa6db to your computer and use it in GitHub Desktop.
Save ClementParis016/9ede52a06af18d679157097586daa6db to your computer and use it in GitHub Desktop.
Load missing local WordPress uploads from the production server
# From https://stevegrunwell.github.io/wordpress-git/#/13
<IfModule mod_rewrite.c>
RewriteEngine on
# Attempt to load files from production if
# they're not in our local version
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule wp-content/uploads/(.*) \
http://{PROD}/wp-content/uploads/$1 [NC,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment