Skip to content

Instantly share code, notes, and snippets.

@jltafarel
Last active August 18, 2016 20:00
Show Gist options
  • Save jltafarel/c546cf76818b223cde9cb3eab0bfd9fa to your computer and use it in GitHub Desktop.
Save jltafarel/c546cf76818b223cde9cb3eab0bfd9fa to your computer and use it in GitHub Desktop.
Wordpress Git Configuration
# Keep these files out of the repo
/wp-content/themes/twenty*
/wp-content/upgrade
/wp-content/uploads
/sitemap.*
/wp-config.php
*.sql
# Hidden files
*.DS_Store
*Thumbs.db
*.sass-cache*
*~imageoptim*
<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>
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
   Header set Access-Control-Allow-Origin "*"
 </FilesMatch>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment