If you want the quick fix (that worked for me) scroll to the bottom.

I noticed last night at work that 2.7.1 was available to upgrade. So I clicked on the link to upgrade it and it never proceeded past the downloading wordpress-2.7.1.zip. I figured it might be a problem because of the severe web-browsing restrictions my work has or the possibility of me running IE. I figured I would just do it when I got home. I did think this was kinda weird because I was able to update one of my plugins without a problem.

So I got home and the link still wouldn’t work. I then ssh’ed into my server (hosted with 1&1) and found that multiple copies of the wordpress-271.zip were saved in my wp-contents folder (additional numbers were added before the extension) all at 0 bytes. So my next step was to google the problem. Unfortunately with this being a new release, not much was indexed at that point. I then went onto wordpress’s support forum and found that some people were having the same issue, but no one had posted a response. In one of the threads that I looked at (which ended up being unrelated to my issue) one of the posters had asked if the topic starters host was listed in the Core Update Host Compatibility list that wordpress had put out. I had never even heard of this list, so I figured I would look through it. It showed 1&1 under the “Works with caveats” section. It mentioned that the upgrade fails with PHP4, but works properly in PHP5. I thought I was already using PHP5, but I figured lets give it a shot. The instructions are very simple.

Go to the root of your wordpress installation and edit the .htaccess file (you might have to FTP in and copy the file to your machine and make the changes then upload it back). Add AddType x-mapp-php5 .php to the end of the file (you can put it above the # END WordPress comment if you like, but it won’t matter either way).

Maybe this will make it so I can install plugins through the dashboard (they would always fail before), but I will look into this later.

EDIT: I just checked and I am now able to install plugins through the dashboard.

EDIT2: As others have mentioned in the comments, the WordPress Automatic Upgrade plugin is incompatible with WordPress 2.7+. All the functionality (that I used at least) has been integrated directly into WordPress. As such, I had already disabled mine, but if you have not disabled it, you will run into issues with upgrading. Your best option is to Deactivate the plugin. You can then ftp/ssh in and delete the directory (not necessary, but I see no reason to keep the plugin). After that, you should be able to upgrade without a problem.

UPDATE (20 FEB 2009): The author of the Worpress Automatic Upgrade plugin has released a fix for the incompatibilities with 2.7.1. I am not sure if the plugin has any benefit over the built-in upgrade feature, but the fix should at least fix issues with the upgrade process. More details here.

Also for those of you who can’t find your .htaccess file. Under most webservers, a period (.) at the beginning of a file makes the file hidden, so you need to be able to view hidden files. If it still doesn’t show up, it may not exist. If not you can just create it with your favorite text editor (do not use a file extension), and add the information and upload it to your server.

51 Comments

  1. Shimshon says:

    I did what you suggested, but it didn’t work for me! Do you have any other solutions?

  2. Jeremy says:

    Only suggestion I can give is to look over the Core Update Host Compatibility list and see if your host is listed in there with instructions on how to fix it.

  3. J-Dawg says:

    You are absolutely the man! Thanks so much. Someone in the forums pointed here, and after adding the line to .htaccess, my upgrade was successful. Now to try the other sites that weren’t upgrading.

  4. Jeremy says:

    I am just glad I could help.

  5. Tom says:

    Excellent post! I had been scouring the WP forums for about an hour before I found your solution and it worked like a champ. Thanks for sharing your tip!

  6. Deals says:

    thanks! fixed my problem.
    same thing happened to me on 1&1 – the update process always stopped at “downloading wordpress… ” and then there were 7 zip files, all 0 bytes in size, in my wp-content folder.

  7. DaijoubuKun says:

    Nice post buddie… altho I have found an issue on my server, I can’t upgrade it automatically either way. As you know I’m running my own server and I have php 5.2.8.
    I did some digging and found out that the ‘WordPress Automatic Update’ plugin I was using seems to conflict with wordpress’s upgrade feature. I disabled the plugin and ran the auto upgrade again and it went perfectly. I have re-enabled the plugin and everything seems to be going fine now.

  8. Mark says:

    Awesome. I am using 1and1 and figured this was not something I needed to worry about as I am running PHP5. Did not think it would pose this problem, but adding the line to the .htaccess file enabled me to run the auto upgrade. Same symptoms you had described — multiple 0-byte attempts at 2.7.1 download. Thanks and best of luck everyone else.

  9. sharon says:

    @DaijoubuKun Thanks! This is exactly what I needed. And my thanks to the OP so that I could find help.

  10. Dr. Jim Anderson says:

    Wow – this was the perfect post! I made the changes that you recommended for my 1&1 sites and the upgrade went perfectly.

    One small additional note: if you have the “WordPress Automatic Upgrade” plugin installed, you’re going to need to deactivate it before the upgrade can run. Otherwise you’ll get a long and mysterious error message after you select “automatic upgrade”.

    Thanks again for doing the research and writing the post!

    - Dr. Jim Anderson
    The Business of IT Blog
    “Discover The Secrets Of Making Your IT Department An Indispensable Profit Center”

  11. Tracey says:

    Thanks, I’m on 1&1 too – changed the .htaccess file as you suggested and the upgrade finally worked perfectly.

    Tracey

  12. Wordpress 2.7 - 2.7.1 Upgrade Issues | House Of Koenig says:

    [...] to include the following: AddType x-mapp-php5 .php which apparently forced php5 use (here is a linkto the site that provided the information). If you discover that you don’t have an .htaccess [...]

  13. Wordpress 2.7.1 Upgrade Failed | bassmadrigal's blog | BlogBov says:

    [...] Here is the original:  WordPress 2.7.1 Upgrade Failed | bassmadrigal's blog [...]

  14. Gagal Upgrade Wordpress 2.7.1? Ini Solusinya | Tutorial Website says:

    [...] masalah, ingatlah mbah Google“. Benar saja, saya menemukan blog yang memberikan solusi untuk upgrade WordPress 2.7.1 yang gagal yaitu dengan menambahkan baris AddType x-mapp-php5 .php di file htaccess. Dan ternyata solusi [...]

  15. Roger says:

    Thanks for pointing this out. I was having problems upgrading but once I disabled WPAU as you suggested, all was fine

    Roger

  16. Nilesh Babu says:

    EDIT2 worked for me. Disabled WordPress Automatic Update plugin and updating to WordPress 2.7.1 was done in a snap! thx!

  17. greaxiaHitrizftqu says:

    bassmadrigal.com – now in my rss reader)))
    ————————

  18. Amanda says:

    Thanks! This worked like a charm! I’ve spent the last couple days absolutely frustrated.

  19. Adrian’s Blog » WordPress 2.7.1 auto upgrade fix says:

    [...] searching the forums and Google for a while I found bassmadrigal’s solution – modify .htaccess for the WordPress installation in question and [...]

  20. Банкир says:

    Да уж, сколько комментов и все бестолковые!

  21. Brian says:

    Thanks so much for this tip! I too use the 1&1 host and had the same problem you described. I added the one line to the .htaccess file to force PHP5 and I successfully updated both of my blogs!

    This is the second frustration I’ve had with the new WordPress version. My other annoyance is the Flash file uploader that only supports older versions of the Flash plugin. WordPress doesn’t communicate the system requirements very clearly.

  22. Dan Creswell says:

    Thanks for writing this up, I’m also with 1 and 1 and you’ve just saved me a load of time.

  23. Joseph Hoetzl says:

    Thank you very much for posting this! Saved me the hassle of the manual upgrade, although I still did the manual backups just in case…

    Thank you!

  24. Auto Sales says:

    Nice approach,: “ss 2.7.1 Upgrade Failed | bassmadrigal’s blog”. Added to my feed Yeah, very true ~auto sales

  25. Vince says:

    Deactivating the automatic upgrade plugin and deleting the two 2.7.1 zip files from my wp-content/uploads folder did the trick and I was able to upgrade successfully. I did not need to add the line to my htaccess code. Thanx.

  26. tinmanjim says:

    Just a note;
    My installation didn’t have a .htaccess file, so there wasn’t anything to add a line to.
    In that case, open a text editor, copy and paste the “AddType x-mapp-php5 .php” line (from
    bassmadrigal’s instructions above) into said document, save as .htaccess (yes, that’s simply a period followed by htaccess), then ftp it to your wp root. The next time you click on Automatic Update, it works. Thanks bassmadrigal, you’re a hero!

  27. Poe Jea says:

    What’s this .htaccess file? I keep reading about it.. but I have no such file in the root of my WordPress installtion or anywhere else. I’m having the exact same problem as you described, but obviously I can’t apply that fix with no .htaccess file. Also, I don’t have the auto upgrade plugin, so that’s not an issue. Do you have a suggestion?

  28. Jeremy says:

    Post updated with new information.

  29. anservic1 says:

    Подскажите, как бороться с этим С П А М О М?

  30. Amy Jensen says:

    That was EXACTLY what I needed for my 1&1 php4 install – thank you, thank you, thank you.

  31. Poe Jea says:

    Hey bassmadrigal, I edited my hidden .htaccess file with the php5 line, but this didn’t help. My auto upgrade stays frozen on “unpacking the core update” and nothing ever happens. I wonder what’s wrong? :(

  32. Travis says:

    WOW! I finally got it to work, thanks to you. And I’m just a non-techie, cigar blogger. THANKS!

  33. Aric says:

    Worked great by adding the line of text to a text doc and making it invisible! Thank you so much!

  34. DrSilent says:

    The 0 byte automatic upgrade zip file thing has plagued me with plugins for some time now, but today it did the same on wordpress 2.8 upgrade so I had to do something. I am also hosted by 1and1, and your htaccess trick did it beautifully. Thanks a bunch!

  35. Wordpress 2 7 1 Upgrade Failed bassmadrigal blog | low cost car insurance says:

    [...] WordPress 2 7 1 Upgrade Failed bassmadrigal blog Posted by root 29 minutes ago (http://bassmadrigal.com) Go to the root of your wordpress installation and edit the htaccess file you might have to put it above the end wordpress comment if you like but it won 39 t matter either way auto sales says nice approach ss 2 7 1 upgrade failed bassmadrigal blog powered Discuss  |  Bury |  News | WordPress 2 7 1 Upgrade Failed bassmadrigal blog [...]

  36. Jack and Jill Put Up A Blog says:

    You’re brilliant. That is all it took. Too bad I had already pulled my hair out. Thanks!

  37. Darren says:

    YOUR ARE THE MAN!
    I can’t even tell you how much time I’ve wasted with trying to figure out why I am always getting 500 error codes. I am also hosting with 1and1 and never thought a simply line of code could have saved me hours and days of re-loading, changing databases, and every other attempt to fix this.
    thank you again,
    Darren

  38. Simon says:

    Thank you so much! Worked great for me.

  39. saç ekimi says:

    Hmm… I read blogs on a similar topic, but i never visited your blog. I added it to favorites and i’ll be your

    constant reader.

  40. Swati says:

    hey, I am completely at a loss even now. Couldn’t find the .htaccess file on the server and I created a new file. The problem is I cannot view it on my mac after saving. So, I make a htaccess.rtf file upload it to the wp folder (also tried the the wp/wp-admin folder) then rename the file to ‘.htaccess’. And now get the 500 error. What am i doing wrong ?

  41. Eric says:

    Thanks so much. I have been searching for months for a solution to this annoying problem. Now it’s fixed. Thanks!

  42. Neil says:

    I spent ages trying to find a solution to the upgrade not going through and was so relieved when I read the exact same symptoms. It seems 1and1 should include a link to this post on their FAQ!

    Thanks very much for the answer :)

  43. wow account says:

    This post is very helpful from what I read on other blogs. Thank you!

  44. vincemmm says:

    Thanks for this fix. Worked for me too.
    I had the automatic upgrade plugin installed but have kept it. It has it’s merits in that it provides an easy way to backup your blog within the process of upgrading. Highly recommended.
    Great job, ta.

  45. Jon says:

    Thank you so much for this. I am also hosting on 1&1 and tried everything else before trying this .htaccess fix. Now I can install plugins from the control panel.

    It worked like a charm & saved me a ton of time!

  46. rosamundwo says:

    [Solved] wordpress automatic update from version 2.7.1 to 2.8.4
    October 2nd, 2009

    After moving from Asmallorange to exabytes hosting, i cannot upgrade all my plugins and can’t upgrade my wordpress to the latest version 2.8.4

    I have search through everywhere but couldn’t find the solution to this problem.

    I have tried downloading core control and edit .htaccess but failed.

    Finally i solved it !

    1. Always backup your database and also your files / folder.
    2. Delete your old wp-includes and wp-admin directories.
    3. Upload the new wp-includes and wp-admin directories.
    4. Upload and overwrite all the old files in the root, EXCEPT the wp-content folder and wp-config.php file. (I repeat DO NOT DELETE YOUR WP-CONTENT and WP-CONFIG.php file)
    5. Visit your main WordPress admin page at /wp-admin, login and it leads you to an upgrade page, click upgrade and follow instruction.

    For more info visit my website rosamundwo.com

  47. Éric Senterre says:

    Awesome! Worked perfectly for me! Was searching for this solution for a long time! :-)

  48. Melvin Ram says:

    Hey Jeremy,

    I saw you had some issues with upgrading WP. I had then when I went from 2.7 to 2.8.

    You might actually consider setting up an automatic backup system just in case this happens again when going from 2.8/2.9 to 3.0.

    We’ve just released a plugin that makes it dead simple: http://www.wordpressbackup.org

    And soon we’ll have it have an quick restore feature as well in case something goes crazy.

    I’d love to get your feedback on it.

  49. windows format says:

    At my blog only the plugin update feature was bugged, but wordpress upgrade worked great.
    Problem solved, ty

  50. J.C. says:

    Thank you so much! I’ve been trying to fix this forever!

Leave a Reply

XHTML: To type code in the comments use <pre lang=""> </pre>. Supported languages can be found here.