MainWP Dashboard on Local WP can’t connect to a remote child site.
When connecting a site to my localhost MainWP (powered through WP Local), I get a 500 error for /wp-admin/admin-ajax.php.
Debug gives an error:
PHP Fatal error: Uncaught TypeError: openssl_pkey_get_details(): Argument
#1 ($key) must be of type OpenSSLAsymmetricKey, bool given in C:\Users\Steve\Local Sites\mainwp-volunteer\app\public\wp-content\plugins\mainwp\class\class-mainwp-manage-sites-view.php:1550
If I visit MainWP Advanced Settings, OpenSSL.cnf location is set to C:\Program Files\Common Files\SSL\openssl.cnf
However, the SSL folder does not exist in C:\Program Files\Common Files\
Where can I find the Local WP openssl.cnf file in Windows?
Just my MainWP Dashboard site.
local-logs.zip (4.6 KB)
I don’t have a Windows set up to be able to look, but I might have a workaround. Can you try the following?
Go to the WP > Settings > MainWP Child > Settings page.
From there, Deselect the Require Unique Security ID option and Click the Save Changes button.
The security ID is unrelated to open.ssl (it is a text string), and turning it off would leave MainWP child sites vulnerable.
@s.doig Sorry for my misunderstanding. These threads below might be helpful to you:
The path to OpenSSL is in the phpinfo button. With the site active, from Local, click on the “circle I” (info) icon next to the php version. It will display the php info page. Somewhere on that page you will see an entry for OpenSSL. There will be a file path. Use that one.
Sorry I’m on my iPad, no images for help.
I had this issue too. I had to got back to the MainWP setup wizard. I think I had to select localhost > Windows even though I was on a Mac.
This is a fairly complicated part of Local that to be honest, I don’t 100% understand. Also, I’ve never used MainWP, but as I understand it, it’s a tool that allows you to administer multiple WordPress sites from one central place – is that correct?
If so, how is the main controller/admin functionality implemented? Is it a plugin that needs to be installed on a WordPress site? Also I’m guessing that each individual “secondary” site needs some sort of worker plugin – is that correct?
In terms o…
RE: the first link, Local reports the link to openssl.cnf is:
C:\Program Files\Common Files\SSL/openssl.cnf
but the SSL folder does not exist in the Common Files folder, so Local is mistaken.
RE: the second link, this doesn’t contain any solutions.
The link that first one shows that it should be found here:
But I see some additional notes from
@DigiRik that might help here:
You’re not gonna believe this. The first path I tried worked!
I looked through the paths one by one and most of them looked like they were associated with Wordpress plugins but then I came across one that looked more like the examples I’d seen in one of my Google searches and it worked.
For anyone having the same issue here are the steps I followed:
Install MainWP on the Wordpress installation running on LocalWP using all default settings
In the MainWP dashboard navigate to Setting…
That is not a Windows path… It is Unix/Mac.
That does not mention a Windows path either. It is Unix/Mac.
@s.doig Sorry for my mistake there.
openssl.cnf file for Localwp should be found in the following location on Windows:
<username> should be replaced with your Windows user account name.
If you still can’t find that directory, can you try searching for it using Windows Search? You should be able to search
openssl.cnf after pressing the Windows key.
That directory does not contain the
openssl.cnf file, only a
Were you able to locate it using the Windows search function?
There is only 1
openssl.cnf file related to Local in the following folder:
which is irrelevant.
There are also some other
openssl.cnf files in:
(both unrelated to Local)
Is Local supposed to install OpenSSL on Windows?
Or do Windows users need to install their own copy of OpenSSL when using Local?
Any solution to Local and OpenSSL on Windows?
Thank you for your patience with this. I did some checking with the team and discovered this is dependent upon what version of PHP you’re using.
If you’re using PHP 8.1.9 (which comes bundled with Local), this file lives at:
C:\Program Files (x86)\Local\resrouces\extraResources\lightning-services\php-8.1.9+8\bin\win32\extras\ssl
If you’re using any of the other PHP versions, it is in the directory that starts out like this:
Let us know if that lines up for you or if you have any other trouble!
Any further discoveries on this topic?
I doubt I am the only Windows user using Local for their WordPress maintenance services using MainWP.
@s.doig - I agree with you re: using MainWP, but this isn’t an error I’ve ever heard mentioned by other users.
The path Nick mentioned above is just the path to wherever Local is installed on your machine. I can’t tell you where that is, unfortunately. I am also using a 64-bit version of Windows on my machine - below is a picture of my C:\ drive. Local and the files it ship with live in
Program Files (x86)\Local, which is where other apps on my machine (Chrome) are installed too. Have you checked your Program Files folder? What does your C:\ look like if you’re not seeing Local there?
Thank you, you’re right, Local’s
openssl.conf lives in:
and updating MainWP > Advanced > OpenSSL.cnf location with that location means I can now connect remote sites to my local MainWP dashboard running on LocalWP.
Problem solved, appreciated.
Awesome, I’m glad you got it working! And apologies for the confusion on hunting that down, troubleshooting those file paths (especially on Windows, for some reason) can be a pain.
This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.