Friday, February 18, 2011

Fix An Unexpected HTTP Error occurred during the API request Wordpress Error

This error can happen either your default timeout limit is not enough or.
If you're developing on localhost, may be your firewall blocks the apache http.exe server.

If your site is hosted on a web server, and you see the error message 'An Unexpected HTTP Error occurred during the API request' after requesting a page on WordPress Admin Dashboard and you are getting this error frequently on your dashboard, then it means you have to increase the wordPress timeout limit for every request. To do that

  1. Open your FTP Client software
  2. locate the file "class-http.php" inside "wp-includes" folder.
  3. And find the code "'timeout' => apply_filters( 'http_request_timeout', 5)" and change the timeout limit to 30. (5 --> 10)
If you're developing on localhost then, and if you see this error mean your server software being blocked by the firewall or you dont have an active internet connection. To fix this,

  1. Make sure your connection is active (probably you checked already)
  2. And make sure server software in not blocked. In my case, it is httpd.exe (Apache HTTP Server) This is only required if you're accessing to the internet for something like plugin installation and, etc....

1 comments:

Admission Jankari said...

Nice, its amazingly help full, thanks!!!

Post a Comment