82

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

  • 1
    That message got auto removed after a few minutes, so the problem is now solved an I successfully updated my wordpress installation – Sam Provides Apr 27 '16 at 19:11
  • It could be due to some cache (ex: WP Object Cache) that may have cleared itself after a few minutes. – Pothi Kalimuthu Apr 28 '16 at 1:20
  • Add your comment as an answer and mark as complete to close it out. Glad you got it working. – TomC May 8 '16 at 17:10
  • provided you a little tip at the end $>wp option delete my_option – prosti Nov 29 '16 at 14:47
  • 6
    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 Jul 1 '17 at 14:39
109

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'   
  • 15
    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 Jun 26 '16 at 10:29
  • And I can confirm 'core_updater.lock' – prosti Nov 28 '16 at 18:45
  • 8
    BEST IDEA: Do this with WP CLI: wp option delete core_updater.lock – jerclarke Mar 7 '17 at 20:02
  • 1
    I am not finding either 1 of these in the wp_options table, and still getting this message. – Solomon Closson Jul 25 '17 at 14:10
  • I don't have anything like this in wp database – user924 Jul 21 '18 at 16:48
15

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

  • doesn't help WordPress 4.9.7 – user924 Oct 28 '18 at 16:20
  • this option still works in WP 5+ – NickFMC Mar 1 at 18:11
6

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" );
  • 1
    doesn't help WordPress 4.9.7 – user924 Oct 28 '18 at 16:19
  • 1
    this is still available in WP 5+ – NickFMC Mar 1 at 18:09
  • I am not aware of anything in 4.9.7 that makes this not work, despite user924's comment. – John Dee Jun 19 at 23:59
1

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

  • doesn't help WordPress 4.9.7 – user924 Oct 28 '18 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
  • doesn't help WordPress 4.9.7 – user924 Oct 28 '18 at 16:20

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