SSL Certificate on macOS

What issue or error are you experiencing?

I’ve been trying to do everything as displayed in the ‘SSL Certificate on macOS’ guide (SSL Certificate on macOS - Local), but once I open the shell, the ‘wp search-replace’ doesn’t work. Can somebody help me sort this out please?


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

The problem is this: when I click onto ‘Open Site’ from Local, there is no SSL (no https:// at all). I don’t know if this is normal because I am new to this. Thanks in advance to anyone could help me!

Hi @Fra

What is your Router Mode set to? Localhost only supports HTTP, so that could be one possibility.

Preferences>Advanced>Router Mode

If you’re still having trouble can you send us some screenshots?

Also what is your MacOS version and Local version?

1 Like

Router Mode is on Site Domains, so it shouldn’t be a problem I think.

I’ll send a screenshot.
Screenshot 2024-11-22 alle 19.10.36

macOS version is Sequoia 15.0.1., I updated local two hours ago, so latest version.

Thanks Nick!

Are you able to access the front and back ends of the site okay? Or do you get any errors there?

No errors at all, just when clicking onto Open Site in Local (just right to the WP Admin button) it opens the site without ‘https://’. Maybe it is normal but I don’t know.

And your SSL is trusted in your Local app?

Yes it is, that’s why I still can’t understand.

This is an old known issue depending on if you are running nginx or Apache. If you have changed the Wordpress and Site address to https and the certificate in the Keychain app it “should” work. But for Apache sites I have added a https redirect in the htaccess file. There are several posts here about this problem and I’ll try to dig up some links.

# BEGIN Redirect to https
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
# END Redirect to https

Here is an old post about the same issue. But for me Open Site works now with both nginx and Apache sites. I don’t know if there have been any changes lately in the Local app though.

1 Like

Thank you everyone, maybe it is a bit too advanced for me. The site runs with nginx but I still have that problem when opening it via the “open site” button. I don’t know why, but as I said, maybe it has to be this way. I’ve done everything as shown in the two previous images.

1 Like

Thank you for that @emmtre I had forgotten about that bug. It seems like that could be at play here for sure but I would think they should still be able to access Site Shell and perform basic functions there yeah? I haven’t seen anyone mention that being an issue.

Yeah, that’s strange. I would start by checking the WP-CLI installation with the usual commands like which wp and wp --info. And post the output when launching the shell.

1 Like

Hey @Fra

You can see some suggestions from emmtre above here. If you’re still having trouble you might also try a full reinstall to refresh here in case something has been corrupted.

  • Export any sites that you have on Local and save them to a folder somewhere on your computer: Backup a Local Site - Local

  • Fully uninstall Local from your computer with the steps for your specific OS here: Uninstall Local - Local

  • Install the latest version of Local on this link: Releases - Local

  • Once installed, please restart the computer.

  • When the computer is restarted and turned on, close any applications that automatically run in the background (AntiVirus, Firewall, and other Developer applications included).

  • Check and see if the issue still persists. If so, please provide us with an updated log: Retrieve Local’s Log File - Local

1 Like

Thank you both, I’ll try to sort it out and if it doesn’t work I’ll do what you suggested! :pray:

Hi, I’ve opened the shell and launched the commands you suggested. Do I need to post the screenshot?

Hi @Nick-B,

any updates regarding the bug that @emmtre linked?

Thanks!

The Bug is still open but I’m not 100% sure that is the same issue you are facing here. That’s why I suggested potentially doing a full reinstall here.

Is there anything else unique about your device or connection? Is your device issued by an employer, or do use it with an employer network, proxy, or VPN?

Not at all, it is my personal MacBook and I just use a normal internet network. I really don’t know what’s going on because the only problem is with the Open Site button that always opens without SSL. The WP Admin works perfectly fine.

If that’s the only issue you have now then it may be related to the bug above, but what I was trying to dig into was your Site Shell CLI issues. Are you still running into problems there?