WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Devine H
    Member
    Posted 2 years ago #

    Whenever i search plugins or themes this msg appeared."An Unexpected HTTP Error occurred during the API request."please help me

  2. ChristiNi
    Member
    Posted 2 years ago #

    Hi Devine H,

    Is this issue occurring with a fresh install of WordPress, or an existing one?

    I've searched around, and it may be a theme that is causing this issue. I If you're not already using the 2010/2011 theme, I recommend switching to that theme and testing the plugin feature again.

    If that does not help, it may be a problem with a plugin. You can disable all of your plugins and then test the search feature again.

  3. lvimagery
    Member
    Posted 2 years ago #

    I'm getting the same problem when i search for plugins. Default theme, and no plugins activated.

  4. cornerofart
    Member
    Posted 2 years ago #

  5. lvimagery
    Member
    Posted 2 years ago #

    Thanks so much! That fixed it. I saw an older post that has similar directions, but since WordPress has a newer version, the method listed in that older post references a line of code that no longer exists. If it wasn't for you, I would never have found where to extend the timeout.

  6. webmaster in texas
    Member
    Posted 1 year ago #

    Could you share with the rest of us, since that account has been suspended what you did?

  7. lvimagery
    Member
    Posted 1 year ago #

    I'm sorry, I wish I could remember. It was a while ago, and I almost never try to mess with code like that. I'm surprised I was able to do that much TBH...

    Looks like if I ever have a problem like that, and find a solution, I need to just copy it over to the current thread in case links die...

  8. webmaster in texas
    Member
    Posted 1 year ago #

    thanks

  9. ChristiNi
    Member
    Posted 1 year ago #

    Hi webmaster in texas,

    I found some instructions that should fix that error:

    Find the class-http.php file inside your wp-includes folder. Look for this line:

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

    The time is declared in seconds, so edit that accordingly, for instance:

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

    That will increase your time limit to 30 seconds instead of 5 seconds.

    The reason this is usually an error that occurs because of plugins or themes is that an improperly optimized plugin or theme will cross the threshold of the default http request timeout.

    Hope this helps!

Topic Closed

This topic has been closed to new replies.

About this Topic