Solve Operation Timed Out Error When Upgrading WordPress

WordPress 2.7 comes with a built-in automatic upgrade utilities, inside the control panel. Recently, WordPress has just released version 2.7.1. I would like to upgrade it automatically, to save me the hassle of downloading, ftp-ing or installing it manually.
However, many times have I experienced “Operation Timed Out” followed by “Installation Failed” when doing so. Below are the error I’m talking about (or something similar):

Downloading update from http://wordpress.org/wordpress-2.7.1.zip

Download failed.: Operation timed out after 30000 milliseconds with 351500 bytes received

Installation Failed

Below is what I did to resolve the error:

1. Go to your WordPress installation directory on your website.
2. Go to /wp-admin/includes/ folder.
3. Open/edit the file.php . Or you can download the file to your local computer for editing.
4. Look for the line;
$response = wp_remote_get($url, array(’timeout’ => 30));
and replace it with;
$response = wp_remote_get($url, array(’timeout’ => 120));

5. Save the file, or upload back the file. Be sure to backup the original file.
6. Try the “Automatic Upgrade” once again.

Your upgrade should be working fine now, without the “Operation Timed Out” error. You didn’t hear this from me, it’s from a reference Download failed.: Operation timed out after 30 seconds.

- WordPress: Code is Poetry

Related Posts:

13 Comments

  1. great stuff nazham..just what i’m looking for..sadly it was not working for me…error in the scipt or something..oh well..just have to use the manual way..

  2. Hi Nazham.. am trying to upgrade my WordPress and come with the following error.
    “Warning: copy(/home/readknow/public_html/wp-register.php) [function.copy]: failed to open stream: Permission denied in /home/readknow/public_html/wp-admin/includes/class-wp-filesystem-direct.php on line 122

    Could not copy file: /home/readknow/public_html/wp-register.php”

    Are you aware what should be done in this case? Is it because of the file permissions?

  3. @read2know: That’s probably due to file permissions. Try set your folders to 755 temporarily, then try again.

  4. Thank you for dropping by and your comment. Join my thread on twitter @ http://nogold.com/forum/showthread.php?t=30145

  5. Thanks for the quick guide man, worked like a charm!

  6. Very nice information. Thanks for this.

  7. thank you, you save me :)

    wondering why this download wp 2.7.1 failed only occurred on my local hosting, I mean not U.S hosting

  8. ups I forgot, this is for failed automatic plugins upgrade too ?

  9. Yeah, it would work on plugins too.

Trackbacks/Pingbacks

  1. [...] over and over again, and decided there’s a better way of overcoming this problem. Thanks to Nazham, he had some pointers on his blog to share on how you can edit the file [...]

  2. [...] over and over again, and decided there’s a better way of overcoming this problem. Thanks to Nazham, he had some pointers on his blog to share on how you can edit the file [...]

Leave a Comment



  • recently written