Fix the error of not installing the new wordpress Plugin

Could not load plugin list from wordpress.org to install a new one. There is only one line of error messages like this:

An unexpected error occurred. Something could be wrong with WordPress.org or this host’s configuration. If you continue to have problems, please try the support forums. (WordPress cannot establish a secure connection with WordPress.org. Please contact your server administrator.) In /public_html/wp-admin/includes/update.php on line 182

This is a common WordPress error and usually happens when you are trying to install or update a WordPress plugin or theme from the official WordPress.org directory.

If your shared hosting server is under a DDoS attack, then it’s possible that connecting to WordPress.org will time out causing a secure connection error.

Notifications from iThemes Security

Shared servers, hosting

In that case, you can wait a few minutes and try again. If the error persists, then you need to contact the support team of the web hosting company.

Server vps, cloud

If you have vps, access SSH and use the following command to open the hosts file:

sudo nano /etc/hosts

This will open a file, and you’ll need to add the following code at the end of the file:

198.143.164.251 api.wordpress.org

You can now save your changes and exit the editor. Visit your website to see if the error is resolved.

Note: Use win cmd to check ip

ping api.wordpress.org

Result:

Pinging api.wordpress.org [198.143.164.251] with 32 bytes of data:
Reply from 198.143.164.251: bytes=32 time=205ms TTL=54
Reply from 198.143.164.251: bytes=32 time=204ms TTL=54
Reply from 198.143.164.251: bytes=32 time=204ms TTL=54
Reply from 198.143.164.251: bytes=32 time=205ms TTL=54

If the returned IP is different from the one you added in the host file, replace it with the new ip in the host file.

DATVNN.COM
Logo