Fix for self-signed certificate issue with MailChimp plugin (ERROR admin@validatePostApiKey :: 500 :: CURL error :: SSL certificate problem: self signed certificate in certificate chain

Issue Summary

Attempting to connect to a plugin API such as MailChimp will fail with the error:

ERROR admin@validatePostApiKey :: 500 :: CURL error :: SSL certificate problem: self signed certificate in certificate chain

I found a fix and I’m sharing here in case someone in the future faces the same issue.

System Details

Local version 5.9.8+5191
OS: Windows 10 Pro x64 version 1909 build 18363.1198
PHP 8
WP 5.6

[ moderator note – I moved the inline solution to a reply and marked it as solved so that our forum software knows! Beep Boop.]

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Fix

Edit your site’s php.ini.hbs file located at C:\Users\your_user\Local Sites\your_site\conf\php\.

Add the following to the file:

[curl]
curl.cainfo = "C:\Users\avizm\Local Sites\lojamisturafeminina\app\public\wp-includes\certificates\ca-bundle.crt"

The curl.cainfo is pointing to the certificate file. If you don’t have one at the path indicated above, you can change the path to point to the correct location. Alternatively, you can download a certificate from https://curl.haxx.se/docs/caextract.html (direct link) and paste it in the folder indicated by the above path and point the curl.cainfo to the downloaded file. Note that the file might have a different name, don’t forget to rename it if necessary.