WordPress upgrade : Allow more time for slow servers

October 28, 2009 at 9:32 am

WordPress auto download/install is a very nice feature, but sometimes a few problems can appear. One of them is that WordPress don’t manage to download the new version. This happens on slow servers. Here is how to solve it.

To apply this hack, you’ll have to edit one of WordPress core files. Keep in mind that it is never recommended. This hack should be applied only if you have problems while auto-upgrading WordPress.

Open the wp-admin/includes/files.php file and go to line 448. You’ll see the following:

$response = wp_remote_get($url, array('timeout' => 60));

To allow more downloading time, simply change the 60 with a greater value, as for example:

$response = wp_remote_get($url, array('timeout' => 120));