How to Fix “Unable to get Local Issuer SSL Certificate” Error eBuilderz featured image

SSL is the abbreviation of Secure Socket Layers, which protects browser server communication with robust encryption. RapidSSL and multiple other SSL certificate brands secure all your sensitive information like bank account numbers, social security numbers, credit card

details, passwords, etc. and boost SEO rankings.  Its encryption security is ideal for eCommerce Business stores, securing online transactions, and sensitive data uploaded by prospective buyers. But SSL errors sometimes disrupt their efficiency, and hence they need to be fixed immediately for their smooth functioning.

About SSL Errors

Errors can be terrifying and sometimes confusing to fix, but persistent efforts should be made to fix the error, rather than eliminating the root of the error. There are multiple types of SSL errors, Name Mismatch Error, Mixed Content Bug, Expired SSL Certificate Error, etc. Many more, which occur due to various reasons.

ssl certificate error-About SSL Errors

“Unable to get Local Issuer Certificate” is also one such SSL error, which generally occurs when the user is migrating the site from HTTP to HTTPS. Many business owners resort to simple ways to solve errors, wherein few of them, uninstall the SSL certificate (root cause) for resolving the same. No matter what the error complexities prevail, never uninstall your SSL certificate to resolve the error quickly.

Since SSL encryption security saves your site and information from various threat attacks like phishing and man-in-middle attacks and protects confidential information, fixing the above error seems to be the best decision to resolve the error. Before fixing the error, let’s have a clear view as to why this error occurs.

See More What is a .NET Developer? Learn the Facts, Skills & Duties

Reason for “Unable To Get Local Issuer Certificate” Error

The main motto of the SSL certificate is to confirm a website’s authentication and secure the information passed between the server and browser.  Sometimes, while making a cURL request to an HTTPS site, you need to share your SSL certificate for identity verification. While doing so, you may come across the “Unable to Get Local Issuer Certificate” error.

ssl certificate error-Unable To Get Local Issuer Certificate

This error indicates that the root certificate is not functioning correctly when a client has requested an HTTPS source. Though uncommon, this error can be fixed by taking specific measures. Let’s check the solutions for Unable to Get Local Issuer Certificate Problem.

Solutions to fix “Unable To Get Local Issuer Certificate” Error

Apart from the main reason, multiple reasons like software interference in SSL/TLS certificate, Git application, etc. may also cause this error. It is wise to identify the root cause of the error, so it becomes easier to fix it.

Unidentified Self Signed SSL Certificate

A self-signed certificate is not signed by the Certificate Authority (CA); the website owners sign and issue the certificate for their site and avail HTTPS security. Many times the OS (operating system) and browser are unable to identify this self – signed certificate, and hence they face this glitch.

The best solution is to purchase the SSL certificate from a trustworthy CA and install the same.

  • For .PEM Format:
  • Change Php.ini (Keep SSL)
  • Go to and download cacert.pem.
  • Then, copy cacert.pem into your version of OpenSSL/Zend.


  • Later, open your php.ini file and edit the CURL configuration by adding cainfo = ‘/usr/local/openssl-0.9.8/certs/cacert.pem.
  • Restart your PHP and verify whether the CURL can read HTTPS URL or not.

No Change in PHP.Ini (Keep SSL)

Enter the code stated below

$ch = curl_init();

$certificate_location = ‘/usr/local/openssl-0.9.8/certs/cacert.pem’;

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $certificate_location);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $certificate_location);

Disable SSL (Not advisable)

Enter the code stated below

$ch = curl_init();

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

Try to fix this error using each solution stated above, since any one of the b & c solutions mentioned above will help you fix the error.

Also, You Can Read How to Easily Track Events in WordPress with Google Analytics

For .CRT Format

Go for the SSL bundle – ca-bundle.crt

You can acquire the SSL bundle by copying the below URL content on your server.

Later save the content.


Change PHP.ini

Verify your PHP.ini file location to make modifications. Multiple servers have multiple locations of PHP.ini file, so locate the file to make the necessary changes. Generally, this file is located in /etc. Directory.

After locating the file, add the below mentioned lines:

[CA Certs]



Important: Path should match the file location.

Restart PHP

After completing the above steps, restart PHP. Different servers have different ways to restart PHP. For more information on the same, click here. After restarting PHP, re-check your CURL request and confirm whether the error is resolved or not.

For Git Users

Many Git users also face ‘SSL certificate problem: Unable to get local issuer certificate’ or the ‘git SSL certificate problem: Unable to get local issuer certificate’ error.

Below are the two ways to fix this problem.

Permanent Fix

Being a Git user, you need to locate the CA bundle and inform Git about the same.

To help Git find the location for the same, type the below command:

git config –system Http.sslCAPath /absolute/path/to/git/certificates.

Temporary Fix

To get rid of the error temporarily, disable the verification of the SSL certificate. Though keeping in mind web security, this option is not preferred. For temporarily fixing the ‘SSL certificate problem: Unable to get local issuer certificate’ error, use the below command to disable the verification of your SSL certificate.

git config –global Http.sslVerify false

If none of the 2 Git solutions work, reinstall Git and ensure that the CA, including the root certificate, is present.

Check Out the Quick Video Review On Resolve SSL Certificate Error

Source: MDTechVideos

Wrapping Up

SSL robust encryption security is reliable protection against cyber-attacks. Hence, I would like to caution you against the uninstalling SSL certificate for quick error resolve, as it may weaken your site’s security. I am positive that the above solutions mentioned in this guide will help you fix “Unable to get local issuer certificate” error and ensure smooth navigation.

Happy Fixing!!

Here are a few more topics that you shouldn’t miss:
How to Add Killer Google Analytics in WooCommerce Now
Best Crypto Exchanges and Payment Solutions
How to Preview Before Submit in a Multi-Paged WordPress Form

Like this post? Don’t forget to share

Recommended Posts

No comment yet, add your voice below!

Add a Comment

Your email address will not be published. Required fields are marked *