Skip to content

Instantly share code, notes, and snippets.

@bhowe
Created December 24, 2020 15:43
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 bhowe/f0129261e1ec9e68c6d127904c15bd6d to your computer and use it in GitHub Desktop.
Save bhowe/f0129261e1ec9e68c6d127904c15bd6d to your computer and use it in GitHub Desktop.
Take you WordPress site down for maintenance
Add this to your HTACCESS make sure the down.php exists.
RewriteEngine On
RewriteBase /
#add exception for your IP address
RewriteCond %{REMOTE_ADDR} !111\.111\.111\.111$
RewriteCond %{REQUEST_URI} !^/down\.php$ RewriteRule ^(.*)$ /site-offine.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment