Table of contents
Get the industry’s fastest hosting for WordPress◦ 99.999% uptime
◦ Comprehensive security
◦ Support

WordPress GuideManagement → Hide Site While Editing

How to hide a WordPress site while editing

hiding wp site while editing

At some point in the life of a WordPress site, its owner will want to make changes significant enough to justify blocking access to the site. Hiding a WordPress site is the process of making your website temporarily inaccessible to visitors while you perform updates or development work.

It’s not a good idea to leave a site online when major changes are being implemented. A site with rough edges looks unprofessional and visitors won’t know that it’s because you’re renovating — they’ll think that’s just how your site looks. Also, when changes are being implemented, the site is in an unpredictable state — if you’re changing code while users are attempting to execute it, the results will not be pretty.

That said, taking a site offline should be the last resort. It inconveniences users and can result in lost revenue. In many cases, manually entering a maintenance mode isn’t necessary. Let’s look at various methods you can use to hide a WordPress site, including using built-in tools, using plugins, advanced techniques for experienced users, and even hiding specific posts or pages.

Get fast, reliable WordPress hosting

Power your site with the industry’s most optimized WordPress hosting

Quick overview: Which method should you use?

MethodBest forTechnical level requiredTime to implement
Built-in WordPress toolsBeginners or non-technical usersLow10-15 minutes
PluginsUsers looking for quick, customizable solutionsLow to medium15-30 minutes
Advanced methods (e.g., .htaccess, server config)Experienced users or developersHigh30 minutes – 1 hour
Hiding individual posts/pagesRestricting access to specific contentLow to medium10-20 minutes

Method 1: Relying on WordPress’ built-in privacy settings


When you update a plugin or theme, WordPress enters a built-in maintenance mode. It will present a brief message to inform users that the site is unavailable. You don’t have to do anything; it’s automatic. Usually updates happen so quickly that your site will only be in maintenance mode for a few seconds. If you have a very busy site, that’s a significant amount of time, but, for the most part, it’s the best way to avoid showing users inconsistent state.

As an aside, if you do an update and something goes wrong, it’s possible that your site will get “stuck” in maintenance mode. To unstick it, delete the “.maintenance” file from the root directory of your site.

Method 2: Using maintenance mode plugins

Maintenance mode plugins are WordPress tools that display a temporary page to visitors while allowing administrators to perform WordPress site management behind the scenes.
If you’re absolutely determined to hide your WordPress site using maintenance mode, there are plugins that will help you.

WP Maintenance and LightStart let you design an attractive maintenance mode page with a custom message. Here’s what the settings look like in the free version of WP Maintenance:

wp-maintenance-settings
WP Maintenance settings
wp-maintenance-frontend
WP Maintenance frontend screen

Method 3: Alternative methods for advanced users

Create an .htpasswd file with your desired username and encrypted password, then add this code to your .htaccess file in your WordPress root directory:

AuthType Basic
AuthName "Restricted Access"
AuthUserFile /path/to/.htpasswd
Require valid-user
User-agent: *
Disallow: /

Method 4: Hiding individual pages and posts

changing-visibility-settings-wordpress-post-page
Changing visibility settings for a WordPress post or page

Best practices and common mistakes

Additional resources

WordPress management tips and trends →

A crash course on hosting, plugins and themes, running multiple sites, and more

How to build a WordPress site →

A complete beginner’s guide to getting your WordPress site up (or revamped)

How to install WordPress on localhost →

5 steps to setting up local WordPress development