Maintenance Mode
WordPress® maintenance mode is useful for times when you are making an update to your site that affects the database and you want to avoid data loss from user actions.1 Examples of this would be updating WordPress core files, plugins, or the active theme for a website. We’ll go over some of the ways that you can toggle maintenance mode and customize the page that shows.
Toggle Maintenance Mode in the User Portal
To toggle WordPress maintenance mode in the WP Engine User Portal, navigate to the Overview page for an environment and select Utilities from the secondary lefthand menu.
Use the toggle button to the right of the Maintenance mode section to turn it on and off.
Limitations
There are some limitations to be aware of for the new maintenance mode toggle feature in the WP Engine User Portal.
- This feature will not work to toggle a maintenance mode page created using a maintenance mode plugin.
- If you are using a maintenance mode plugin, you will need to toggle the setting from within your plugin to use the plugin’s custom maintenance mode page.
- This feature will override a custom maintenance mode page created with a plugin.
- If you are using a maintenance mode plugin, toggling this feature on in the User Portal will override the functionality of the plugin and show the default maintenance.php page.
Toggle Maintenance Mode with WP-CLI
To toggle WordPress maintenance mode with wp-cli you can connect to your WP Engine server with SSH Gateway and run the following wp-cli commands:
Enable:
wp maintenance-mode activate
Disable:
wp maintenance-mode deactivate
Customize the Maintenance Mode Page with Custom Code
To customize the maintenance page with custom code, you can add a PHP file named maintenance.php
inside of the wp-content
folder of your website. You can style the page any way you like and the custom page will be displayed instead of the default page, whenever WordPress is in maintenance mode.
Customize the Maintenance Mode Page with a Plugin
There are many plugins that can help you to create a stylized maintenance mode page without custom code. A few examples of maintenance mode plugins are:
LightStart – Maintenance Mode, Coming Soon and Landing Page Builder
CMP – Coming Soon & Maintenance Plugin by NiteoThemes
Troubleshooting
Occasionally a WordPress website will get stuck in maintenance mode after the relevant action is completed.
If you experience this you can try one of the methods listed above to enable and disable maintenance mode again to attempt to resolve the issue.
If the site still remains in maintenance mode you can look for the temporary file named .maintenance
in the root directory of your website. This file should be automatically deleted when maintenance mode is disabled. If you see it there and you think the maintenance tasks have completed, you can delete the file and then check the site again to see if maintenance mode is disabled.
If maintenance mode is still enabled after that or if you need assistance with any of the steps above, contact our support team.