If you have a wordpress website then you already know that it simplifies a lot of things. When it is working OK then it works a lot like a wordprocessor and it lets you concentrate on writing content and not getting caught up in the nuts and bolts of HTML and PHP and the like.
I’ve met people who don’t trust it because there are so many installations of wordpress that it’s a target that is easy to hack. Well that’s a double edged sword. The guys who keep wordpress updated know that their system is under constant attack, and they are pretty good at their jobs of defending it. That means that as a user you have to update to the latest code particularly when there are important security updates.
Updating is an apparently simple thing, you log in to your admin dashboard. It puts a message at the top of the page that there is an update. You can check out if it’s important or just window dressing. Then if you select to update it then you press the button and it does it.
There are a couple of common problems that occur when updating wordpress. One is that it gets stuck and tells you nothing. The page that shows the progress of the update just hangs, it doesn’t update and you get no feedback from it.
So you reload your dashboard. And then you start the update again only to be told that there is already an update in progress. It turns out that this is because there is what’s called a flag, a piece of data that can be set to true or false, that indicates that there is an update in progress. When you start to do another install, it detects the flag is set to true and as Little Britain put it “The computer says NO!”
It stops you doing another update while the flag is set. And the flag should clear after 15 minutes. Only it doesn’t always do that either.
You can either hack the database yourself or you can load up a plugin called Fix Another Update In Progress.
Load it up and go to settings and click the button and it clears the flag in the database.
Then you can try again. When you get your update completed, you can uninstall the plugin because it only does one job and you don’t need it there after it’s done.
There is another thing that can happen. You see a message that indicates that the update resulted in an error because there was insufficient execution time allowed for the update. Essentially there is a limit on execution time because it absorbs a lot of processing time from your web hosting. You can override this temporarily or permanently by editing your .htaccess file.
In the directory on your hosting where the wordpress files are located there is a file called .htaccess, it controls a lot of things about processing in your website system. You may be able to edit this one of three ways (there are more but these are the obvious ones):
- Use the file editor in your cpanel webhosting to change .htaccess
- Use your ftp access to edit the file .htaccess
- Use the file editor in a file manager plugin. Note if you do this then please uninstall it afterwards because its got a lot of potential for hacking attacks.
There are a lot of plugins and code within WordPress that edit .htaccess so be careful. The wordpress contribution to the file will start with:
And the end of the wordpress effect on the file will be a line that says:
Just before #END WordPress add a line that says:
php_value max_execution_time 300
That will extend the max execution time to 300 seconds which is about 5 minutes, so you can change it again if you want.
Those two together can sort out the most common update problems in my experience.
There’s a more extensive description of the .htaccess hack at wpbeginner
They alsoe have more options on the Fix Another Update In Progress.