Support » Fixing WordPress » An Unexpected HTTP Error occurred during the API request. ! how to fix it

  • am using 3.3 wordpress ! when i search any plugin i got the error

    An Unexpected HTTP Error occurred during the API request.
    Try again.

    any solution for that what i got all from searching is to edit http.php or class-http.php and change time limit but there is no text like i.e

    1) Login to your FTP server

    2) Open wp_include/http.php

    3) Look out for the 223rd line inside

    4) This is what you should be looking at: ‘timeout’ => apply_filters( ‘http_request_timeout’, 5),

    5) All you have to do is change the value “5” to “30”, the value is actually is the number of seconds before the server times out.

    6) This should resolve your problem.

    but i cant find these lines in my wordpress any solution please !

Viewing 15 replies - 16 through 30 (of 38 total)
  • Mediacadiet – Thank you, i was doing the same ^^ found it

    Ok Joecking’s method worked – changed the setting from 15 seconds to 60 seconds, however i still cannot search for any new themes. I’m assuming something needs to be modified at wp-admin/theme-install.php but i am not exactly sure. Please could someone check on it. Thanks

    When i try to import my old blog, i receive:

    Fatal error: Maximum execution time of 30 seconds exceeded in C:\inetpub\vhosts\\httpdocs\wp-includes\class-http.php on line 1106

    any ideas?

    I also noticed that my plugins aren’t reporting updated versions. For example, I deliberately installed an old version of my Easing Slider plugin yet WordPress isn’t reporting that a new one is available. I also tried using set_site_transient to reset the update_plugins transient.

    Also noticed that the wp_option related to this function ( ‘_site_transient_update_plugins’) only contains information on when it was last checked. No plugin slugs, version, id, or response on updated version. Suggests to me that the set_site_transient function is failing to access the API also.

    Bit of a pain. I think their may be a problem with their API at this current time. Probably just slow to respond to requests. I’d say they will have it sorted soon.

    I have a strange feeling that MatthewRuddy is correct… This is because even after increasing the timeout to 60, I can search for plugins but not install them… the server is painfully slow… Let us wait and hear from WordPress!

    I can’t even search for plugins, even with the code change you suggested.

    Thank you joecking… it worked for me:

    Edit file: (v.3.3)
    httpdocs > wp-admin > includes >plugin-install.php
    Around line 44 you will see:
    ‘timeout’ => 15,
    Increase 15 to 60.

    So far the plugins have installed fine.

    Ok everything seems to be back to normal, – so it was a problem from WP i suppose.

    I am having the same issue still… as well as others since the 3.3 update… I auto updated one of my blogs and the created a new one from scratch and both are having this issue (as well as being very slow)

    Please advise

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Please don’t edit core. You make us cry.

    Try, instead, re-updating WordPress. Failing that, DELETE the wp-admin folder and get a new copy from

    None of all of these suggestions in this post worked. I’m still getting API errors and RSS Error: WP HTTP Error: name lookup timed out errors in every place of my website that connects to wordpress.

    I installed this plug-in and it seemed to fix it all…

    No idea exactly what it does but worked for me

    Okay I did forget to mention that additionally to the API error I get lookup timed out. Would that help any?

    Sounding more and more like a network issue…

    I just ran a test… the issue lies within cURL. I’m going to search wordpress and see if there’s any solution to that. Reinstalling cURL did not help.

Viewing 15 replies - 16 through 30 (of 38 total)
  • The topic ‘An Unexpected HTTP Error occurred during the API request. ! how to fix it’ is closed to new replies.