Symptoms
- While trying to find a theme in WordPress at Domains > example.com > Log in to the WordPress admin panel > Appearance > Themes or in Domains > example.com > Log in to the WordPress admin panel > Plugins > Add New, the following error appears:
An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums
- If themes are searched in Domains > example.com > WordPress > Themes, nothing is shown in the results:
- The following error is shown in the WordPress admin panel in Domains > example.com > Log in to WordPress:
Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /var/www/vhosts/example.com/httpdocs/wp-includes/update.php on line 530
- The server retrieves correct IP address of the domain api.wordpress.org:
# dig +short api.wordpress.org
198.143.164.251
Cause
Unclear.
Resolution
- Connect to the server via SSH;
- Run this command to add api.wordpress.org to the
/etc/hosts
file:# echo “198.143.164.251 api.wordpress.org” >> /etc/hosts