Sublime SFTP ignore_regexes

Sublime SFTP Ignore_regexes for working with WordPress and Binary files

This is a ignore_regexes filter for Sublime SFTP that can be used to work with WordPress websites and projects in general.

It will not download images, videos, pdfs, .exe and other binaries, as well as ignoring wp-admin, wp-includes and wp-content/uploads.


"ignore_regexes": [
 "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
 "sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
 "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini",


Add this code to your local development .htaccess, and it will try to load images from production website:

# Load media files from production server if they don't exist locally
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{HTTP_HOST} ^localsite\.dev$
  RewriteRule ^wp-content/uploads/(.*)$$1 [NC,L]