While WordPress is often one of the more stable content management systems you can use, it does come with a few common errors. In some instances, you may come across a “secure connection” error in WordPress when it tries to update plugins or themes.
The truth is, a lot of things can stop WordPress from creating a secure connection with an external database. In this instance, we’re looking at an error when your site tries to connect with WordPress.org.
In this tutorial, I’m going to show you a few different methods you can try for fixing the secure connection error in WordPress. Hopefully, you’ll be able to remedy your issues with any one of these.
Why Connect to WordPress.org?
WordPress gets various bits of information from WordPress.org, its mother website. For example, it’s how the system knows when there is an update available for core files, plugins and themes. While you can still operate a WordPress site without this interaction, it’s simply a useful feature.
The secure connection error often happens when the website is unable to contact WordPress.org. Unfortunately, this means it can be problems with your server or even your own computer’s firewall if you’re using it to host your site.
Waiting Out the Error
WordPress errors can happen as the result of something affecting your hosting server. For instance, sites located on shared servers are often affected by what’s happening to another. If someone’s website is being bombarded by a DDoS attack, your site can be affected.
If everything checks out for your website, you may simply have to wait out the problem. Most web hosting companies will put an end to attacks such as DDoS as soon as possible, so it may only take a few minutes.
A high-density traffic can also cause latency, lag and various connection errors. This is when the lines from your website to WordPress.org are congested with traffic. There’s only so much bandwidth, and a faulty segment between the two systems can lead to “traffic jams.”
It’s kind of like waiting for an opening to get on a busy freeway.
Possible DNS Issues
Cloud and VPS hosting have potential to experience DNS issues when trying to connect to external sources. In this instance, you can use a secure shell like PuTTY to tell your site where exactly to look.
The following is under the assumption you have PuTTY and are already connected to your host.
After connecting, input this command:[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]sudo nano /etc/hosts[/ht_message]
A new file will open. Add this code to the bottom of the file:[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ]220.127.116.11 api.wordpress.org[/ht_message]
This line gives the website the exact IP address of WordPress.org, which bypasses DNS server errors in many cases.
Think of it like this, it gives the exact address of a property instead of simply saying, “Mom’s House.”
Save your changes and exit your editor. When you visit the website, the error may disappear. Otherwise, you may have something else going on with your connection.
Enabling cURL Extensions
If you have WordPress installed as a development environment or just on your own computer system, you might not have cURL extensions enabled. This prevents PHP from accessing WordPress.org when it comes to updates and other information.
Open the “php.ini” file on your computer system.
Using an editor, you’ll need to insert a line into the php.ini file. Most text editors can access “ini” files, for instance I often use Notepad on Windows to open them.
If You’re on Windows:
Look for this piece of code in the php.ini:
If You’re on Mac:
Look for this piece of code:
In either case, you need to remove the semicolon from the line.
Save the php.ini file.
Restart the Apache server on the computer.
Your site should now be able to access WordPress.org.
Checking for Open Ports
Having cURL extensions enabled isn’t the only way to prevent the secure connection error on a local install of WordPress. Sometimes firewalls can affect outbound connections as well.
In some instances, the Apache HTTP Server may be blocked or disabled in firewall settings.
Unfortunately, this means going through your own software, Windows Firewall or even your own router settings to make sure Apache is able to operate correctly.
For example, you can access the Windows Firewall by searching for it from your computer.
Make sure the “Apache HTTP Server” is enabled and the action is set to “Allow.”
If you had to make any changes to your firewall settings, you’ll need to restart the Apache server.
A very large portion of errors you come across are an easy fix. Unfortunately, sometimes they are caused by a myriad of issues which may not be under your control. If you come across problems like these and are unable to fix them, you can always contact customer support or do some research such as looking at WordPress.org help.
What kind of problems have you come across while using WordPress? How often do you browse WordPress.org’s website for plugins, themes or help forums?