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