WordPress Development: Coming Soon Page

Are you developing a new website using WordPress? Often we don't want potential customers or readers to see the website-in-progress, yet we want specific people to see the development progress, how can we achieve this without too much hassle on WordPress? There are some plugins that do just that, from putting up a coming soon page, and requiring password to access the developing website. However after building numerous sites, installing plugins can become a real chore rather than joy.

 

Creating http://draft.newaddress.com

Then there's the way of creating a subdomain on the same server to develop the website. For instance building a draft site on http://draft.newaddress.com while a simple coming soon page is live on http://newaddress.com. This works well too, provided you have access to the DNS of the domain name, and some knowledge of configuring Nginx/Apache blocks. Beewebby worked with this for sometime as we thought this is the best way to separate live and staging changes. However things got tricky once we introduce SSL certificates and Woocommerce testing, as entry level SSL certificates doesn't cover subdomain besides the usual www, making testing transactions on staging site difficult.

 

Creating WordPress Page Template

Recently at Beewebby we discovered a shortcut of separating live and development sites (without creating subdomain, and making transaction testing possible). I'm sure this is not a new idea, and is probably documented on developer websites elsewhere, but just want to share it here as I thought this will save new WordPress developers some trouble when creating new sites. All we need is FTP access to the server, a code editor, and 3 minutes.

FTP into your WordPress installation, open the theme folder you are using in the wp-content/themes folder. Create a new file here and name it coming-soon.php. Using this file, create a page template using php comments with Template Name:

<?php /* Template Name: Coming Soon Page */ ?>

Then below this line, just add whatever static coming soon HTML you have and after saving, voila, you've created a page template ready to be used! All you have to do now is create a new page inside WordPress Admin, and select the Coming Soon Page Template. Then on Settings -> read, choose the new page you created as homepage. Now the static page will be served on http://newaddress.com. While, reviewers can still access the rest of the website by accessing http://newaddress.com/home.

Not too much trouble, eh?

Happy coding!

Code is Poetry - WordPress