Introduction
Running a WordPress website means there will be times when you need to perform maintenance tasks. This can be when you’re updating plugins, making design changes, or performing major overhauls. By enabling maintenance mode can ensure your visitors have a smooth experience even when your site isn’t fully operational. In this guide, we’ll explore how to enable or remove your site from maintenance mode in WordPress. Sometimes WordPress can get stuck in maintenance mode when an update has failed halfway through which is why we are writing this article.
What is Maintenance Mode?
Maintenance mode is a temporary state you can enable on your website to inform visitors that your site is undergoing updates or maintenance. Instead of seeing broken pages or experiencing functionality issues, visitors will see a specific maintenance page.
Benefits
- Prevents Broken User Experience: This keeps visitors from seeing a partially functioning site.
- Professional Appearance: This shows that you’re maintaining the site responsibly.
- Security: Protects your site from errors or vulnerabilities during updates.
When Maintenance Mode Should Be Used
Website Updates
Regular updates to WordPress core, themes, and plugins are essential for security and functionality.
Plugin and Theme Changes
Installing or modifying plugins and themes can cause temporary disruptions.
Major Overhauls
It’s best to enable maintenance mode when redesigning your site or making significant structural changes.
Enabling WordPress Maintenance Mode
By default, when WordPress enters maintenance mode, visitors see the following message:
Briefly unavailable for scheduled maintenance. Check back in a minute.
This typically happens during WordPress updates. However, you may need to enable maintenance mode manually during development or testing. Follow the steps below to do this:
Manually Enabling Maintenance Mode
-
Access Your Server/Hosting: Log in to your hosting account via cPanel or your provider’s Control panel.
-
Navigate to Your WordPress Directory: Use the File Manager to locate your WordPress installation. WordPress is usually found in the
public_html
directory but may be inside a subdirectory if you have a subdomain e.g. conor.conorbradley.co.uk. -
Create the Maintenance File: If you are using cPanel select the file button located in the top-left corner then create a new file named
.maintenance
.-
Ensure the filename starts with a period (.) for it to function properly.
-
-
Add the Maintenance Mode Code: Right-click the file created and select edit to open up the file. Copy and paste the following code into the
.maintenance
file: -
Save the File: Save the changes in the top-right corner to activate maintenance mode.
Disabling Maintenance Mode
To disable maintenance mode on WordPress after you have finished your changes or an update has left it in this mode. Simply delete the .maintenance
file by right-clicking on the file and then selecting delete.