How to Fix cURL error 60: SSL certificate problem: unable to get local issuer certificate (The Definitive Solution)

“cURL error 60: SSL certificate problem: unable to get local issuer certificate” is a common error that occurs when your website tries to communicate with an external API via HTTPS and the SSL certificate on the server is not verified or properly configured. Although this error can be seen on any server you are more likely to see this issue on a localhost environment running on wampp/xampp.

How to fix cURL error 60: SSL certificate problem: unable to get local issuer certificate on your web server

Contact your web host to make sure that the SSL certificate is properly configured on the server. As of PHP 5.6 if the certificate is not verified you will also get a warning notice on your website.

How to fix cURL error 60: SSL certificate problem: unable to get local issuer certificate on localhost

1. Download the cacert.pem file from the official cURL website here.

2. Go the directory where you have installed xampp and put it in the ssl folder. For example,


C:\xampp\php\extras\ssl\cacert.pem

D:\program\xampp\php\extras\ssl\cacert.pem

3. Open your php.ini file and search for “curl.cainfo”.

4. Once you have found it, specify the path to the .pem file in the curl.cainfo section. For example,


curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem"

The line could be commented out with a semicolon right before curl.cainfo. So make sure to uncomment it and replace ;curl.cainfo = with the line above.

5. Restart Apache so the new changes take effect on your localhost server.

That should fix the cURL error 60 issue on your web server. If you have any other suggestions for fixing this issue feel free to share it in the comments.

Disclosure: This page may contain affiliate links. If you follow one of those affiliate links and purchase something it will provide me with a little bit of a commission. This costs you nothing extra but helps maintain my site, free plugins, and themes. So I thank you for your support.

4 thoughts on “How to Fix cURL error 60: SSL certificate problem: unable to get local issuer certificate (The Definitive Solution)”

  1. thank you for sharing it
    so informative an article

    Reply
  2. Yessss, it worked 🙂 Thx a lot! <3

    Reply
  3. Superb article, i installed a SMTP plugin and I was not able to configure it, I was getting this error and with the help of this article I was able to successfully resolve the issue.

    Reply
  4. In case of this error is associated with the hosted website. i.e on non-cPanel website, the solution can be obtained by combining certificate & CA bundle while installing SSl manually.

    Reply

Leave a Comment