CURL ERROR 7 could not establish a secure connection to

On a WordPress website hosted on a CentOS server, I got the following error on the header of the website.

Warning: An unexpected error occurred. Something may be wrong with or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to Please contact your server administrator.) in /var/www/html/wp-admin/includes/translation-install.php on line 68

On debugging the code, I found the code returned “CURL ERROR 7”. This happens when the curl connection is blocked. I was able to curl to the URL from the command line.


To error is due to SELinux. To fix the error, run the command

setsebool -P httpd_can_network_connect on

Or disable SELinux.

See SELinux, WordPress.

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *