Did u come across the error ” An Unexpected HTTP Error occurred during the API request ” while installing a plugin or doing some task in word press admin dashboard like create a post, editing a post .I hope you fix it after reading this post.
Today when i tried to install a SYNTAX HIGHLIGHTER plugin using the default word press plugins search . I came across a 500 internal server error after hitting INSTALL button. I dint understand anything so i refreshed my page and hit INSTALL button again .This time it popped up a different error ” An Unexpected HTTP Error occurred during the API request ”
As usual google comes to the rescue . I found a solution for this problem at clickonf5 where he clearly explained why this error occurs and even posted a solution .
Word press sets a timeout limit for every request. If that limit crosses for certain request it pops up the error
In order to fix the error we need to increase the time out limit.Follow the below steps on how to increase time out limit
wp-includes and edit http.php
'timeout' => apply_filters( 'http_request_timeout', 5);
and replace it with
'timeout' => apply_filters( 'http_request_timeout', 30);
Save Changes and install again
Hope you have fixed the error . Happy blogging 🙂
Last Update : July 06, 2010 10:50pm
wp-includes and edit http.php [ < wordpress 3.0 ] wp-includes and edit class-http.php [ wordpress 3.0 ]