When I work on testing for my websites, I use a local development server. My favorite choice on my Mac is DesktopServer. It is not the local server of choice that I have this problem, it is me being impatient. I get too excited and forget to let processes run, and the most important one is to not try and update the WordPress core and then immediately click the link to update plugins or themes. I need to let the prior update finish or I will get the error that the WordPress update failed.
When this happens, I get a link to try the update again but the update continues to fail. What happens during an update is a hidden file is created in the WordPress root directory called .maintenance which is where WordPress looks to see if an update is currently in progress. While I am unsure at this point in time when it is safe to delete this file, I will go ahead and remove it if I can not seem to get past the update error. If you are concerned about the safety of deleting this file, you can do a google search for “WordPress .maintenance” and see what others say. So far, I have not had an issue with this route.