WordPress.org

Ready to get started?Download WordPress

Forums

An Unexpected HTTP Error occurred during the API request. Try again (9 posts)

  1. ziascreative
    Member
    Posted 3 years ago #

    Hello Team,
    After migration of new web server, i am continuously facing the problem,"when i click 'search plugin''popular''feature' and add plugin, then i saw a error "An Unexpected HTTP Error occurred during the API request. Try again", and i am facing the same problem in some contents of my dashboard ex: 'worpress development blog' 'incoming links' 'plugin' 'other wordpress news'.

    kindly help me in this regard, i will be very thankfull, if u consider my request.

    Regards
    Zia Ur Rehman

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    It sounds like your new host may have banned access to some server functionality.

  3. tophertopher
    Member
    Posted 3 years ago #

    Prior to WordPress 3.0
    Edit file http.php in directory wp-includes and find the http timeout setting. It is by default set to 5. Increase to 30 or 60.
    'timeout' => apply_filters( 'http_request_timeout', 60);

    WordPress 3.0 and after
    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))) );

  4. viter-z-bayraku
    Member
    Posted 3 years ago #

    for wordpress 3.1.1 dont working

  5. jacobarnott
    Member
    Posted 3 years ago #

    Same problem, Can't fins that in 3.2.1

  6. ashtreylil
    Member
    Posted 2 years ago #

    same problem, still not fixed.....i've seen so many threads with this same problem and most of them are closed but not solved. is this just something that cant be fixed? i can instal buddpress in the folder without it shutting down my site.....cant install via dashboard beacuse of this problem.

  7. ashtreylil
    Member
    Posted 2 years ago #

    if your host does not allow fopen() then you need to change servers, this seems to be the proble with byte hosting

  8. juliyanto
    Member
    Posted 2 years ago #

    Thanks tophertopher it worked with me in wordpress 3.2.1

    guys just follow the instruction from 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))) );

  9. brad29483
    Member
    Posted 2 years ago #

    Followed this procedure, it did not fix the issue with 3.2.1

Topic Closed

This topic has been closed to new replies.

About this Topic