Timeout problem when upgrading wordpress 2.7

I know many people noticed the function of one click upgrade from WordPress 2.7 onwards. You can either use that to upgrade your wordpress installation or you can use WordPress Automatic Upgrade Plugin to upgrade wordpress installation.

Using one click upgrade, it just took a moment to install and upgrade your WordPress installation. The best part of all, it’s automatic. With a click to a button and voila, everything is complete.


The only problem that some users have is it’s giving a time out when upgrading the wordpress installation. An example of the error as per below.

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

So what do you do to solve this error? It’s really simple actually. Here’s how you can get around the problem.

1. Go to your wordpress installation folder using Cpanel or FTP client such as WinSCP.

2. Go to this directory : /wp-admin/includes/

3. Find the file named file.php and open the file. Search for the line that looks like this

$response = wp_remote_get($url, array(’timeout’ => 30));

4. Change the default value of 30 to something larger maybe 180 (which is counted in seconds)

$response = wp_remote_get($url, array(’timeout’ => 180));

5. Save the file and try again after that. It should fix the timeout issue.

I’m not sure why WordPress put very quick timeout for the response. Sometimes the server might be busy to cater the download requests so it’s better to put a higher timeout in the next release. :grin:

  • owhhhhhh..t.erimakasih byk2..kadang2 penin dgn error itu error ini….. :mrgreen:

    Kujie’s last blog post..Just another disability

  • I also encountered the same problem when I decide to upgrade the plugins in my blog.
    Thanks for this tutorial bro! really help me out 🙂

  • have yet to encounter such upgrade fiasco. hehe 🙂

  • hahaha.. alahai.. mudahnye…
    awat tak cakap awal2.. hehe…

    thanks bro.. lama gak aku carik nak setel mende alah nie..
    lupe plak pakar kita nie ada.. hehe..

  • Rasanya ianya disebabkan oleh bug wordpress. Rujuk: http://wordpress.org/support/topic/225437

    Boleh juga download plugins
    untuk fix.

  • nope. that didn’t solve mine. aduhai. apsal la bug ni asyik ganggu hidup aku! aaaah!

    abdusfauzi’s last blog post..iTunes Genius Now Available In Malaysia : At Least For Me

  • Thanks for the fix! I had no problems upgrading to WP2.7.1, but did have problems upgrading my plugins due to the short timeout limit. After running that fix on file.php, now my WP plugins are updating the way they should be. Thanks!

    I hate it when WP upgrade fails and you’ll have to reinstall WP. As long as the database is intact, I’m relieved! There was once I attempted a hasty upgrade (it was a rush job), I didn’t check through all the files before running upgrade.php and poof, it zapped my database 😀 haha. That’s a lesson learned the hard way (for not reading the instructions).

    teddY’s last blog post..In and out of hospital, revived.

  • i still have one blog which i have not upgrade. will try that out.

  • Great tip anyway. I do wonder why sometimes it times out , I guess its because of the bad quality of server lines sometimes

    Great and pretty easy to follow guide anyway

    Cheers !

    Pradeesh’s last blog post..Securing your WiFi – How and Why