An Unexpected HTTP Error occurred during the API request.

I recently configured a VPS with WHM and Cpanel installed. I created an account and installed wordpress on that account. However, when I tried to install new themes or plugins I ran into the following error message:

“An Unexpected HTTP Error occurred during the API request.”

I googled and searched and found lots of useless advice such as changing timeout limit in wordpress configuration or playing around with different transport modes in core files. Turns out the problem was all me and how I had configured the resolvers in WHM. I had cleared out the default ip addresses and entered my host’s internal nameservers. After changing resolvers to Google’s public DNS IP addresses in the whm backend it all started working properly.

Google’s Public DNS ip addresses:
8.8.8.8
8.8.4.4

Others ip addresses that can be used are the Open DNS ones:
208.67.222.222
208.67.220.220

The best thing would probably have been to leave the default values as they were (presumably provided by the IPS of my host). Lesson learned.

Comments are closed.