WordPress: Error During API Request

Have you seen this error?

  • Error: An Unexpected HTTP Error Occurred During the API Request

Usually this timeout error can be fixed by editing your http.php file, which resides in your "wp-includes" folder.

Editing the http.php File

  1. In cPanel, open the File Manager icon.
  2. Find your WordPress installation directory.
  3. Open the "wp-includes" folder.
  4. Find the http.php folder and right click it.
  5. Select "Edit" from the context menu that pops up.
  6. Find the line that looks like this:
    'timeout' => apply_filters( 'http_request_timeout', 5),
  7. Make the line look like this:
    'timeout' => apply_filters( 'http_request_timeout', 30),
  8. Select "Save Changes" in the top right corner.

 


  • 31 Users Found This Useful
Was this answer helpful?

Related Articles

How to make WordPress show as Secure in Google Chrome

In order to make your WordPress installation show as Secure in Google Chrome, you'll need ensure...

Temporary URLs in WordPress

To use your Temporary URL with a WordPress installation, you will need to edit the Windows Hosts...

WordPress Optimization

Optimizing your scripts can keep your server and website loading quickly for your visitors. These...

Changing the WordPress Directory

You may want to change the location of your WordPress blog after you have installed it. For...

Fixing the Internal Server Error in WordPress

There are a few possible causes of the 500 Internal Server Error. It is not always due to...