I don’t know about the rest of you, but I’ve experienced many instances where the Auto-update feature in WordPress fails to update either a plugin or WordPress itself.
The solution to this problem is remarkably simple, and hopefully will be fixed soon by the WP core developers in an upcoming release. The problem seems to be caused by a messy previous upgrade in which files are left in a temporary “upgrade” directory with the wp-content directory.
In order to solve the problem, you simply need to delete the “upgrade” directory in it’s entirety and then try the upgrade again. I’ve yet to find an instance on several blogs across multiple machines where this didn’t solve the problem.
Thank you, this was the solution!
Thanks for this!
Thank you SO much! This post has cured my many hours of frustration after a failed upgrade to 3.6!
You saved me from a reinstall. Thanks a million.
Thank you.
Thank you so much. you saved my blog :)
Robin.
Thank you! I finally managed to fix it.
I have all the permissions set to 777 but still it does not work for me
I have tried to delete the upgrade file but it refuses to delete, also i found some files in the upgrade directory which also refused to delete. How can i change the permissions for this folder so as to be able to delete it
Thank you SO much! Worked like a charm. Was struggling for so long trying to figure out what the problem was. A Google search turned up a lot of the same solutions that didn’t work for me. Thanks for a new one :)
Doesn’t work for me.
Hi,
Thanks it works for me!
It doesn’t work. I have tried every fix I can to get auto upgrade to work .. could it be because I am going from 2.84 to 3.42? I am a Drupal whiz, but very novice at WP and while I wanted to keep it that way, this client insisted on a WP blog so I stumble through whatever I have to .. it’s not very intuitive.
Does this auto upgrade EVER work? Or do I have to figure out the manual thing .. dreading …
I have tried about 10 times .. it always hangs on Unpacking the Download and going via FTP, I can see where much of it downloaded but apparently not all of it.. I have disabled the plugins .. checked the permissions .. everything I can think of to get it to work and it just doesn’t.
Other ideas?
Thanks,
Nancy
I tried deleting the “Upgrade” folder, but that didn’t work.
What did work was going into my CPanel for the website and doing the upgrade with Fantastico. The WordPress was originally installed through that, and it had been years since an update had been done (not my department! LOL).
Even though Fantastico was one or two upgrades behind, once it had done it’s upgrade thing, the WordPress updates could be done on their own, on the program, the themes, and the plugins.
All is well now, thanks for the great ideas everyone.
Thank you! Thank you! Thank you! I thought our site was toast when this happened, what an easy fix!
This does NOT always work, and hasn’t always.
If your site security is tight you CANNOT auto update WordPress. I have a site where security needs to be strict and no matter what permissions I set on the files, if I remove the upgrade folder and all kinds of other things – doesn’t work.
Debugging, I can see that it’s a filecopy routine that fails.
This server, btw, does NOT allow commandline zip file work.
Well thanks john , there is a big “if” in all this
Well i was trying to update wordpress from version 3.0.1 to 3.2.1 by your way (deleting the upgrade folder ) and then going to the administration of wordpress and trying to do the autoinstall , i had no success and i was stacked with message unpacking the upgrade , after 5-6 tries , i noticed at wp-content folder except the upgrade folder some files with the same name as the folder of the upgrade .tmp, .tmp3, tmp30 , tmp31 tmp32 tmp33 etc (i think the 31 ,32 ,33 is the times i tried to download install the upgrade) so before i did anythink i take a Database backup and a filesysystem backup , after this i delete the .tmp files an the upgrade folder
After that everythink worked nice and now i am at VERSION 3.2.1
Hi ,
I had successfully updated few plugins then I went ahead to update wordpress but it was unsuccessful.
But then when I tried logging into my wp-admin dashboard I am getting this error
Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 376984 bytes) in /home/ravsworl/public_html/wp-admin/index.php on line 13
My website is http://ravsworld.com
I tried all these steps:
1) Increased memory limit in wp-config file
2) Renamed all the plugins folder using FTP connection
Still I am unable to solve this issue.
Please help me resolve this issue as neither me nor my webhosting provider has recent backup to do rollover.
Thanks & regards,
Ravindra
Just wanted to say thanks for this post and a big thanks to all the suggestions in the comments as well – I was able to get my auto updating working again.
Thank you very much for this post, your solution still worked for me two years on! :-) Much appreciated!
I was having this problem too, and tried many of the solutions discussed above.
However, the final cause of the problem appeared to be the FTP transfer method used on the server..
If you are experiencing this problem, your host is probably using proftpd instead of pureftp as an FTP transfer method.
If so, ask them to change the FTP transfer method to pureftp. (It’s a simple one click process).
Since this change was made on my server, I have had no problem with updating WordPress, plugins, or themes on any of the accounts on the server.
cheers, Eric G.
If this doesn’t solve the problem, another thing to consider checking is the account’s disk quota. If all available space is used up or close to being used up, WordPress won’t be able to create and/or copy files when doing the upgrade.
I have tried updating my WP site from 3.0.4 to 3.1.1 and removing the upgrade folder did not solve it.
I have tryed to disable the plugins but it always say:
“Could not copy file.: /home/mhd-01/www.surflab.it/htdocs/wp-
content/upgrade/wordpress-34.tmp/wordpress/wp-admin/includes/menu.php
Installation Failed”
I just tried updating my one WP site from 3.0.4 to 3.1.1 and removing the upgrade folder did not solve it. Thankfully I remembered having to disable the plugins on another site. That did it for me.
I tried it, and it did not work for me either. It seems to be trying to create a tmp file before a directory I get a path like the following
wp-content/upgrade/all-in-one-seo-pack.tmp/all-in-one-seo-pack
I assume that it’s in the DB somewhere, since I manually upgraded WP and replaced all of the files. Any ideas?
I am trying to auto-update my blog to WP 3.1 but this always shows me an error:-
Downloading update from http://wordpress.org/wordpress-3.1.zip…
Download failed.: Could not open handle for fopen() to http://wordpress.org/wordpress-3.1.zip
Installation Failed
I’ve tried to delete the ‘upgrade’ directory and I’ve also tried to change ‘wp-content’ directory to 755. But nothing is of my use!
Please Help Me…
I was using WordPress 3.0.1 or something when I got problems with Auto Update. Actually it worked well installing me all the updates either plugins or WP itself. In the Admin pages I could see the new version number in the footer. But the other day it’s back to the older version and tells me to update again. The upgrade folder in wp-content was still there but it was empty. I deleted it and then made the auto update. Now it worked but sometimes it tells me that there is a new WordPress version and to make an update. Going to the update page it disappears.
WordPress really has to make a few changes to the auto update feature.
I wish I had read this post like last week, would have saved me hours if not days! I fiddled with permissions and deleted the content inside the upgrade directory – it never occurred to me to delete the upgrade directory as well. Problems usually have really simple solutions – you just have to know them :-)
Thanks for the tip, work like a charm!
I had to give ownership and read/write security to the entire wordpress folder for the account that IIS was running as.
example ISS Account: IUSR_HOSTNAME
Under your local users group this will be the account that starts with IUSR_
Thanks for this John – your solution worked for me when upgrading to WordPress 3.0.4 (after numerous fails)
it did work for me.. thanks John for the article
Another cause of the update failing is a timeout occurring on the server
I recently had this happening.
it would download the update quite happily and then seem to freeze during extracting the files (checking the upgrade folder showed that it had never fully extracted the archive)
increasing the timeout period fixed the problem
in this case the system is a fairly heavily loaded IIS server
I have tried just about every option and I am still getting Could not copy file.: /public_html/MyPlayground/wp-admin/css/theme-editor.dev.css error.
John,
I am still pretty new to wordpress could you elaborate on “download the plugin manually”? I know how to manually, but what plugin are you referring too, and where can I get it?
Had the same problem. WordPress wasn’t able to auto update to Version 3.0.4 nor to update any plugin. After checking chmod write permissions and deleting the wp-content/upgrade folder over and over again I decided to deactivate all plugins. (: Works fine for me. Thx anyway.
You have noooo idea what I’ve been going through – I couldn’t even upload header images, or images into posts automatically! I had to do everything manually and sometimes it was painstaking!
I posted SEVERAL times in the WP support forums and nobody was helpful at all. One quick Google search and here’s this old post. AWESOME.
Brilliant! THANK YOU!
“Downloading update from http://wordpress.org/wordpress-3.0.4.zip…
Unpacking the update…
Verifying the unpacked files…
Installing the latest version…
Could not copy file.: /public_html/MyPlayground/wp-admin/css/theme-editor.dev.css
Installation Failed”
I’m new to this, what should I do?
The easiest option is simply to manually download the plugin, unzip it to your desktop, and then FTP it right over the old version of the plugin in your /plugins/ directory.
You should also head over and join the WordPress Users Association because you’ll have access to a lot of additional resources and technical forums, etc…
John P.
well, for those who do not know how to or do now want to go into editing the wp-config.php, the simple solution will be to just created a new folder in your wordpress root directory and name it “tmp”. that solved it for me :-)
Give this link a shot if you’re still stuck: http://wordpress.org/support/topic/wp-301-has-stopped-allow-install-of-plugins-upgrades?replies=10#post-1854331
It turns out the AskApache Password Protect plugin was the culprit. Deleting that plugin worked for me.
Best,
-seanba
I installed some 15-16 plugins without problem, and now on every attempt (install, update) i got this message:
Unpacking the package…
Could not create directory. /home/webfaqe1/public_html/webdesign/wp-content/upgrade/clean-up-Clean-junk-files-or-trashes-that-automatically-created-due-to-autosaving-
I tried allmost everything, includind deliting upgrade folder, recreating with cmod 777, changin plugin folder cmod to 777, addin something to httaccess… and nothing works … the only way i can use is to uninstall all plugins, upload new one, and then install all together (in bulk actions)…
I really would appriciate if someone can find solution for me.
best regards
Noob to WP and was struggling and searching for 3 days, to find a solution to the upgrade and ftp probs.
Deleting the upgrades folder worked for me.
Thank you soooooo much for the info.
Having just converted to wordpress I am going through a learning curve at the moment. This idea of yours to delete the upgarde directory has just saved me many many hours of troubleshooting.
Why is there not more reference to this on the internet?? I read this and 30 seconds later my WP issues were over :-))
I just deactivated Ask Apache Password Protect WordPress Plugin… I think it causing problem while upgrading plugins and Latest WordPress 3.0.2 Update
That’s the one! Messing about with the upgrade folder when all I needed to do was disable a plugin. Why do we always go for the complicated solutions first? Cheers!
I am running WP 3.0 and have always had this issue with both upgrading WP and my plugins. I have tried to deactivate all my plugins still without any success. It seems that for now and I stuck constantly using the FTP method. Could this issue be caused by my host on the server side?
Thank you.
This didn’t work for me BUT:
This worked for me:
DISABLE PLUGINS, one after one, and trying in another tab or browser upgrading.
In my case i disabled three plugins:
– WP Super Cache
– WP Security Scan
– All in One SEO Pack
THEN IT WORKED!
It seems that some plugins are disturbing the Upgrade-Process.
I hope this works for some good people.
Greetings
IJB
Following my previous comment I’ve managed to sort out the problem and thought I would share it. Basically I manually upgraded the WordPress install.
All I did was upload all files EXCEPT the wp-content folder and went to http://www.yourdomain.com/wp-admin/upgrade
The whole thing took about 20 minutes.
Hope this helps.
This is interesting – I’m on WordPress 3 and am having this issue, however, no upgrades folder is created, instead I am getting a tmp file created in the wp-contents folder called wordpress-3.tmp, also if I’m trying to upgrade akismet I get a tmp file called akismet-1.tmp.
I’ve tried deleting these but to no avail. No sure if anyone else is experiencing this.
Thanks for the post John.
Your suggestion worked like a charm!!! I deleted the upgrade folder and it worked! Thanks, you rock!
Hello guys, and thanks so much for this informative thread, very appreciated. I only have a quick, basic, totally newbie question: After you deleted the “upgrade” folder, do you need to re-create a new, blank one, or will the system do that for you? Thank you.
This was the only post that helped me for months…thank you! I think I found a way to not have to even delete my upgrades folder, so I wanted to post this.
I was having the same problems trying to upgrade the WordPress version or plugins. After changing file permissions, manually deleting my upgrade folder, increasing the amount of PHP memory that could be used, I finally found out that the problem was with the ftp server that my host uses (well, the problem actually involved a WordPress bug, but it was solved by asking my host to change my ftp server temporarily to proFTP until I finished my upgrades.)
I wrote a detailed blog about it: http://arcandangle.com/wordpress-upgrade-cannot-copy-ftp-permission-issue-in-layman-terms
Hope this helps others!
Thank You Darcy for sharing! I tried everything else that I could find and no love until I found your fix!
Hey,
I had this problem. Just google a file ‘class-wp-upgrader.php’ upload it to the directory ‘wp-admin/includes’ overwriting the existing file
This will sort it out,
Cheers
Karl
Looks like I spoke too soon, even thought I CHMODed everything I still get issues with files :P
I ALWAYS have trouble with the automatic updates- and so I end up waiting too long. This did the trick, thanks!
It may have something to do with the version of PHP your server is using. I was having the same problem, but found this fix:
Add this to the top line of your .htaccess file: AddType x-mapp-php5 .php
This worked for me, but I’m still trying to figure out why it fails periodically.
The other problem with WordPress updates is the .maintenance file that gets left behind which can cause some headaches. It’s as if the WP upgrades can’t clean up after themselves in some cases.
didnt work for me. it is saying “Cant find root directory”
Wow, that really worked like a charm. I am using WordPress 3.0.
I had a similar problem to some of you here where the automatic update would stall or error out in some way. I found that the upgrade worked fine on all but one of our customers sites (all on same server with same permissions).
The site in question had used 37mb of its 50mb quota. I increased this to 70mb and hey presto, the upgrade worked fine.
I am assuming that the upgrade process requires a certain amount of disk space to upload the upgrade file and if its not there it will just fail.
Hope this helps someone!
My problem was also that there was not enough room within my storage quota. Deleted some files, then upgrade worked perfectly.
Yes, I had to expand the disk quota for my ftp and everything worked then.
I am in the same boat as a number of these folks. I have no trouble updating any of my plugins. It’s just when I do the Core update that it stalls at “Unpacking the update.”
I have deleted the upgrade folder, but that did not fix the problem. I try a new update and go to th new upgrade folder it made and I can see all the files, seemingly unpacked.
Any ideas?
This hasn’t fixed a failed auto update to version 3.0 from 2.9.2. I deleted the upgrade folder and the wordpress-3[x].tmp files that were in wp-content and it still stalls at ‘Unpacking the update’.
I’ve never had problems upgrading anything before.
Wow, this totally saved me from a sleepless night. Thanks
Thanks alot. I was beating my head against the wall furiously trying to figure this out. Nothing was working. It never occurred to me that the problem would have been old data in the “upgrade” folder.
After deleting this folder and re-installing 2.9.2 I was able to reinstall all of my plugins and my site is running fine now.
Thanks again.
Oh thank you, thank you, thank you!!! Not only was my WP failing to update but it was running super slow. That worked like a charm and now all is back to normal…. Phew!!
Wonderful! Upgrading my plugins was a pain before, now it is simple.
Thanks so much!
thank you.. the annoying failed was killing me, but your easy fix worked :)
thanks John !!!! worked like a charm !!!!!
amazing… tried everything…..
i have the same problem exactly, thanks :) i can upgrade my wp now
Very cool I have this exact problem. While deleting the upgrade folder allows me to auto update my plugin. I have to delete the upgrade folder every time I upgrade the plugins.
Thanks for the tip very helpful!
Larry
Hi All,
I had the same problem and this tips did not for me as well, but after disabling all plugins WordPress Update accomplished eventually. Try that i hope it will for you, too.
Jules, is is possible that your webhost has a firewall blocking the outward connection to wordpress.org? It might be worth asking them.
Yesss! I’ve never been able to auto-update but this has fixed the problem :D Such a simple solution.. Thanks!
This didn’t work for me. My auto update hangs at
Downloading update from http://wordpress.org/wordpress-2.9.2.zip
every time and always has. I’ve tried every fix I can find. =/
Tnx for your tip. Didn’t work for me (although the upgrade dir was there).
What helped me (2.9 -> 2.9.2 DE version hosted on 1+1) was adding
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
to the htaccess.
Cheers
JD
Glad I was able to save you some frustration there Boon! ;-)
John P.
Dude you just saved my life… I did backup my entire site before trying to upgrade in case the upgrade was going to fail (because it has before on me without a backup!)… But i didn’t realize it was going to be so easy to repair it!
I got the whole “Down for scheduled maintenance error” and thought I was going to have to FTP my backup which would take like 30 minutes at least!…. But your solution fixed it in less than 30 seconds. Thanks! Your site was really easy to find too, first search result.
Nope. No luck. I don’t get any kind of error when trying to update. It simply hangs on the ‘unpacking files’ portion of the procedure. Nothing else ever happens after that. The same thing happens when I try to install new themes.
same problem for me too what did you do atlast to rectify?
It did not work for me. I am facing this problem with my host. But with a different host automatic upgrade always works fine. Very badly needed this as it will save lots of time.
Hi John,
I have the same problem that Dave. I cannot upgrade my plugins but yes wordpress core.
Same message. “could not create directory /usr/home/cucharadas.com/web/wp-content/plugins/theplugin/”
files/directories permisions???? core yes, plugins no…
Thanks in advance
Please John help me. I work with 10 wp sites and only 1 is giving me this problem. I didn’t solve by simply deleting the upgrade folder. Any other suggestion?
Thank you
Thanks! Worked perfectly. I am so glad I found your site! Apparently, I need to delete the upgrade folder after each auto update. Maybe WordPress will fix this in the future.
Thank you! I have been changing EVERYTHING – owners, permissions, you name it. This was too simple!
Wow, thanks alot for this; it worked like a charm! Nice Search Engine placement too; found this on the first page of Google’s Search.
Hi John, thanks for your answer :-)
Yes, i’ve installed the plugins via FTP successfully but i want to enjoy automatic updates… that will make my work easier.
I fear this will cause me trouble when i’ll have to upgrade wordpress to a future new version (2.8.4 or high). It could be a hell!
That is strange Dave. Especially with permissions set so liberally. So, out of curiosity, did you try and manually install that plugin via FTP? I believe I would try that next and see if it still causes problems. It might lead to more information for troubleshooting purposes.
John
It didn’t work for me… :(
I have all permisions OK (777) and the update process works fine until last step…
Take a look…
“Downloading update from http://downloads.wordpress.org/plugin/PLUGIN_NAME.
Unpacking the update.
Installing the latest version.
Removing the old version of the plugin.
Could not create directory. /usr/home/BLOG_NAME.com/web/wp-content/plugins/PLUGIN_NAME/
Plugin upgrade Failed.”
My Blog works with WP 2.8.3 and these plugins (5) works fine in another blog i manage (but in other host).
Current hosting works with PHP5 (5.1.6_3)… maybe plugin updates crashes because of this…
Please help!!! thanks in advance! :-)
Aaahh…Thanks.. I was updating flickr plugin when it failed…and as usual I search the internet and there was your blog..Thanks..the fix works great…
Perfect! It worked, thanks John! On a side note, some of my plugins caused the issue to happen again (not all) and even when doing the fix the upgrade did not happen as it was supposed to. I believe this is a plugin issue, but I could be wrong. For those ones I had to manually upgrade them. The two specific plugins I had issues with were “Subscribe2” and “Lifestream”.
Thanks again!
Many times i’ve experienced problems to that auto update because of the file permissions. But before playing around with those, get rid off that “upgrade” folder. It could save you a lot of time messing with the WP installation.
ok this article really rocks in fact this is something amazing because something that it seems all this year for me really difficult now is just simple as taking a candy to a baby I really fell like an idiot because all this time with problems when wordPress auto-update fails and now I realize that is so easey…
Jeff,
That sounds like it could be a permissions issue. Which is really hard to diagnose in the comments of a blog post. But you might try changing the permissions on your wp-content folder to 755 if they are not already like that.
John P.
I don’t know what to tell you Jonalyn. I’ve seen the failure to update randomly with a number of plugins, both big and small, as well as with WordPress itself. It seems entirely random to me, and the main issue seems to simply be WordPress’ auto-update feature not cleaning up after itself by deleting the previous upgrade files.
I think the proof of this comes in the fact that you can manually remove them and try the upgrade again and it works every time. So, I wouldn’t worry too much about root cause diagnosis. We just need to wait till the developers get the process ironed out and in the meantime you now know the fix.
Cheers,
John P.
Very cool,,, this worked for me. My main blog got hacked a few weeks ago while I was traveling, so now I am playing catch up trying to get my post back, upgrade plugins etc. Thank you for you solution to this upgrading issue. lew
Hello John, I have been finding not only wordpress update failing on me on a regular basis but also larger plugins like All In One SEO. I am not sure why do you have any ideas. At first i thought it was bad net connection or time of day that I am trying to do the updates, but I am really not sure if that is the case. Your guru incite would be greatly appreciated. jon
Unfortunately, this didn’t work for me. I still got a “could not copy files” error when attempting the upgrade.
Oh this is really cool, I really did not know it would be that simple. However hopefully it wont cause any problems or issues like loss of any data or file.