Table of Contents
WordPress offers a great User Experience (UX) for updating. The platform has evolved to provide automatic updates for minor and security-based core releases and some plugins and themes. However, it’s not a foolproof system. You’ll sometimes encounter the WordPress Update Failed error.
Like many other WordPress issues, some simple steps exist to fix them. Most will require you to access your server through Secure File Transfer Protocol (SFTP). As such, if you have these skills before you begin, you’ll be in an excellent position to tackle the error head-on.
This post will show three ways to fix the WordPress Update Failed error. By the end, you’ll know what to do in a crisis and can return to running your site.
What You’ll Need to Fix the WordPress Update Failed Error
Getting all the tools you’ll need in one place is a good idea. You may also need to brush up on the techniques you need.
Before you begin, you’ll want to have the following in place:
- Administrative access to your server.
- A suitable SFTP client, such as FileZilla or Cyberduck.
- The skills necessary to use SFTP and navigate your server.
Once you have these, you’re ready. The good news about the WordPress Update Failed error is that you don’t need expert-level knowledge to fix it.
How to Fix the WordPress Update Failed Error (In 3 Ways)
Over the next few sections, we’ll show you three ways to rid your site of the WordPress Update Failed error.
The methods are ordered based on how easy they are to implement. As such, the first involves removing a file.
1. Remove an Old .maintenance File
For the unaware, WordPress uses configuration files to carry out automated tasks. Maintaining your site involves the .maintenance file. This has a few uses, but in this case, it can stop updates from running after being stopped.
In other words, the .maintenance file is stopped in one state, but your site expects another. This results in the WordPress Update Failed error. The solution is to delete the .maintenance file.
To do this, you’ll need to log into your server. Once you’re in, you’ll see the top-level files that make up your WordPress site:
You may find the maintenance file below. If not, you can skip this step and try some of the other solutions. Though, if you find it, right-click and delete the file:
At this point, check your site and try to carry out the update. If you are still having the issue, check out our other methods.
2. Alter the Secure File Transfer Protocol (SFTP) Settings In wp-config.php
While at the top level of your WordPress site, you can quickly change the wp-config.php file. This file stores your site’s configuration settings, and an issue here can cause the WordPress Update Failed error.
As with the first method, you’ll want to find the wp-config.php file within your site’s root directory. Here, right-click and choose to open the file:
When the file is open, look for the /* That’s all, stop editing! Happy blogging. */ line. Above this, paste in the following:
define(‘FS_METHOD’, ‘ftpext’);
define(‘FTP_HOST’, <hostname>);
define(‘FTP_USER’, <username>);
define(‘FTP_PASS’, <password>);
Of course, you’ll want to replace the values with those relating to your site. Also, check that these aren’t already defined within wp-config.php.
Once you’re ready, save your changes and upload the file to your server again if necessary. Then, check your site and proceed to the next method if you still get the error.
3. Adjust Your File Permissions
A more complex task involves your file permissions. Every file and folder has a collection of users who can make changes. If file permissions aren’t set correctly, you won’t be able to carry out tasks such as updates.
To change file permissions, you’ll want to right-click and choose the option to set permissions on the file or folder. In FileZilla, the option is explicit (File Permissions). In Cyberduck, choose Info:
You’ll want to make sure the following folders are set with the 755 permissions:
- wp-content
- wp-admin
- wp-includes
When you’ve done this, head inside the wp-content folder and look for the upgrade directory:
Again, choose 755 as your file permission here. At this point, recheck your site. If you still get the error, head back to the upgrade file and change the permissions to 777. This is more ‘open’, so it’s only something to do temporarily.
Check out your site one final time and see if the WordPress Update Failed error still occurs. If so, you may want to carry out a manual WordPress update. The steps aren’t too technical; the good news is that you’ll only need to do this once. When it’s complete, your site should be back to normal.
Wrapping Up
WordPress automatically updates themes, plugins, and minor core releases so that you can take a more hands-off approach than ever before. However, if you encounter the WordPress Update Failed error, you’ll have to open the toolkit until the issue is resolved.
In this post, we’ve offered three ways to fix the WordPress Update Failed error. Let’s recap:
- Delete the .maintenance file from your server.
- Change the SFTP settings within the wp-config.php file.
- Make sure your file permissions are set.
Have you ever encountered the WordPress Update Failed error? If so, will this article help you tackle it better next time? Let us know in the comments section below!