How to display a static HTML page while setting up a WordPress site?

Either use a plugin (like wp-maintenance-mode) or hardcode your .htaccess file to redirect to the splash page, and allow your own (or your team) IP address to ignore the redirect. Like this:

<IfModule mod_rewrite.c>

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1
RewriteCond %{REQUEST_URI} !/splashpage.html$ [NC]
RewriteRule .* /maintenance.html [R=302,L]

</IfModule>

Regarding your doubt why index.html gets served from root, it is because it usually takes precedence over index.php. If you wanted to change that, you would have to change the DirectoryIndex.

EDIT: I thought it was obvious, but, for the sake of clarity: 127.0.0.1 should be changed to your public IP address. Also note that 302 is Temporary Redirect, which is what we want.

Leave a Comment