Blog

We are a team of results-driven creative geniuses at PMGS Digital Agency that are enthusiastic about expanding your business and have the skills to do it.

Homeblogfix-secure-connection-error-wordpress

How to Fix Secure Connection Error in WordPress

How to Fix Secure Connection Error in WordPress

Do you encounter the WordPress issue “Unable to create secure connection”? Attempting to install or update a WordPress plugin or theme from the official WordPress.org directory frequently results in this error, which is a typical WordPress problem. We will explain why this mistake arises in this article, as well as how to quickly fix the secure connection error in WordPress.

What Leads to the WordPress “Unable to Establish Secure Connection” Error?

There is an update management system built into WordPress. This system checks for changes on a regular basis and displays notifications so you may install plugins and theme upgrades.

To check for updates or to install them, it must connect to the WordPress.org website. Your website might be unable to connect to the WordPress.org website due to a setup error on your WordPress hosting server.

A secure connection error will occur from this, and you will see a warning similar to this:

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 /home/username/public_html/wp-admin/includes/update.php on line 122

secure-connection-error

Let’s now look at an easy workaround for the WordPress secure connection problem.

Fixing Secure Connection Error in WordPress

The unexpected secure connection error in WordPress can be fixed in a number of different ways. Depending on your circumstance, you can attempt one of the following solutions.

Issues Associated with Hosting and Servers

The connection to WordPress.org is likely to time out if your shared hosting server is being DDoS attacked, which will result in the secure connection error.

You can then give it another shot after waiting for a while. You must contact the customer service department of your web hosting provider if the error continues.

Connection Problem with a Cloud or VPS Server

It is conceivable that your server is unable to connect to WordPress.org owing to some DNS difficulties if you are using cloud or VPS hosting.

You can then direct your server to the servers at WordPress.org. You must use SSH to connect to your server.

Secure Shell, or SSH, is an encrypted protocol that enables command-line tools to connect to your server.

While Mac and Linux users can use the terminal app, Windows users can utilize a program called PuTTy.

For the account with shell access to your hosting account, you will need login information. You can ask your web hosting server provider for this information or find it in your hosting account’s cPanel dashboard.

You can connect to your server in the terminal by doing what follows:

connect server

For the account with shell access to your hosting account, you will need login information. You can ask your web hosting server provider for this information or find it in your hosting account’s cPanel dashboard.

You can connect to your server in the terminal by doing what follows:

connect server

This will open a file, and at the bottom of the file you must add the following code:

connect server

Now that your changes have been saved, you can close the editor. Check your website to see whether the issue has been fixed.

Fixing the Localhost WordPress Secure Connection Error

If you are operating WordPress locally (localhost), it’s possible that the cURL extension for PHP isn’t enabled. In order to access WordPress.org for updates, you must have this extension.

Your computer’s php.ini file has to be edited. This file is typically found in your MAMP, Xampp, or WAMP folder’s PHP folder.

If you’re using a Windows computer, search for the line that says:

php.ini

Users of Mac and Linux would need to look for the following line:

php.ini

To activate the extension, you must now remove the semicolon from before the text. Save your php.ini file regularly.

Last but not least, remember to restart Apache for modifications to take effect.

Check the Firewall’s Open Ports.

The next step is to check your internet connection firewall if the cURL extension is correctly installed on your local server.

The firewall on your machine may be preventing outgoing connections from the local server to WordPress.org. If you’re using Windows, click the start button and type “Windows Firewall” into the search bar. Firewall settings can be found in System Preferences » Security & Privacy for Mac users.

You must add Apache to the list of approved programs on your firewall and enable both incoming and outgoing connections.

fire wall apache

For changes to take effect, Apache must be restarted.

If you think this article was useful to you, then stay tuned with us and subscribe to receive our blogs. If you wish to stay connected with us on social media, you can find us on Facebook, Instagram and LinkedIn