Skip to content

Instantly share code, notes, and snippets.

@joemcgill
Created Jul 24, 2014
Embed
What would you like to do?
Wordpress Dev Uploads Directory Trick
# Attempt to load files from production if they're not in our local version
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
# Replace http://productionsite.com with your production site's domain name
RewriteRule (.*) http://productionsite.com/wp-content/uploads/$1
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment