Resource icon

[RESOLVED] Error : “An Unexpected HTTP Error Occurred During The API Request”

If you are getting the error “An Unexpected HTTP Error Occurred During The API Request” frequently while accessing the wordpress dashboard then it means you have to increases the timeout limit. This is the perfect solution of this problem, you just need to make some changes in http.php file which is available in wp-includes folder. In this article we are going to explain the simplest way to solve this problem. Let’s see how to resolve this issue....

To avoid this error you just have to make changes in http.php file as explaind below:

Change from:

'timeout' => apply_filters( 'http_request_timeout', 5),
Change to:

'timeout' => apply_filters( 'http_request_timeout', 30),
In the above code lines we have increased the time limit from 5 to 30 seconds. We are getting this error just because of the page request is crossing the time limit. Sometimes it also may be happened due to installed plugins. So use limited number of plugins and update them regularly. To avoid these kinds of errors and also make your website more secure from malicious attack, you can optimize the wordpress website. You can also follow the article:
Bhawani Singh
First release
Last update
0.00 star(s) 0 ratings

More resources from Bhawani Singh