Upgrading WordPress… FAILED!

- by

We’ve all been there many times: a new WordPress Version comes out, you think you’re upgraded in under a minute, and then this message comes up to tell you that you’re not:

WordPress Upgrade Failed!

Bugger…

Let me talk you through the many many possibilities for this and what you can do to make this work after all…

File Permissions

One of the most obvious reasons is that if some of the files WordPress needs to overwrite do not have the correct permissions to be overwritten by Apache. Reasons for this can be endless, but a possible remedy is to make everything in your WordPress directory writeable for a moment, do the upgrade, then lock things down again.

Here’s what you need to do (root access required):

SSH into your server, then find the web directory of the site in question. I’m assuming you’ve cd’d into it. Now let’s change everything to 777 with this command:

# chmod -R 777 .

This will make every file in this directory writeable, including hidden ones. Go back to your WordPress backend, carry out the upgrade, then come back to your SSH screen. Now let’s lock them back to what they should have been:

# find * -type d -exec chmod 755 {} \;
# find * -type f -exec chmod 644 {} \;
# chmod 750 wp-config.php

There. Much better. This will make every file and directory readable to everyone but writeable only by the owner. The only exception is wp-config.php, which isn’t even readable by the public.

If you don’t have root access to your server, ask you friendly hosting company to carry this out for you.

Owner Permissions

Likewise, if files are owned by another system user and do not have public or group write permissions, WordPress won’t be able to change those. Let’s change everything so that it belong to you and nobody else. Again login as root via SSH and navigate to the web directory in question:

# chown -hR youruser:apachegroup *

“youruser” is of course your user name (the one you use for FTP logins) and “apachegroup” is the group you’re in. On Plesk systems, this is usually “psacln” but this will differ for other installations.

Shared Hosting Restrictions

On some shared hosting platforms, these automatic upgrades don’t work. Which is sad because it takes away a huge piece of greatness from WordPress. Luckily though, many shared hosting providers are WordPress Friendly and will work fine with this functionality. Guru Hosting of course works perfectly 😉 but so does Easyspace (most of the time that is).

There’s a list of compatibel hosting companies on the WordPress site – have a look if you’re using one of those. It also contains possible fixes to make upgrades work with your provider.

If you’re with 1and1 for example, you can add the following line to your .htaccess file:

AddType x-mapp-php5 .php

This will utilise PHP5 and make your upgrades work (not that I’ve tried it, but that’s what WordPress suggest).

If I discover any other caveats, I’ll add them to this list. In the meantime, if you know anything worth adding, please leave a comment and share it with us.

Thank you 😉



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

2 thoughts on “Upgrading WordPress… FAILED!”

Leave a Reply to alex79Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.