WordPress: Error During API Request Print

  • 31

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.

 



Was this answer helpful?

« Back