If you’re reading this article, there’s a good chance that you’re a Plesk user, a WordPress user, and you’ve found one or more of your sites suddenly stuck in “maintenance mode” with a message similar to the one below:
“The website is undergoing scheduled maintenance.”
How do I fix it?
We’ll explain more about what this might be and why it happened, but for those experiencing the issue here is the Quick Fix:
Delete the .maintenance file sitting in your WordPress root folder.
(The file will usually be located in the same place as your wp-config.php file).
Where can I find that file?
To do locate and delete these files, you have a few different options depending on which OS you are running, how many WordPress installations are affected, and your personal preferences:
- Through the Plesk WordPress Toolkit Interface
- Log into Plesk
- Click on WordPress under Server Management
- For each installation that you need to remove from maintenance mode, click the green toggle button to turn Maintenance mode off. When turned off, it should look like this:
Note: If your WordPress installation does not show up in the list of instances, click the Scan button at the top of the list to scan your server for new WordPress installations.
- Manually, for a small number of WordPress sites:
- Log into Plesk
- Click Domains
- Click on the domain name experiencing the issue
- Click on the File Manager
- Select the checkbox beside the file named .maintenance and click the Remove button (notice that the file begins with a period)
Note: You can also achieve this same result via FTP if you prefer
- In bulk, using tools or scripts
- Windows - File Explorer
- Open Windows File Explorer
- Navigate to C:\inetpub\vhosts\
- Use the Search feature to locate files matching “wp-content\.maintenance” (with or without the quotes)
- Windows - File Explorer
- Windows - PowerShell
Get-ChildItem -Path C:\Inetpub\vhosts -Directory -Filter "wp-content" -Recurse |
% {Get-ChildItem -Path $_.FullName -File -Depth 0 -Filter ".maintenance"} |
Remove-Item -Force
Note: To test the above script without deleting files, change the -Force option at the end to -WhatIf. This will generate a list of actions that would normally have been deleted, instead of actually deleting the files.
What if: Performing the operation "Remove File" on target "C:\Inetpub\vhosts\example.com\wp-content\.maintenance".
What if: Performing the operation "Remove File" on target "C:\Inetpub\vhosts\example.com\blog\wp-content\.maintenance".
- Linux - find
find . -type f -name ‘.maintenance’ -path '*/wp-content/*' -delete
Note: To test the above script without deleting files, replace the -delete option above with -print. This will print a list of files to be deleted without actually deleting them.
Why did this happen?
A bug was introduced into the Plesk WordPress Toolkit Extension in version 3.6.0-1601 (Available as of 2019-02-21) that caused this issue when performing updates on WordPress, as it will do automatically. Plesk identified this issue on 2019-02-27 and quickly provided a patch in version 3.6.1-1603, along with several explanations of how to verify which version of the extension you have, which WordPress sites Plesk knows to be in maintenance mode.
How do I prevent it from happening again?
Fortunately, this is the easiest part of this article. All you have to do in order to prevent this from happening again (at least because of this specific issue) is to update the WordPress Toolkit Extension in Plesk. Most of the time automatic updates are enabled in Plesk, so this should already be done for you. If you or your administrators have disabled the automatic updates however, here is how you can perform the update manually:
- Click on Extensions under Server Management
- Click on the Updates tab
- If you server has Auto-Update enabled, then you are likely already patched and up-to-date. If so, you should see a message like this one, acknowledging that all updates have been applied
If not, you will be presented with a list of extensions that have updates waiting to be applied. Clicking the Update button would them update all extensions including WordPress Toolkit, if necessary.
Additional Verification
If you would like to confirm when your server updated the WordPress Toolkit extension, you can check the Plesk Action Log for exact dates and times of these updates:
- Click on Tools & Settings under Server Management
- Click on Action Log under the Plesk heading
- Select a log time period beginning 2019-02-21 (when version 3.6.0 became available) and the current date, and click Download
- The log will likely contain much more information than what you need for this purpose, but you can easily search the file in your preferred text editor for the following terms:
- WordPress Toolkit Updates - WordPress Toolkit
127.0.0.1 admin [2019-02-27 00:33:17] 'Upgrade extension' (
'Extension Id': 'wp-toolkit' => 'wp-toolkit',
'Extension Name': 'WordPress Toolkit' => 'WordPress Toolkit',
'Extension Version': '3.6.1' => '3.6.2',
'Extension Release': '1603' => '1609')
Notice that in the above example you can see the extension version both before and after the update (‘3.6.1’ => ‘3.6.2’) - WordPress Installation Updates - Upgrade site application
127.0.0.1 [2019-02-25 00:01:17] 'Upgrade site application' (
'Package name': 'WordPress' => 'WordPress',
'Domain type': 'domain' => 'domain',
'Installation prefix': '/wordpress' => '/wordpress',
'Domain Name': 'wordpress.cozaq.com' => 'wordpress.cozaq.com',
'Domain GUID': 'A1234B5C-6789-1A2B-C34D-56A1234BCD12' => 'A1234B5C-6789-1A2B-C34D-56A1234BCD12',
'Client GUID': 'A1234B5C-6789-1A2B-C34D-56A1234BCD12' => 'A1234B5C-6789-1A2B-C34D-56A1234BCD12')
As always, if you need additional assistance with this, or any issue with your server or managed services, you can contact a member of our support team through your dedicated support channel (for existing customers), or by creating a support ticket through the Submit a request link above.