/*Redirecting Visitors to a Temporary Maintenance Page in WordPress without a Plugin*/
/*.htaccess Method
One method is via .htaccess that allows only single IP to access the site. This is a quick snippet for a single-developer project.*/

# MAINTENANCE-PAGE REDIRECT
<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000
 RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
 RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
 RewriteRule .* /maintenance.html [R=302,L]
</IfModule>

/*
Basically, all you would need to do is change the Remote_Address to your IP address. Then, you would need to create a page called maintenance.html, and style it to however you like. This should be stored in your root directory. The code basically lets you see the entire site, and everyone else gets the maintenance.html page.

If you want to allow multiple IP addresses, then use this technique:
*/

<Limit GET POST PUT>
 order deny,allow
 deny from all
 allow from 123.456.789
 allow from 123.456.789
</LIMIT>
ErrorDocument 403 /custom-message.html
<Files custom-message.html>
 order allow,deny
 allow from all
</Files>

/*Simply add as many IP addresses you want to allow. Everyone else will get the page “custom-message.html”. You can add whatever you like in the custom file.*/

/*
source: http://www.wpbeginner.com/wp-tutorials/redirecting-visitors-to-a-temporary-maintenance-page-in-wordpress-without-a-plugin/
*/