Missing openssl.cnf file

I am trying to connect MainWP to my local sites and have run into the openssl.cnf file issue. The php info says it should be here /usr/local/etc/[email protected]/openssl.cnf but the etc folder doesn’t exist. I’ve tried /usr/lib/ssl/openssl.cnf and I’ve also tried adding an openssl.cnf file generated by SEOPress plugin into the folder I am pointing MainWP to.

How to I fix this issue please?

Hi @jenefer

Welcome to the MainWP Community.

Did you try placing that openssl.cnf file in a different directory and then pointing MainWP Dashboard to it?

You can also see some of the usual locations for the openssl.cnf for different local hosts here: How to find the OpenSSL.cnf File - MainWP Documentation

Hi @bojan

I created a openssl.cnf file using Homebrew. I then moved this file here: /usr/local/openssl.cnf and pasted this into the openssl.cnf location.

Thanks for the documentation - I had read this one someone else’s post you had replied to. On some of the other posts they have options to set localhost it MainWP. Is this not an option anymore as I can’t find this setting.

Thanks
Jenefer

That setting was part of our old Dashboard setup wizard. The functionality is still there but it’s now dynamic.

You will be prompted to enter the path to the openssl.cnf only if the Dashboard can’t autodetect its location.

And if it is autodetected, there is no reason to manually enter it - localhost or not.

Is the MainWP Dashboard still prompting you to enter the valid path on the Settings > Advanced Settings page?

If so, can you try downloading the openssl.cnf file from this GitHub link, place it in root of your WP site, and point to that path. openssl/apps/openssl.cnf at master · openssl/openssl · GitHub

That still doesn’t work. I’ve copied the code from the GitHub link and put the file in the root of the website.

I’ve then updated the location on the advance setting path.

I’ve then saved these settings and returned to the dashboard and I still get the error message.

I’ve tried spinning up a new site and starting from scratch and I’ve restarted my laptop in between. Any other ideas please? It looks a great plugin if I can get it working

Thanks for the update.

What software stack are you using to host WP locally?

I can see from the screenshots that you have a valid certificate for the domain. I assume that is self-signed?

And did you assign that URL using a Hosts file editor, or is that part of the functionality of the local-hosting software stack?

I’m using Local by Flywheel.

I’m not massively technical so not sure I understand the other questions. On Local I click ‘trust’ to get the ssl then I go into Key chain on the mac and click trust - so think this is self signed.

I’ve not used a host file editor - not sure what one is.

Thanks for persisting with me

I’ve found that Homebrew places the file in either of those locations depending on the version:
/usr/local/etc/[email protected]/openssl.cnf (for OpenSSL 1.1.x)
/usr/local/etc/openssl/openssl.cnf

And Local by Flywheel used to have /usr/lib/ssl/openssl.cnf as their default location for both Custom and Preferred Environments.

But since those paths didn’t work for you, at this moment, it may the best to contact Local’s support and have them check what’s the current path of openssl.cnf.

Unfortunately Local don’t have a support area and you have to rely on the community which I haven’t had a response. I’ve fully searched my laptop for the openssl.cnf file and it doesn’t exist which I am guessing is the problem.

Why wont MainWp read the openssl.cnf file I created and put in the website root please?

1 Like

I got to the bottom of it. After installing MAMP and getting it to work there I realised that if I change the php version on Local WP from 8.1.9 to 8.0.22 and then connect the child using http: it works.

Got there in the end!

1 Like

Perfect. I’m glad you managed to work it out.

Thanks for updating the community and sharing the solution.

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