Symptoms
WordPress update or its plugin/theme installation fails with the following error:
Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server configuration. cURL error 28: Resolving timed out after 3512 millisecond
Trying to reach the
WordPress.orgwebsite takes too long:# time wget WordPress.org
real 0m5.180s
user 0m0.020s
sys 0m0.021sThe following error can be found in the
/var/log/plesk/panel.logfile:An unexpected error occurred.
Something may be wrong with WordPress.org or this server’s configuration.Not possible to update WordPress to latest version, showing as if it was already running on latest one.
When attempting to upgrade WordPress version, the following can be seen:
Warning: Unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>. (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 155 Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration.
Some of the WordPress instances may be shown as Quarantined or Broken in the WordPressToolkit.
Cause
The configured name server in the /etc/resolv.conf file is answering in more than 3.5 seconds.
Resolution
Resolve the issue with the nameserver or switch to another faster nameserver, e.g. to the Google:
Connect to the server via SSH.
Open the
/etc/resolv.conffile via any text editor and modify the nameserver directive:Before:
nameserver 203.0.113.2
After:
nameserver 8.8.8.8