Fixing "Another update is currently in progress" in WordPress
Why WordPress says "Another update is currently in progress", what the core_updater.lock is and how long it lasts, how to clear it safely in phpMyAdmin or WP-CLI and how to stop the update failing again.
If you clicked the update button on Dashboard→ Updates and WordPress came back with this line instead of updating, it thinks an update of WordPress itself is already running:
Another update is currently in progress.
That's the exact wording from WordPress's core updater.1 When a core update starts, WordPress saves a small lock called core_updater.lock in your database so a second update can't start on top of it, and it deletes the lock when it's done. If the update was cut off partway, by a server timeout, PHP running out of memory, a closed browser tab or a server restart, the lock gets left behind.
WordPress stops honouring the lock after 15 minutes,1 so waiting and trying again fixes most cases. If it doesn't, you can delete the lock yourself. The lock doesn't affect visitors, but the update that left it behind may not have finished, so check WordPress is fully updated afterwards.
What the update lock is
When you update WordPress core, the updater calls WP_Upgrader::create_lock(), which adds a row named core_updater.lock to your site's options table (wp_options on a standard install). Its value is the time the update began, as a Unix timestamp: a 10-digit count of seconds such as 1795255337.2
If another core update starts while that row is less than 15 minutes old, WordPress refuses and shows the message.1 Once the lock is older than that, WordPress treats it as abandoned, replaces it with a fresh one and carries on with the update.2
WordPress removes the row with WP_Upgrader::release_lock() at the end of every update, including most failed ones, such as a download that didn't work.1 It's only left behind when PHP is stopped dead partway. That usually means one of these:
- The server's time limit ran out, which is easy to hit on slow hosting (see the maximum execution time error).
- PHP ran out of memory (see the memory exhausted error).
- The tab was closed or the connection dropped. By default, PHP stops a script when the browser disconnects.3
- The server or PHP restarted mid-update.
- A PHP fatal error, for example from a plugin that runs its own code when an update finishes. WordPress also checks for other updates and installs translation updates before it releases the lock, so a crash or timeout at that point can leave the lock behind even after every file was copied.14
Background (automatic) updates use a second lock, auto_updater.lock, which lasts an hour and doesn't show this message.25 Plugin, theme and translation updates you run yourself don't use a lock, so the message only ever comes from updating WordPress itself. This all works the same way in WordPress 7.1 and the upcoming 7.2.
Check an update isn't still running
The lock is there for a good reason. Two core updates copying files over each other at once is a reliable way to break a site, so rule out a real update before you clear anything.
- WordPress installs minor (maintenance and security) releases by itself unless that's been switched off and, on sites installed since WordPress 5.6, major releases too.16 These background updates run through WP-Cron after WordPress's twice-daily update check and hold the same lock,75 so when WordPress 7.2 arrives on 8 December, one could be what's holding it. Refresh Dashboard→ Updates. If Current version has moved on, a background update got there first. You'll usually have a "[Your site name] Your site has updated to WordPress 7.1.5" email too.5
- Another administrator may have clicked update at the same moment.
- WP-CLI, your host's update tool or a site management service may be updating the site. WP-CLI goes through WordPress's own updater, so it takes the same lock.8
Wait 15 minutes, then try again
The 15 minutes count from when the lock was saved, just after the stuck update started.1 Once they're up, take a backup if you can, go back to Dashboard→ Updates and click the update button again. WordPress clears the old lock and starts a fresh update by itself,2 so most of the time you never need to touch the database. The Re-install version button uses the same updater, so it gives the same message while the lock is in place.9
If the message is still there after a full 15 minutes, something is either really updating the site or started a newer update that was cut off too, which resets the clock.
Check the site isn't stuck in maintenance mode too
An interrupted core update can leave a second thing behind. While WordPress copies the new files, it writes a .maintenance file to your WordPress folder, and it deletes the file once the copying is done.10 The two are easy to confuse, and clearing one doesn't clear the other.
| The update lock | The maintenance file | |
|---|---|---|
| What it is | A core_updater.lock row in the database |
A .maintenance file in the folder that holds wp-admin |
| What you see | "Another update is currently in progress." when you try to update | "Briefly unavailable for scheduled maintenance. Check back in a minute." on every page |
| Who it affects | Only someone trying to update WordPress | Everyone, visitors included |
| When WordPress stops honouring it | 15 minutes after it was saved1 | 10 minutes after it was written11 |
| How to clear it | Wait, or delete the row | Wait, or delete the file |
If visitors still see the maintenance message long after 10 minutes, it's usually a cached copy or a maintenance plugin. Our guide to getting WordPress out of maintenance mode covers deleting the file and clearing caches.
Clear the lock in the database
If you've waited, ruled out a real update and still get the message, you can delete the lock yourself. It's the same single row WordPress deletes at the end of every normal update.1
Back up the database first
Export a copy of the database before you change anything in it. In phpMyAdmin, select your WordPress database, open the Export tab, leave Quick selected and click Export (Go in older versions).1213 With WP-CLI, wp db export does the same job.14 Your host's backup tool is fine too, as long as you know how to restore from it.
Find your options table
All of WordPress's tables share a prefix. It's wp_ on a standard install, but many hosts and security plugins change it, so your table might be called something like wpx7k_options rather than wp_options. To check:
- In the dashboard, go to Tools→ Site Health→ Info, open Database and look at Table prefix. Database name is listed there too, which helps if your hosting account has several databases.15 On multisite, check this from the main site's dashboard. Our Site Health guide explains the rest of that screen.
- Or download a copy of
wp-config.phpand look for the$table_prefixandDB_NAMElines.16
On a multisite network, use the main site's options table, which is usually the one without a number in its name (wp_options rather than wp_2_options).17
Delete the row in phpMyAdmin
- Open phpMyAdmin from your hosting control panel and click your WordPress database in the list on the left.
- Click the options table with your prefix.
- Open the Search tab, type
core_updater.lockin the value box for option_name and click Go. - You should get one row, with a 10-digit number in option_value. Click Delete on that row and confirm.
Delete only that row. A leftover auto_updater.lock doesn't cause this message, and WordPress replaces it itself once it's an hour old.25 If the search finds nothing and you're sure you're in the right table, there's no lock, so the message came from an update that has since finished or is still running. If it keeps appearing and there's no row, WordPress may not be able to write to the database, so ask your host.2
Delete it with WP-CLI
If you have SSH access, WP-CLI is quicker:
wp db export ~/before-lock-removal.sql
wp option get core_updater.lock
wp option delete core_updater.lock
The first line saves a database backup to your home folder, away from the public website folder. The second shows the lock's timestamp, so you can see when the stuck update started (date -d @1795255337 turns it into a date on most Linux servers), or replies "Could not get 'core_updater.lock' option. Does it exist?" if there's no lock. The third deletes it.1819
Run the update again and check it finished
A core update replaces WordPress's own files, so have a recent backup of your files as well as the database. Go back to Dashboard→ Updates, click the update button and leave the tab open until it says "WordPress updated successfully." and moves you on to the About screen.9 Then check it all finished:
- Dashboard→ Updates should show the new number next to Current version and say "You have the latest version of WordPress."9
- If you see Database Update Required, click Update WordPress Database. The database step runs as a separate request at the very end of an update, so it can get missed when an update is cut short.1020
- Look round the site and the admin: the home page, a post, the editor and, if you run a shop, the checkout.
- With WP-CLI,
wp core verify-checksumscompares every core file with WordPress.org's copies. "Success: WordPress installation verifies against checksums." means nothing is missing or half-copied.21
If the site misbehaves after the update, our guide to recovering a site broken by an update covers rolling back and restoring.
Fix the reason the update keeps failing
If the update stops partway again, you'll get the same message for the next 15 minutes. The lock is a symptom. What you see when the update fails tells you where to look:
| What you see | What it usually means | What to do |
|---|---|---|
| The update screen stops partway, goes blank or shows a critical error or a 500, 502 or 504 error | PHP was stopped, usually by a memory or time limit | Check the debug log and your host's PHP error log |
| "Could not copy files. You may have run out of disk space." or "There is not enough free disk space to complete the update." | Your hosting space is full2210 | Free up space or ask your host, and see checking disk space |
| "The update cannot be installed because some files could not be copied. This is usually due to inconsistent file permissions." or "The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions." | WordPress can't overwrite its own files210 | Ask your host to check file ownership and permissions |
| "Download failed." followed by a reason | WordPress couldn't fetch the update from WordPress.org2 | Try again later, or ask your host whether outgoing connections are blocked |
| A Connection Information screen asking for FTP details | WordPress can't write to its files directly22 | Ask your host, as it's usually a file ownership setting |
Errors that come with a message like these release the lock properly, so you'll see the real error on your next try rather than the lock message.1 Only a hard stop leaves the lock behind.
For hard stops, start with the debug log. Switch it on, run the update again and look for "Allowed memory size" (see the memory guide) or "Maximum execution time" (see the execution time guide). WordPress already raises its memory allowance while it unpacks an update22 and gives the file-copying step five minutes,10 but a host can still cut a long request off sooner, and usually only the host's own logs will show that. Switch debugging off and delete debug.log when you've finished.
If you or your host have SSH access, running wp core update from the command line avoids browser and web server timeouts, because command-line PHP has no time limit by default,23 though WordPress still gives the file copy its own five-minute limit.10 The memory limit still applies. Run wp core update-db afterwards to make sure the database step has run too.24
If it happens with WP-CLI or automatic updates
wp core update uses WordPress's own updater, so it hits the same lock and stops with "Error: Another update is currently in progress." WP-CLI's documentation says you may need to run wp option delete core_updater.lock after verifying another update isn't actually running,25 and builds newer than the current stable release (WP-CLI 2.12) add that hint to the error message itself.8
Background updates deal with the lock quietly. If a core update is already locked, WordPress skips its background update with no error or email and switches maintenance mode back off.5 Each background run (plugins, themes, translations and core) also takes its own auto_updater.lock and respects it for an hour, so if a run is cut off, automatic updates pause until the hour is up.25
When a background core update fails for some other reason, WordPress emails the site's admin address:
- If it failed before any files were copied, the subject is usually "[Your site name] WordPress 7.1.5 is available. Please update!" Some failures, such as a failed download, get one automatic retry an hour later first.5
- If it failed after copying had started, the subject is "[Your site name] URGENT: Your site may be down due to a failed update". WordPress then stops background core updates until a manual update (from Dashboard→ Updates or WP-CLI) succeeds.51026
After either kind of failure, administrators may also see "An automated WordPress update has failed to complete - please attempt the update again now." at the top of admin screens while the site is still on the older version.27
If this has you wondering whether to keep background updates on, our guide to WordPress auto-updates weighs it up.
Common questions
Is it safe to delete core_updater.lock?
Yes, as long as no update is actually running. The row only holds a timestamp, WordPress deletes it itself at the end of every update and it replaces the row anyway once it's 15 minutes old.2 Back up the database first and delete only that one row. The risky moment is deleting it during a real update, because a second update could then start copying files over the first.
Will I lose anything by clearing the update lock?
No. The lock is a single timestamp with nothing else stored in it, and deleting it doesn't touch your posts, pages, settings, plugins or uploads. The thing to check is the update that left it behind. If that was cut off while copying files, WordPress may be only partly updated, which running the update again fixes. Take a backup before you do.
Did the interrupted update half-install WordPress?
It might have. WordPress copies the new files over the old ones, without changing your plugins, themes, uploads or wp-config.php, and doesn't resume if it's stopped.10 It copies version.php last, so a half-finished update still reports the old version and Dashboard→ Updates offers it again. Neither updates you start yourself nor background updates reliably put the old version back, so take a backup first.
Why does the message keep coming back?
Because the update keeps being stopped before it finishes, and each attempt leaves a fresh lock. Clearing the lock buys you another try, but the real fix is finding what's cutting the update off, usually a memory or time limit or a server that stops long requests. Run the update with the debug log on, check your host's error logs or ask your host to run it with WP-CLI.
Still stuck?
If the lock keeps coming back or the update has left WordPress half-installed, my emergency WordPress support can finish the update and find out what's stopping it. Many fixes are £50 all in and you'll get a fixed quote before I start. It's no fix, no fee. If you'd rather not run core updates yourself at all, my maintenance plans include updates tested on a staging copy first.
class-core-upgrader.php (Core_Upgrader::upgrade and should_update_to_version), WordPress source code on GitHub. ↩ ↩ ↩ ↩ ↩ ↩ ↩ ↩ ↩ ↩
class-wp-upgrader.php (create_lock, release_lock and upgrader messages), WordPress source code on GitHub. ↩ ↩ ↩ ↩ ↩ ↩ ↩ ↩ ↩ ↩
Connection handling, PHP Manual. ↩
admin-filters.php (upgrader_process_complete actions), WordPress source code on GitHub. ↩
class-wp-automatic-updater.php, WordPress source code on GitHub. ↩ ↩ ↩ ↩ ↩ ↩ ↩ ↩
schema.php (populate_options) and upgrade.php (upgrade_560), WordPress source code on GitHub. ↩
update.php (wp_version_check and wp_schedule_update_checks), WordPress source code on GitHub. ↩
Core_Command.php (update and is_lock_error), WP-CLI source code on GitHub. ↩ ↩
update-core.php (do_core_upgrade and list_core_update), WordPress source code on GitHub. ↩ ↩ ↩
wp-admin/includes/update-core.php (update_core), WordPress source code on GitHub. ↩ ↩ ↩ ↩ ↩ ↩ ↩ ↩
load.php (wp_is_maintenance_mode), WordPress source code on GitHub. ↩
Backing up your database, WordPress Advanced Administration Handbook. ↩
templates/export.twig (5.2 branch), phpMyAdmin source code on GitHub. ↩
wp db export, WP-CLI Commands. ↩
class-wp-debug-data.php (get_wp_database), WordPress source code on GitHub. ↩
wp-config-sample.php, WordPress source code on GitHub. ↩
class-wpdb.php (get_blog_prefix), WordPress source code on GitHub. ↩
wp option get and wp option delete, WP-CLI Commands. ↩
Option_Command.php, WP-CLI source code on GitHub. ↩
upgrade.php, WordPress source code on GitHub. ↩
wp core verify-checksums, WP-CLI Commands. ↩
file.php (unzip_file and request_filesystem_credentials), WordPress source code on GitHub. ↩ ↩ ↩
Runtime configuration (max_execution_time), PHP Manual. ↩
wp core update-db, WP-CLI Commands. ↩
wp core update, WP-CLI Commands. ↩
class-wp-site-health-auto-updates.php (test_if_failed_update), WordPress source code on GitHub. ↩
wp-admin/includes/update.php (maintenance_nag), WordPress source code on GitHub. ↩