Fix WordPress / IIS Unable To Get Local Issuer Certificate Error

SSL certificate problem: unable to get local issuer certificate” is an error message WordPress kept presenting to me when i was trying to integrate my Instagram / Twitter feed in to this blog. The good news is the fix is really easy, once you know how!

Basically the problem was a PHP configuration issue on my server, i needed to have a list of up to date public Certificate Authorities defined in my php.ini file.

I found a list of public Certificate Authorities that were extracted from Mozilla’s root certificates file, these are used in the FireFox webbrowser.

This list contained the certificates in PEM format, therefore could be directly used with curl / libcurl / php_curl, or with an Apache+mod_ssl webserver for SSL client authentication.

How to fix the unable to get local issuer certificate problem:

  1. Downloaded the cacert.pem (mirror) which has been extracted from Mozilla’s root certificates file
  2. Opened your PHP.ini file, the location of this will vary depending on your configuration.
  3. Then added the following line: curl.cainfo=C:\inetpub\cacert.pem

Remember to change C:\inetpub\ to the path of your cacert.pem file.

As my webserver is IIS i placed the cacert.pem in C:\inetpub so IIS had access to it.

After the PHP configuration has been updated re-start your webserver, you should then no longer get errors such as “SSL certificate problem: unable to get local issuer certificate”

A simple fix once you know how.

Matt Hill

Matt Hill is in his mid 20′s and has a passion for technology. Matt studied Computer and Network Administration at University and currently works as an IT Administrator for a company based in his home town.

3 Comments

  1. Karsten Madsen   •  

    I don’t think this issue is only related to IIS. I have seen the same issue on Xammp installations aswell. So will be interesting to try your solution for that!

  2. Ludo Office 365   •  

    I have the same issue in WAMP (Windows Apache 24 php 5.3). I add this certicifate in c:apache and add your instruction in my php.ini file and update is ok now. Thanks for sharing

  3. Axel Arnold Bangert   •  

    Hi Matt,
    this has been a great hint and help. I have had severe problems with Google Client PHP API OAuth clients and cURL.
    Best
    Axel Arnold Bangert – Herzogenrath 2016

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.