Skip to main content

cURL error 60 on WordPress [resolved]

You are receiving a PHP Fatal error in WordPress cURL Error 60: SSL Certificate Problem? In this article I will show you how to fix it.

Often, cURL error 60: SSL certificate problem: unable to get local issuer certificate error occurs when we try to call the API with the secure https:// protocol in the request URL.

Why This Error Occurs?

Just go to your API call code and try to run request URL with only http:// protocol. You can’t see the error anymore because secure API calls require an SSL certificate.

This error occurs because the API call makes a secure connection request using the self-signed certificate. When it does not find a valid certificate, it throws an error.

It has a very very simple solution. We just need to download the certificate and set the path. Are you ready? Then let’s set up an SSL certificate step by step as below:

How To Resolve: cURL error 60?

  1. Download the “cacert.pem” free certificate file from the official website here: http://curl.haxx.se/docs/caextract.html
  2. Move the cacert.pem file in a reachable destination for the PHP. It is advisable to move the file for WAMP user to C:\wamp64\bin\php\cacert.pem, for XAMPP user to C:\xampp\php\extras\ssl\cacert.pem, for AMPPS user to C:\Program Files (x86)\Ampps\php\extras\ssl\cacert.pem
  3. Open your php.ini file and find for “curl.cainfo”. You will see something like the following:
1; curl.cainfo =
  1. Now, we need to add the path of the certificate to “curl.cainfo” and remove semicolon(;) as follow:
1curl.cainfo = "C:\wamp64\bin\php\cacert.pem"
  1. The very very most important step is to save and close your php.iniRestart your web server and try your request again.

Workaround if the solution above not work for WordPress

Open functions.php in your theme and add the scripts below:

add_filter('https_ssl_verify', '__return_false');

That’s all. Good luck for you!