Within “install plugins” I’m receiving an error stating “An Unexpected HTTP Error occurred during the API request.” When I do a plugin search it throws me back to my site’s 404 page. Any idea what would prevent my site from syncing properly with WordPress’s servers?
I added Hameedullah’s code to functions.php and recevied this returned
object(WP_Error)#21 (2) { ["errors"]=> array(1) { ["http_request_failed"]=> array(1) { [0]=> string(75) "Could not resolve host: api.wordpress.org; No data record of requested type" } } ["error_data"]=> array(0) { } }
Is this a curl transport issue?
You can use the following code to dump the HTTP Api response, will help you figure out the cause of error.
Example Output: