Pay yearly and get 2 months free on all web hosting plans

Office Time: 10 AM to 6 PM. (Local Support Staff)

How to Fix WordPress Maintenance Mode Stuck Quickly

Step‑by‑step guide to remove a stuck WordPress maintenance mode and restore your site.

If your site is showing the “Briefly unavailable for scheduled maintenance. Check back in a minute.” message and it never disappears, you are dealing with a wordpress maintenance mode stuck situation. The quickest fix is to delete the .maintenance file from your WordPress root, then clear any cache that might be serving the old page.

What Is WordPress Maintenance Mode and Why It Gets Stuck

When WordPress runs an update—whether it is the core, a theme, or a plugin—it creates a temporary file named .maintenance in the root directory. This file tells the front‑end to display a simple maintenance screen while the update scripts finish. Under normal circumstances the file is removed automatically as soon as the update completes.

The process can fail for several reasons: a PHP timeout, a server‑side error, a network interruption, or a plugin that aborts the update. When the file is not removed, visitors (and you) keep seeing the maintenance message, even though the update may have finished successfully. This is what we call “wordpress maintenance mode stuck”.

Common Causes of a Stuck Maintenance Mode

  • PHP execution time limit. Shared hosting often limits scripts to 30 or 60 seconds. Large updates can exceed this limit, leaving the .maintenance file behind.
  • Insufficient disk space. If the server runs out of space during an update, WordPress cannot write the final cleanup steps.
  • Faulty plugin or theme. Some plugins create their own maintenance flag or interfere with the core cleanup routine.
  • Interrupted connection. Closing the browser, losing Wi‑Fi, or a server reboot while the update is in progress can stop the script mid‑way.
  • Cache serving stale pages. Even after the .maintenance file is removed, a full‑page cache (LiteSpeed cache, Cloudflare, or a caching plugin) may still deliver the old maintenance page.

Fix 1: Delete the .maintenance File Manually

This is the most direct method and works on any hosting environment, including DirectAdmin with LiteSpeed. Always take a quick backup of your site files before you start.

  1. Connect via FTP or the File Manager. Use an FTP client such as FileZilla, or the DirectAdmin File Manager. The login credentials are the same you use for support requests.
  2. Navigate to the WordPress root. This is the folder that contains wp-config.php, wp-content, and wp-admin.
  3. Locate the .maintenance file. It is a hidden file (starts with a dot). In FileZilla enable “Show hidden files” from the Server → Force showing hidden files menu.
  4. Delete the file. Right‑click and choose Delete, or run the following command if you have SSH access:
cd /home/username/public_html
rm -f .maintenance

After removal, refresh your site. If the maintenance screen disappears, the problem was the lingering .maintenance file.

Fix 2: Disable Maintenance Plugins via FTP

If deleting the file does not bring the site back, a plugin may be forcing maintenance mode. The safest way to test this is to rename the plugin folders through FTP.

  1. Access the wp-content/plugins directory. This folder holds every installed plugin.
  2. Rename the folder of the suspected plugin. Add a suffix like _disabled. For example:
mv wp-content/plugins/maintenance-mode wp-content/plugins/maintenance-mode_disabled

If you do not know which plugin is responsible, rename the entire plugins folder to plugins_disabled. WordPress will automatically deactivate all plugins.

  1. Check the site. Load the homepage. If it appears, the issue was a plugin. Rename the folder back to plugins and then reactivate plugins one by one from the WordPress admin to find the culprit.
  2. Remove the maintenance flag set by the plugin. Some plugins create their own file (e.g., maintenance.php) or set a transient in the database. After deactivating, you can safely delete any such files.

When you have identified the problematic plugin, consider replacing it with an alternative, or contact the plugin developer for an update.

Fix 3: Clear Cache and Restart Updates

Even after the .maintenance file is gone, a cached version of the maintenance page may still be served. Follow these steps to clear cache on a typical LiteSpeed + WordPress setup.

Clear LiteSpeed Cache (if installed)

  1. Log in to the WordPress admin dashboard.
  2. Navigate to Litespeed Cache → Toolbox.
  3. Click Purge All. This removes page, CSS, JS, and object caches.

Clear Plugin Cache (e.g., WP Super Cache, W3 Total Cache)

  1. Open the plugin’s settings page.
  2. Find the “Delete Cache” or “Purge All” button and click it.
  3. If the plugin offers a CLI command, you can run it via SSH. Example for WP‑CLI:
wp cache flush

Clear Server‑Side Cache (LiteSpeed or Nginx)

If your host uses server‑level caching, you may need to restart the service. On a DirectAdmin VPS with LiteSpeed, run:

sudo systemctl restart lsws

On a server using Nginx (rare on our shared plans), you would use:

sudo systemctl reload nginx

Restart the Update Process

Now that the site is back online and the cache is clear, you can safely run the pending update again.

  1. Go to Dashboard → Updates.
  2. If WordPress still shows “Update Available”, click Update Now. The process should complete without leaving a .maintenance file.
  3. After a successful update, verify that the site works and that no error messages appear in wp-admin.

Prevent Future Stuck Maintenance Mode

Taking a few preventive steps will reduce the chance of another wordpress maintenance mode stuck incident.

  • Increase PHP max execution time. In DirectAdmin, edit php.ini or add the following line to .htaccess:
php_value max_execution_time 300

On a VPS you can change the value in /etc/php/8.2/fpm/php.ini and restart PHP‑FPM.

  • Ensure enough disk space. Keep at least 20 % free space on your NVMe SSD. Use the DirectAdmin Disk Usage tool to monitor.
  • Use a staging environment. Test major updates on a copy of the site before applying them to production. Our VPS plans provide isolated environments for this purpose.
  • Schedule updates during low traffic. Nighttime or early morning hours give the server more resources and reduce the chance of timeouts.
  • Keep a reliable backup. Daily snapshots via the control panel let you roll back instantly if an update goes wrong.
  • Limit the number of active caching plugins. Running two full‑page caches can cause conflicts. Choose one and configure it properly.
  • Monitor error logs. In DirectAdmin, go to Logs → Error Log. Look for PHP fatal errors that happen during updates.

By following these practices, you’ll minimise the risk of a stuck maintenance screen and keep your WordPress site running smoothly.

For more detailed tutorials on WordPress performance, see our Blog. If you need a fresh hosting environment that includes LiteSpeed, NVMe SSD, and free SSL, explore our shared hosting options.

Frequently asked questions

Why does WordPress show a maintenance mode screen after an update?

WordPress creates a temporary .maintenance file while it runs core, theme, or plugin updates. If the process is interrupted, the file remains and the site stays in maintenance mode.

Can I prevent maintenance mode from appearing during future updates?

Yes. Keep backups, use a staging site for major updates, and ensure your server has enough resources to finish the update without timing out.

Is it safe to edit the .maintenance file directly?

The file only contains a small PHP snippet that tells WordPress to show the maintenance screen. Deleting it is safe, but never modify its contents unless you know PHP.

How do I know if a plugin is causing the maintenance mode to stick?

If the site stays in maintenance mode after you delete the .maintenance file, a plugin that forces maintenance mode is likely. Disabling plugins via FTP will confirm the culprit.

Does clearing the server cache affect other sites on the same shared hosting account?

Clearing the cache for your own WordPress installation only removes files in its cache directory. It does not impact other domains on the same account.

WordPressmaintenance modeFTPcacheupdates