I am building up a website for C Programming Tutorial www.programminginc.net . Now I am using a plugin to show my site under construction. What is the code used to create a website under construction setup?
The quick and dirty way to do it is to create a file named
.maintenance at the root of the site-- same directory as
license.txt-- and add a bit of PHP:
Of course, you can create whatever markup and messages you'd like before the
die();, but there is very little WordPress available since it fires very early in the
If you want to see how to add and remove the file automatically, look at how the core does it.
Here are two options:
Create a static HTML "Coming Soon" page and redirect outside requests to your domain to that page. This will let you continue to work on your site (hopefully you're developing locally and pushing changes to your live site) without your visitors loading up the WordPress side.
Create a basic WordPress theme with your "Coming Soon" page as
index.phpand set the theme as default. You can use a plugin like Theme Test Drive to test out the one you're developing while your visitors see the "Coming Soon" theme.