How to Fix Secure Connection Error in WordPress

0
Fix Secure Connection Error

Having a secure connection that is encrypted by one or more security protocols is essential to ensure the security of data flowing between two or more nodes. Without a secure connection, anyone can grab the personal data with the knowledge on how to do it.

A similar thing happens to the websites also. While visiting any random site, you might notice the message ‘Unable to establish secure connection error’. Right? I’ m sure, you had experience at least once.

So, in this guide, I will introduce you to this error, why this occurs and also tell how can you easily fix it.

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

Cause of the Error:

WordPress accompanies an inherent framework to oversee updates. This framework frequently checks for updates and show warnings for you to introduce plugin or theme updates.

In any case, it needs to associate with the WordPress.org site to check for updates or install them. Because of some misconfiguration on your WordPress facilitating server, your site may neglect to associate with WordPress.org site.

This will result in a secure connection error, and you will see an error message.

Now, let’s take a look at how you can easily fix secure connection error in WordPress:

There are multiple ways to fix the unexpected secure connection error in WordPress.

Fixing WordPress Secure Connection Error on Localhost:

On the off chance that you are running WordPress on your computer (localhost), at that point you might not have cURL extension empowered for PHP. This extension is required to get to WordPress.org for updates.

Enabling cURL extension on Windows
Enabling cURL extension on Windows
  • You need to edit the php.ini file on your computer. This file usually lies in the PHP folder of your Mamp, Xampp, or WAMP server.
  • If you are on Windows OS,
  • Search the following line in php.ini file:
;extension=php_curl.dll
  • If you are Mac or Linux user,

Search the following line:

;extension=curl.so

Now, remove the semicolon from the text. It will enable the extension. Save your file.

  • Restart your Apache server.
  • Check Open Ports in Firewall. Do check if cURL extension is properly installed on your local server.
  • Now, check your internet connection firewall. There may be a possibility that your firewall settings are blocking outgoing resources to the WordPress.org.

In this case,

  • For Windows, press the start button and search for Windows Firewall.
  • For MAC, find firewall settings in System Preferences » Security & Privacy.

Hosting and Server Related Issues:

  • If your shared hosting server is under DDoS attack, then it is likely that the connection to WordPress.org will timeout causing the secure connection error.
  • In such case, wait for few seconds, and try again. If the error persists, then you need to reach out to your web hosting company’s support team.

If you are on Cloud or VPS Server :

  • Point your server directly to WordPress.org servers.
  • Connect to your server using SSH (secure shell).
  • Windows users can use a tool called PuTTy whereas Mac / Linux users can use the terminal app.

In the terminal, you can connect to your server like this:

ssh [email protected]
  • Once connected, you need to run the following command:
sudo nano /etc/hosts
  • This will open a file. Now, paste the following code at the bottom:
66.155.40.202 api.wordpress.org
  • Save your changes.
  • Now, visit your website and check if this resolved the issue.

Conclusion:

I hope, you have successfully fixed Secure Connection Error by following this guide. You may like to read my ultimate guide to Harden WordPress Security.

LEAVE A REPLY

Please enter your comment!
Please enter your name here