Set up coming soon or maintenance page

Sometimes you want to show a coming soon or maintenance page on your production server and still want to develop and review your website on same server. Or, You may want to show your developments to your client on production server but do not want any other user to see your website until you set it LIVE.

Replace default WordPress generated .htaccess code with the following snippet.
(Note: If you do not know how to create it please check out How to create htaccess file.

Snippet


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} !(test)
RewriteRule ^$ /coming_soon.html [L]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

</IfModule>

# END WordPress

Result

coming_soon.html page will be displayed when you will visit your website http://www.abc.com. If you want to get in, of course you want, You can browse http://www.abc.com/?test to see your website

One Response to Set up coming soon or maintenance page

  1. Oliver says:

    Great. Exactly what I´ve been looking for.
    As I understand, it seems to be possible to set some kind of landing page, too, in this way.

    I´ll give it a try.

    Thanks a lot

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>