98

I was trying to update my wordpress core to 4.5.1 but my system was missing some permissions, and now after giving correct permission, I cannot get rid of that message and I cannot upgrade. Tried to look for a .maintainance file but there is not.

How do I update now?

Thanks for help

6
  • 1
    That message got auto removed after a few minutes, so the problem is now solved an I successfully updated my wordpress installation Commented Apr 27, 2016 at 19:11
  • It could be due to some cache (ex: WP Object Cache) that may have cleared itself after a few minutes. Commented Apr 28, 2016 at 1:20
  • Add your comment as an answer and mark as complete to close it out. Glad you got it working.
    – TomC
    Commented May 8, 2016 at 17:10
  • provided you a little tip at the end $>wp option delete my_option
    – prosti
    Commented Nov 29, 2016 at 14:47
  • 7
    Just "select SELECT * FROM wp_options WHERE option_name LIKE '%core_update%'" from your db. Just delete this row "delete core_updater.lock" from wp_options table and run it again. It helps
    – Arul
    Commented Jul 1, 2017 at 14:39

7 Answers 7

127

It is an automatic lock to prevent simultaneous core updates. It will be gone after 15 minutes. If you don't want to wait, delete the record from options table – usually wp_options.

Since Wordpress 4.5:

option_name = 'core_updater.lock'

If you have an older installation (before Wordpress 4.5):

option_name = 'core_updater'   
8
  • 16
    In my installation there is no such row in database and the message still appears. The real option name is core_updater.lock (for Wordpress 4.5.3)
    – Athlan
    Commented Jun 26, 2016 at 10:29
  • 13
    BEST IDEA: Do this with WP CLI: wp option delete core_updater.lock
    – jerclarke
    Commented Mar 7, 2017 at 20:02
  • 3
    I am not finding either 1 of these in the wp_options table, and still getting this message. Commented Jul 25, 2017 at 14:10
  • 1
    I don't have anything like this in wp database
    – user924
    Commented Jul 21, 2018 at 16:48
  • 2
    nothing can be found like this at my database, not core_updater.lock and not even core_updater
    – user924
    Commented Oct 28, 2018 at 15:58
29

If you use wp-cli run the following command:

wp option delete core_updater.lock

This command will delete the option named: core_updater.lock

4
  • doesn't help WordPress 4.9.7
    – user924
    Commented Oct 28, 2018 at 16:20
  • this option still works in WP 5+
    – NickFMC
    Commented Mar 1, 2019 at 18:11
  • Yes, It does. It will work on any latest version Commented Apr 5, 2020 at 10:19
  • @user924 if this doesn't resolve the issue, please check the wp_options table has auto_increment enabled for the option_id field.
    – Anthony
    Commented Oct 29, 2020 at 21:42
9

Add this code to any plugin or your theme's functions.php file. Remember to remove it when you're done to prevent flicking your database for no reason.

delete_option( "core_updater.lock" );
3
  • 1
    doesn't help WordPress 4.9.7
    – user924
    Commented Oct 28, 2018 at 16:19
  • 1
    this is still available in WP 5+
    – NickFMC
    Commented Mar 1, 2019 at 18:09
  • I am not aware of anything in 4.9.7 that makes this not work, despite user924's comment.
    – John Dee
    Commented Jun 19, 2019 at 23:59
1

Per @jeremyclarke, running this at the terminal resolved this issue for me: wp option delete core_updater.lock

1
  • doesn't help WordPress 4.9.7
    – user924
    Commented Oct 28, 2018 at 16:20
0

Confirming this 'core_updater.lock'. It may not be obvious at first but look at the line 771.

File: wp-admin/includes/class-wp-upgrader.php
754:    /**
755:     * Creates a lock using WordPress options.
756:     *
757:     * @since 4.5.0
758:     * @access public
759:     * @static
760:     *
761:     * @param string $lock_name       The name of this unique lock.
762:     * @param int    $release_timeout Optional. The duration in seconds to respect an existing lock.
763:     *                                Default: 1 hour.
764:     * @return bool False if a lock couldn't be created or if the lock is no longer valid. True otherwise.
765:     */
766:    public static function create_lock( $lock_name, $release_timeout = null ) {
767:        global $wpdb;
768:        if ( ! $release_timeout ) {
769:            $release_timeout = HOUR_IN_SECONDS;
770:        }
771:        $lock_option = $lock_name . '.lock';
772: 
773:        // Try to lock.
774:        $lock_result = $wpdb->query( $wpdb->prepare( "INSERT IGNORE INTO `$wpdb->options` ( `option_name`, `option_value`, `autoload` ) VALUES (%s, %s, 'no') /* LOCK */", $lock_option, time() ) );
775: 

Now, if you like you may delete this option:

$>wp option delete core_updater.lock
1
  • doesn't help WordPress 4.9.7
    – user924
    Commented Oct 28, 2018 at 16:20
0

For anyone looking for the full MySQL query:

DELETE FROM wp_options WHERE option_name LIKE '%core_update%' LIMIT 1

1
  • Perhaps WHERE option_name = 'core_updater.lock' to directly specify the right option.
    – Dereckson
    Commented Sep 1, 2022 at 9:14
0

In WordPress there are two update locks:

  • core_updater
  • auto_updater

So, you can fix this by deleting the update locks.

Use below code to delete the lock's:

delete_option( 'core_updater.lock' );
delete_option( 'auto_updater.lock' );

You can delete the update locks with CLI command too. Checkout how to delete them with CLI command.

Use the WordPress pluginenter link description here fix-update-in-process which show the existing locks and fix the issue with one click.

Not the answer you're looking for? Browse other questions tagged or ask your own question.