Close Menu
wpexpelorwpexpelor
  • WordPress Beginner tips
  • WordPress Security
  • about us
  • contact us
Facebook X (Twitter) Instagram Pinterest
Facebook X (Twitter) Instagram Pinterest
wpexpelorwpexpelor
  • WordPress Beginner tips
  • WordPress Security
  • about us
  • contact us
wpexpelorwpexpelor
Home»WordPress Beginner tips»under construction page wordpress without plugin
WordPress Beginner tips

under construction page wordpress without plugin

NinaBy NinaNovember 26, 2023Updated:December 3, 2023No Comments3 Mins Read
under construction page wordpress without plugin
under construction page wordpress without plugin
Share
Facebook Twitter LinkedIn Pinterest Email
5/5 - (1 vote)

Many years ago, when I wasn’t so professional in wordpress web design, I didn’t care about under construction page! But then I realized it is important to keep details secret in wordpress website design until everything is done. The under construction page does the job! So now I want to teach you how to have an under construction page wordpress without plugin. Of course, many plugins can help you to build an under-construction page. But why install another plugin? God! Here I am to save you! Stat with wpexpelor!

Under construction page wordpress without plugin: step by step

There are only 2 reasons for this! If you are going to learn how to create a under construction page wordpress without plugin in just these two cases:

  1. First, you are developing a new website, and the site is really under construction! Probably, it’s better to launch the website when it is completely developed.
  2. Second: The site has already launched before but now it is the time to do some refactors. (you are going to enhance UI, etc.)

Any way! It doesn’t really feel good for your users to see a half-build website full of errors! Don’t make my mistake! It is important to keep the procedure hidden until it’s done.

To build a under construction page wordpress without plugin follow the steps:

under construction page wordpress without plugin
under construction page wordpress without plugin

1.First you need to create an HTML page for the “coming soon” page on your website. You don’t need to code it at all! There are thousands of free html templates for the coming soon page, as well as some premium templates. Here, I offer this code for building the page. Create a file, name it: “maintenance.html,” and put this code in the file:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>COMING SOON</title>
</head>
<body>
    <div style="text-align: center; padding: 50px;">
        <h1>COMING SOON</h1>
        <p>Website is under construction, we will launch it very soon.</p>
    </div>
</body>
</html>
  1. After you create the “maintenance.html,” it is time to put it in your host. Upload the file here:
    wp-content/themes/YourTheme

Note: “YourTheme” can change depending on your wordpress theme name.

Edit function file
Edit function file
  1. At last you have to edit “functions.php” to put this code on it:
// Set under construction page as the temporary homepage
function under_construction_homepage() {
    if (!is_user_logged_in() && !is_admin() && !is_page()) {
        include(get_stylesheet_directory() . '/maintenance.html');
        exit();
    }
}
add_action('template_redirect', 'under_construction_homepage');

Note: Before changing, make a backup from your website, and it’s better to implement the changes on the child theme. By doing so, after the theme update (from the creator), your changes won’t be discarded!

One may ask why the code I offered works. 

By that code, we want to say if a user has the role “Administrator,” show the website details as usual; otherwise, show the “coming soon” page. Here is the result:

wpexpelor coming soon page

wpexpelor coming soon page

Conclusion

I recommend using the “coming soon” page until every single task in your website design project is done! It is professional and easy to build an under construction page wordpress without plugin. Note that you should omit the code in “functions.php” when you want to launch the website. Feel free to ask any questions below. 

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit VKontakte Telegram WhatsApp
Previous Article WordPress failed to import media solutions!
Next Article How to Disable WordPress Plugins Without Admin Access?

Related Posts

woocommerce user registration form without email

June 9, 2024

Edit Author Slug in WordPress

January 30, 2024

install 2 wordpress on same domain

January 23, 2024

Leave A Reply Cancel Reply

Trending
WordPress Database

WordPress Show Data From Database

By NinaDecember 12, 20230

WordPress show data from database is a keyword most of you search on the web…

SEO Services in texas

May 30, 2025

woocommerce user registration form without email

June 9, 2024

Edit Author Slug in WordPress

January 30, 2024

install 2 wordpress on same domain

January 23, 2024
Social
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
Facebook X (Twitter) Instagram Pinterest
©2025 WPexpelor. All Rights Reserved.

Type above and press Enter to search. Press Esc to cancel.