0

I am trying to manually upgrade my wordpress to the latest version (3.0.3)-- after autoupgrade fails.

After the upgrade everything works fine except for one little nagging message at the top of my admin area:

An automated WordPress update has failed to complete - please attempt the update again now

I search the Internet and everyone is saying that it is because of a .maintenance file located in the Wordpress root folder, a relic of a failed auto-upgrade or a manual upgrade. In the second case one would just have to delete that file and everything would be fine.

But I search my wordpress installed directory, there is no such file. Any idea what contributes to this problem?

2

I think what Rarst means is that it is a .file (or hidden file) much like the .htaccess file. If you are browsing your files, there is an option to show hidden files. Once that option is chosen, you will most likely also see the .maintenance file

5

From the quick look at code:

  1. This message is triggered by maintenance_nag() function.
  2. The only condition to trigger is if $upgrading variable is defined.
  3. $upgrading variable is defined by including .maintenance file.

So I reason that file is present, there is no other path to this message that I see in code.

File starting with dot are regarded as system/hidden on Linux. It might be you simply don't see the file, but it is present. How are you browsing directory? Can also try asking hosting to check for you if there aren't enough permissions on your account or something.

4
  • on my host ( I'm using cpanel btw), I can see all the .php files, that means I can see the extension. So if there was a file with the extension .maintenance I would have found it. – Graviton Dec 16 '10 at 7:02
  • Ah, sorry - I thought that is complete file name, not an extension... No idea then. Maybe something messes up $upgrading variable in global scope. – Rarst Dec 16 '10 at 7:31
  • Ehm, double wrong and back to start. :) I thought that what gets prepended is version but it's path to installation. So dot at start still stands. Are you able to see .htaccess file in WP root? – Rarst Dec 16 '10 at 9:13
  • no. I don't see .htaccess, maybe that's the problem. – Graviton Dec 17 '10 at 1:26
2

I had the same problem and I had shell access to the system so I was able to verify that there really was no file called '.maintenance' anywhere on the system and yet still this message appeared. My Wordpress is that provided by Ubuntu 16.04, so I don't want to be perform updates myself as I am not interested in new features, and the responsibility for security-related updates lies with the Ubuntu/Debian package maintainers, so I really wanted to get rid of this message. My solution, which maybe isn't the right one, but which worked for me was as follows. Obviously paths in your installation may differ.

  1. Edit /usr/share/wordpress/wp-admin/includes/update.php, locate the function maintenance_nag(), and directly after the following line:

    $nag = isset( $upgrading );
    

    add the following line:

    delete_site_option( 'auto_core_update_failed' );
    
  2. Reload the page and the message should be gone.

  3. Remove the line you just added.
  4. Reload the page and the message should still be gone.
2
  • "the responsibility for security-related updates lies with the Ubuntu/Debian package maintainers". That's a huge misunderstanding. Having a secure system doesn't mean you have a secure site. You should always update WordPress as over time a lot of security vulnerabilities are being fixed. – Laxmana Feb 28 '17 at 10:45
  • And of course I do update Wordpress: by monitoring the Ubuntu security mailing lists and applying updates when they become available. – Alexis Huxley Mar 1 '17 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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