Deprecated: The PSR-0 `Requests_...` class names in the Request library are deprecated. Switch to the PSR-4 `WpOrg\Requests\...` class names at your earliest convenience. in /home/varun/public_html/wp-includes/class-requests.php on line 24
How to Fix Secure Connection Error in WordPress? - Tech Banker

How to Fix Secure Connection Error in WordPress?

How to Fix Secure Connection Error in WordPress?

How to Fix Secure Connection Error in WordPress?

Do you want to fix the “Secure Connection Error” in WordPress? But before that, it’s necessary to know what does it mean and why this error occurs?

What is the Cause of Secure Connection Error?

WordPress is an open source platform comes with a built-in system to maintain updates. So this system automatically checks updates as well as notification when a user installed any plugins or themes.

During the update process, the server needs to connect to the WordPress.org properly. But if in any case, the server cannot able to connect to wordpress.org server, then this error occurs on your screen.

Error Message

Methods for Fixing Secure Connection Error

1. Enable cURL Extension in PHP

2. Change the open ports settings in the Firewall

3. Check shared hosting server updates

4. VPS or cloud server connectivity issue

Method 1) Enable cURL Extension in PHP

As we know, WordPress relies on PHP and it requires an extension to perform a function properly. So when a user using WordPress on your PC then cURL extension is needed to change for getting updates in wordpress.org.

For edit the curl extension file:

  • Go to Mamp, Xampp, or WAMP folder.
  • Then open the php.ini file in your text editor.

Search the following line on window system:

;extension=php_curl.dll

For Mac and Linux user, search this line:

;extension=curl.so

Now, remove the semicolon from the code and save the file.

Method 2) Change the Open Ports Settings in the Firewall

If you have curl extension correctly installed on the computer then, the next step is to check the firewall setting.

In most of the cases, the firewall in your PC blocks the outgoing connection from the local server to the wordpress.org. By default, the web server Apache or Nginx uses 80 or 8080 ports for HTTP and 433 ports for HTTPS.

So check that the ports used by the web server in your PC are not blocked by any firewall setting.

To configure your firewall setting, in case of windows:

Select Inbound Rules

Finally, set the apache server to allow programs to connect to wordpress.org.

For Mac Users:

1. Open the System Preferences >> Security and Privacy.

2. Click the Firewall tab.

Now add apache to the allowed program and allows both incoming and outgoing connection.

For Linux User:

1. Go to sshd configuration file.

sudo nano /etc/ssh/sshd_config

2. Set your new port number
Port {your-new-port-number}

3. Reload the ssh
reload ssh

4. While coonecting ssh to server ,specify your port
ssh {username}@{your-server-ip-address} -i {rsa identity file} -p {your-new-port-number}

5. Take a temporary backup
sudo ufw allow from {your-ip-address}

6. Now allow your new SSH port, HTTP( port 80)sudo ufw allow {your-new-SSH-port-number}
sudo ufw allow 80

7. Finally, enable the firewall
sudo ufw enable

Method 3) Check Shared Hosting Server Updates

Check whether your sharing hosting server is under a DDoS attack or not. If yes, so it is likely that the connection to wordpress.org will timeout.

In such case, wait for sometimes and retry. If the secure connection error is still there, contact your hosting support team to solve the problem.

Method 4) VPS or Cloud Server Connectivity Issue

Similarly, like shared hosting, if you are using cloud or VPS hosting. Then it is sure that connection to the WordPress.org will timeout due to the DNS problem.

In that case, follow these steps:

1. Firstly, point your server directly to WordPress.org server.

2. Next, use SSH to connect to your cloud server or VPS server.

The window user can use a tool PUTTY while the Mac/Linux user use the terminal app.

1. Open the terminal, and connect to the server by the next command:
ssh username@example.com

Note: Always change username with your “username” and “example.com” with your domain name.

2. After connected, run the next commands:
sudo nano /etc/hosts

3. Next, a new file will open and add the code at the end of the file:
66.155.40.202 api.wordpress.org

Finally, save the changes and check your website if the secure connection error is solved or not.

That’s all I hope this article will help to know that how to fix secure connection error in WordPress.

Scroll to Top
Scroll to Top