Skip to content

Instantly share code, notes, and snippets.

@benjibee
Last active April 8, 2018 02:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save benjibee/5053426 to your computer and use it in GitHub Desktop.
Save benjibee/5053426 to your computer and use it in GitHub Desktop.
Ignoring and untracking Wordpress contents
# contents of wp-content (but not the folder itself)
wp-content/
# both sitemap.xml and sitemap.gzip
sitemap.*
# local config for local dev!
wp-config.php
# override above exclusion to include the blog theme folder and files
!wp-content/themes/michelbergerblog-2013
!wp-content/plugins/mbh-events-calendar
# system created files
*.DS_Store
*[Tt]humbs.db
*.Trashes
# exclude the .htaccess, too, so we don't have to reset permalinks
.htaccess
# 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
RewriteRule (.*) http://michelbergerhotel.com/blog/wp-content/$1
</IfModule>
# define these manually, overriding the values in the SQL database.
define('WP_HOME','http://localhost/~benji/mbh/michelbergerhotel/blog/');
define('WP_SITEURL','http://localhost/~benji/mbh/michelbergerhotel/blog/');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment