Call Us: +90 850 532 5 260 Submit Ticket   Login
How to Fix “Unable to Establish a Secure Connection” Error

How to Fix “Unable to Establish a Secure Connection” Error

Solution to Secure Connection Failed Error

The 'Unable to Establish Secure Connection' error is one of the biggest and most common errors experienced on WordPress sites.

This problem can be easily solved if you have full access to your server. However, do not forget that this error may occur for more than one reason. For this reason, you should first identify the problem completely by trial and error at least a few times and then work on a solution.

What is the Secure Connection Unable Error?

This error in WordPress is usually a problem that occurs when installing themes or functional plugins. When doing this type of operation, you will receive an error like 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”

This error briefly describes an unexpected problem, just like Windows errors. Therefore, although you are faced with a difficult situation, it tells you both the error and how to find a solution. However, the solution explained here is unnecessary and will only tire you out.

So what exactly could be causing this error?

  • Your website may be overloaded!

Generally, individuals using shared hosting cannot fully perform WordPress functions and functions due to excessive traffic and this may cause an error.

  • Incorrect Configuration Settings for the Server

Due to some errors you have implemented on your server, your site may be redirecting to another site, when it should be redirecting to wordpress.org.

  • Firewall May Be Causing This

Firewalls are generally a system that prevents damage to your site by blocking malicious connections. However, some firewall systems that are much more sensitive can open the door to this type of problem by blocking necessary redirects and connections.

  • Your Website May Not Be Able to Access Necessary Files

Your website needs to run a command line called cURL to access files that will be useful to it from a remote connection. However, sometimes it cannot find the cURL command and cannot work stably by finding the necessary files, which can again cause a 'Secure Connection Problem'.

How to Fix Secure Connection Unable Error?

Before we talk about the ways to solve this problem, you need to make sure that you are using Shared hosting. If you are using a shared hosting, none of the operations we will mention below will solve your problem. Therefore, the best thing you can do is to contact your hosting provider.

 

1 – Update Your Server Hosts Files

You can use SSH, or Secure Shell Access, to connect to your server. If you are a Windows user, you can also use PuTTy. When we talk about the solution, we will explain it through PuTTy.

  • Install and run PuTTy
  • Set your connection type to SSH
  • Enter the full address provided by your host
  • Log in with your administrator credentials from the screen that appears.
  • 'sudo nano /etc/hosts' Run the command. This command will open the nano editor and you will be able to access your hosts file.
  • You can ensure correct WordPress connection mapping by adding this line with the Nano editor: '6.155.40.202 api.wordpress.org'.
  • If this does not lead you to the correct solution to the problem, you can move on to the second step.

2 – Check if the cURL Extension for PHP is Active

Since WordPress primarily works with PHP, the cURL extension is very important. PHP uses the cURL extension to load and update the necessary plugins and themes. Therefore, if it does not work correctly, you may receive a secure connection cannot be established error.

  • sudo nano /etc/php.ini Run the command via SSH.
  • ';extension=php_curl.dll' Search the line
  • If you don't see this line, add it
  • If this does not resolve the issue, you can proceed to Step 3.

3 – Check if your firewall is working properly

You should check if your firewall is blocking your connections. If necessary and important connections are blocked and therefore the firewall is not working properly, you may receive the error "Secure connection cannot be established".

You can request a user manual from your server or hosting provider to review your firewall settings and discover how to adjust them.

After all this, NettaCompany has specially configured WordPress WordPress Hosting By purchasing the package, you can host your WordPress site on secure and fully compatible servers without any problems.

Young Guest Writer
Cagdas Caner Kocak

About the Author

Leave a Reply

en_US