WordPress 2.7.1 Upgrade Failed

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 thoughts on “WordPress 2.7.1 Upgrade Failed

  1. 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.

  2. 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.

  3. 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!

  4. 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.

  5. 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.

  6. 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.

  7. 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”

  8. Pingback: Wordpress 2.7 - 2.7.1 Upgrade Issues | House Of Koenig

  9. Pingback: Wordpress 2.7.1 Upgrade Failed | bassmadrigal's blog | BlogBov

  10. Pingback: Gagal Upgrade Wordpress 2.7.1? Ini Solusinya | Tutorial Website

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

    Roger

  12. Pingback: How to Fix 1&1 and WP Incompatibilities — A Ghost of Daisies

  13. Pingback: Adrian’s Blog » WordPress 2.7.1 auto upgrade fix

  14. 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.

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

  16. 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.

  17. 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!

  18. 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?

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

  20. 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? 🙁

  21. 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!

  22. Pingback: Wordpress 2 7 1 Upgrade Failed bassmadrigal blog | low cost car insurance

  23. 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

  24. 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.

  25. 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 ?

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

  27. 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 🙂

  28. 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.

  29. 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!

  30. [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

  31. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *