- Canada's Leading Web Hosting and Domain Name Provider

How To Use WordPress Maintenance Mode

Maintenance mode is a feature in WordPress that allows you to put your site into a temporary holding state. This is useful when you need to make changes to your site, but don’t want those changes to be visible to the public until they’re finished.  

The Benefits of Maintenance Mode

There are a few benefits to using maintenance mode: 

  • It allows you to make changes to your site without the public seeing those changes until they’re ready. 
  • It can help reduce the amount of traffic to your site while you’re making changes, which can minimize the impact on your server. 
  • It can also be used as a “coming soon” page for new sites that aren’t quite ready for launch yet. 

When to use Maintenance Mode

Maintenance mode is most useful when you need to make changes to your site that could take some time, or could potentially break the site. For example, if you’re upgrading to a new version of WordPress, you might want to put your site into maintenance mode so that visitors don’t see any errors while the upgrade is taking place. 

How to use Maintenance Mode

There are two ways to enable maintenance mode: through the WordPress admin panel, or by editing your site’s .htaccess file. 

If you want to enable maintenance mode through the WordPress admin panel, simply go to the “Settings” tab and click on the “Maintenance Mode” option. From here, you can enable or disable maintenance mode, and also specify a message that will be displayed to visitors while the site is in maintenance mode. 

If you want to edit your site’s .htaccess file, you’ll need to add the following line of code: 

RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$

RewriteRule .* – […]/maintenance.php?key=UNIQUEKEYHERE

Replace UNIQUEKEYHERE with a unique key that you create. This key is used to prevent anyone from accessing your site while it’s in maintenance mode. 

Another way to put your WordPress site into maintenance mode is by adding a few lines of code to your theme’s functions.php file. Simply add the following code: 

function wp_maintenance_mode(){

if(!current_user_can(‘edit_themes’) || !is_user_logged_in()){

wp_die(‘<h1>Under Maintenance</h1

If you have any questions about using maintenance mode, or if you need help putting your site into maintenance mode, please contact us. We’ll be happy to assist you!

CanSpace Team

CanSpace Solutions is Canada's leading domain name registrar and web hosting provider. Keep an eye on our blog for expert information on domain names, websites, and running a business online.