Support » How-To and Troubleshooting » An Unexpected HTTP Error occurred during the API request. ! how to fix it

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 - 1 through 15 (of 38 total)
  • esmi


    Forum Moderator

    Never edit WordPress core files! This may be a server issue. Try asking your hosts for assistance.

    I have this issue as well. Never made any changes to the WordPress core files. I have no plugins installed using default theme. This never occurred in 3.2.1.

    I also has this problem, I am using the default theme. I am using 3.3 and previously I had no problem until I updated to 3.3

    Hi Guys this is what I found and it is working for wordpress 3.3

    Thanks tophertopher it worked with me in wordpress 3.2.1

    Thanks to Member tophertopher:

    Edit file plugin-install.php
    in directory wp-admin/includes
    and find the timeout setting. It is by default set to 15. Increase to 60.
    $request = wp_remote_post(‘http://api.wordpress.org/plugins/info/1.0/’, array( ‘timeout’ => 60, ‘body’ => array(‘action’ => $action, ‘request’ => serialize($args))) );

    NB: you will not find this in http.php file as this is version 3.3
    Hope it works for you guys

    I am having also this problem, I don’t know what to do, I tried to change the timeout but nothing good happened.

    I am using WP 3.3.

    Hi, i am experiencing this problem.

    I do not find that line in http.php

    I have the spanish version installed.

    I prefer not to change anything but, is there any official solution?

    my isp says it is my problem.

    hi In2itioN, did you try what I have given above? This is differen, try and see..

    I also do not have “plugin-install.php” file in the spanish version.

    joecking WOW It worked !!!!!!

    Thx a LOT!!!!!!

    I think everyone is facing this problem. I have 2 different servers where i host my websites, i tried a fresh installation on my second server, on a new domain, and i still faced the error. It just started today, something wrong from wordpress?

    ok, i am sorry. At last, i found it and it worked.

    thanks a lot

    mediacadiet – i can’t find plugin-install.php where did you find it?

    Here the same using WP 3.3. Before update never had problems before.
    After editing the core file as joecking suggested it’s still not working good. Finding new plugins is working now but installing them gives me the http api error.

    Also the page: http://api.wordpress.org/plugins/info/1.0/
    is taking too way long to answer or i get an 504 Gateway Time-out…

    Hope WP will fix this soon.

    mohamedali, i was looking in:

    wp-includes. That is wrong.

    It is in:

    wp-admin/includes This is ok.

    Just wondering – am i the only one facing the same issue when searching for new themes? P.s this has also only started from today. And for those of you feeling it’s due to the update – I had not updated my WordPress from the previous version. I faced this API error this morning and I thought maybe its due to me not updating my wordpress – i updated it to 3.3 and yes it still gives me the error

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