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

Indispensible Unix commands

The first lab session of my Computer Science course consisted primarily of learning the following Unix commands: pwd, ls, cd, cp, mv, rm, mkdir, chmod, more, man. Although I’ve been using nothing but Windows throughout my career – from Windows 95 to 2000 to XP – these commands have proven to be indispensible for those occasions when I need to remotely administer a Linux box.

Let’s go through them one by one.

You log in to a Linux server and all you get is a dollar sign and a cursor. The first thing you want to know is: where am I? So you want to print the working directory:

pwd

Then you want to list all the contents of the current directory in a long listing format:

ls -al

To get around, you change directory:

cd /another/directory

Then, to copy a file from one directory to another:

cp /some/directory/somefile.txt /another/directory

To move it instead:

mv /some/directory/somefile.txt /another/directory

There is no command to rename, you just move it:

mv oldname.txt newname.txt

To remove a file:

rm filename.txt

To remove a directory and its contents recursively:

rm -r dirname (use with extreme caution!)

To make a directory:

mkdir dirname

To change the mode of a file or directory to make it writeable by everyone:

chmod ugo+rwx file_or_directory

ugo+rwx means, for (user, group, others), add (read, write, execute) permissions. Use the minus sign instead of the plus sign to remove permissions. ugo and rwx can be used in any combination, e.g., go-w.

Finally, to get to know more about the contents of a file:

more filename.txt

Press space to scroll to the next page, and q to quit. (Note: less is better than more. With less, you could go both backwards and forwards.)

Finally: when in doubt, consult the manual!

man command

Update 13 February 2009

See also Commands that you must know in Linux… by dirn.name.

Moonlight: Microsoft Silverlight in Linux

moonlight

Need to view Microsoft Silverlight enabled sites, but you’re on Linux, and running Firefox as the web browser? Have no fear, Moonlight is here.

Moonlight is an open source implementation of Microsoft Silverlight for Unix or Linux platform.

The current release version is 1.0. All you have to do is, just go to their site, and install the plugin/add-on from your Firefox.

Enjoy!

Detect ISP Throttling with Google’s M-Lab

M-Lab
Need to test your Internet connection? Wonder if your ISP is truly capped or throttling your Torrent downloads? How to be sure if TMNET Streamyx (Malaysian ISP, if you’re wondering) really give it’s “best effort” speed? Get your answers via Measurement Lab (M-Lab) by Google.

Announcement were made from the Official Google Blog, introducing the measurement utility.

Measurement Lab (M-Lab) is an open platform for researchers to deploy Internet measurement tools. By enhancing Internet transparency, we aim to help sustain a healthy, innovative Internet.

Continue reading