Skip to content

Instantly share code, notes, and snippets.

@samsargent
Created July 10, 2016 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samsargent/321b1fa366cf7c77be43f3bfca8af97e to your computer and use it in GitHub Desktop.
Save samsargent/321b1fa366cf7c77be43f3bfca8af97e to your computer and use it in GitHub Desktop.
Tar GZ - Exclude directory - good for copying down a live WP install and ignoring uploads
tar -czvf filename.tar.gz /full/path/to/directory --exclude "/full/path/to/directory/to/exclude/wp-content/uploads"
Use this on local /wp-content/uploads:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) http://domain.com/wp-content/uploads/$1
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment