2009-01-31-download-failed-operation-timed-out-after-30-seconds.md 1.06 KB
Newer Older
Danesh Manoharan's avatar
Danesh Manoharan committed
1
2
---
title: 'Download failed.: Operation timed out after 30 seconds'
3
author: Danesh Manoharan
Danesh Manoharan's avatar
Danesh Manoharan committed
4
5
6
7
8
9
10
11
12
date: 2009-01-31T17:33:38+00:00
robotsmeta:
  - index,follow
pvc_views:
  - 19857
dsq_thread_id:
  - 890951761

---
13
Been getting this error "Download failed.: Operation timed out after 30 seconds" every time I try to update a plug-in in my WordPress 2.7.
Danesh Manoharan's avatar
Danesh Manoharan committed
14

15
After some digging around I found that my web server's download speed was pretty low. WP 2.7 by default has a 30 second timeout set for it's download function which I constantly kept hitting.
Danesh Manoharan's avatar
Danesh Manoharan committed
16

17
The workaround's a simple hack to the file.php file in the /wp-admin/includes/ folder.
Danesh Manoharan's avatar
Danesh Manoharan committed
18
19
20
21
22

1. Download the file using over ftp or ssh. Depending on your hosting package.

2. Look for the line;

23
" $response = wp\_remote\_get($url, array('timeout' => 30)); "
Danesh Manoharan's avatar
Danesh Manoharan committed
24
25
26

and replace it with;

27
" $response = wp\_remote\_get($url, array('timeout' => 60)); "
Danesh Manoharan's avatar
Danesh Manoharan committed
28
29
30
31
32
33

function download_url() at wp-admin/includes/file.php

3. Upload the modified file back into the /wp-admin/includes/ folder. Overwrite the old file if you must.

You auto update should be working fine now.