An Unexpected HTTP Error occurred during the API request – Word press error

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 .


Reason

Word press sets a timeout limit for every request. If that limit crosses for certain request it pops up the error

Solution


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

Step 1


Go to

wp-includes and edit http.php

Step 2

find

'timeout' => apply_filters( 'http_request_timeout', 5);

and replace it with

'timeout' => apply_filters( 'http_request_timeout', 30);

Step 3

Save Changes and install again

Hope you have fixed the error . Happy blogging 🙂



Last Update : July 06, 2010 10:50pm

Step 1


Go to

wp-includes and edit http.php [ < wordpress 3.0 ] wp-includes and edit class-http.php [ wordpress 3.0 ]

Share on Facebook



Comments (41)

  1. Robin June 18, 2010
  2. Kannan Sanjeevan June 18, 2010
  3. Mia June 18, 2010
  4. Leland July 6, 2010
  5. Kannan Sanjeevan July 6, 2010
  6. Marty July 12, 2010
  7. Kannan Sanjeevan July 12, 2010
  8. Stephen July 13, 2010
  9. Bradford August 8, 2010
  10. Alicia Taylor September 9, 2010
  11. Kannan Sanjeevan September 10, 2010
  12. all is well November 19, 2010
  13. RP December 26, 2010
  14. Kannan Sanjeevan December 27, 2010
  15. Daniel January 1, 2011
  16. Kannan Sanjeevan January 1, 2011
  17. Ummi Hanie January 18, 2011
  18. Topher March 22, 2011
  19. Barry Carlyon March 23, 2011
  20. Aneeza Mubbashir April 7, 2011
  21. Bohdan April 17, 2011
  22. Nurul Imam May 18, 2011
  23. Matt May 24, 2011
  24. Rizve Joarde June 22, 2011
  25. Linards June 26, 2011
  26. margaret July 13, 2011
  27. manusabu August 1, 2011
  28. Krlos R August 13, 2011
  29. Rajaji October 13, 2011
  30. George October 13, 2011
  31. Erica October 13, 2011
  32. Games December 21, 2011
  33. Wpuser December 21, 2011
  34. murtaza kanpurwala February 20, 2012
  35. taguer February 24, 2012
  36. Aliang February 27, 2012
  37. Aliang February 27, 2012
  38. Risko April 27, 2012
  39. Peter May 21, 2012
  40. HuMaN-BiEnG June 17, 2012

Leave a Reply