简体   繁体   中英

Secure connection to WordPress.org error on GCloud VM with CentOS (LAMP)

I have this well known problem about a recently installed WordPress.org that has an error on any part that tries to connect to the WordPress.org servers (updating, installing plugins, insalling themes, etc).

Error message:

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.

I know that this sounds familiar. I've found hundreds of similar posts over the internet, but every single solution people give doesn't work. Some posts even have tens of completely different answers like "just do this" with only frustrated people that can't solve the problem with those (like me).

I've spent the whole day trying to fix it with no solution:( So, yes, I'm kind of almost hopless now. I'd really appreciate if someone can lend me a hand with this.

This is what I have:

  • A WordPress.org fresh install
  • MariaDB brand new database and user
  • Apache server ("httpd")
  • PHP 7.4
  • CentOS 8 in a GCloud VM micro-instance
  • A just installed LetsEncrypt certification

This is what I've tried:

  • Checked if cURL is installed
  • Checked that OpenSSL is installed
  • Manually added api.wordpress.org and downloads.wordpress.org IPs in my hosts file
  • Checked that my firewalls allow 80 and 443 ports traffic in and out (gcloud and CentOS iptables/firewalld)
  • Checked that ;extension=curl.so is present in my php.ini
  • Checked that the vhost is correct in the apache conf file
  • Checked that I can ping both WordPress URLs
  • Prooooobably I've tried some other things, but I cannot remember now (seriously, I'm into this for like 7 hours now)

If someone has a clue on how to solve this, I'd be really happy. I can send any other information, log, or anything that is needed. And, BTW, I started learning about admin and creating webservers a few weeks ago, using a CentOS netinstall in a local VM and using it as a simulation; I created the webserver, created a wordpress website, and everything went juuust fine... it's only this real VPS in gcloud that gave me this problem:(

Don't know if you solved your problem, if not, read that:

I've had the same pb and done all things you do. I run a up to date CentOS 8 with a fresh install of an up to date wordpress.

Answer
I found my solution here: An unexpected error occurred. Something may be wrong with WordPress.org

Open /etc/selinux/config and change the line SELINUX=enforcing to SELINUX=permissive and reboot.

so simple... My problem is solved now. I removed all other changed I've done (wp_config.php, cURL.php, hosts, ...)

Thanks you Abu Bakar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM