# SSL Certificate on macOS

**URL:** <https://community.localwp.com/t/ssl-certificate-on-macos/45690>\
**Category:** Support\
**Created:** [November 22, 2024, 5:50pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690 "2024-11-22T17:50:17Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![emmtre](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/emmtre/32/15116_2.png) [@emmtre](https://community.localwp.com/u/emmtre)\
**Post date:** [November 27, 2024, 2:55pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/21 "2024-11-27T14:55:55Z")

</div>

> [@Fra](#):
>
> Hi, I’ve opened the shell and launched the commands you suggested. Do I need to post the screenshot?

The output from these commands and when you start the shell would be helpful in debugging your WP-CLI installation and why `wp search-replace` doesn’t work.

> **[wp search-replace – WP-CLI Command | Developer.WordPress.org](https://developer.wordpress.org/cli/commands/search-replace/)**
>
> Searches/replaces strings in the database.

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [November 27, 2024, 3:12pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/22 "2024-11-27T15:12:12Z")

</div>

Yes, same problem ([SSL Certificate on macOS - #4 by Fra](https://community.localwp.com/t/ssl-certificate-on-macos/45690/4)) when trying to `wp search-replace`, it still doesn’t work.

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [November 27, 2024, 3:17pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/24 "2024-11-27T15:17:34Z")

</div>

Here is the shell screenshot:

 ![Shell Screenshot](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/7/3/73770482b8be3f248f5d66ffd5ae6142a5065ef0.jpeg)

---

<div class="post-metadata">

**Author:** ![emmtre](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/emmtre/32/15116_2.png) [@emmtre](https://community.localwp.com/u/emmtre)\
**Post date:** [November 27, 2024, 3:58pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/25 "2024-11-27T15:58:58Z")

</div>

> [@Fra](#):
>
> Here is the shell screenshot

I don’t see any obvious problems. @Nick-B, what do you say?

The only thing I notice is that the `WP_CLI phar path` is missing.

```auto
WP_CLI phar path: /Users/<user_name>/Local Sites/<website_name>/app/public

```

Edit: I also noticed a missing row in the beginning when you start the site shell but maybe it’s just clipped in the screenshot?

```auto
/Users/<user_name>/Library/Application\ Support/Local/ssh-entry/07IG1cSU3.sh
Setting Local environment variables...

```

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [November 27, 2024, 4:37pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/26 "2024-11-27T16:37:33Z")

</div>

Can you send a full screenshot of your terminal when you try to run your search and replace?

Do you get errors when trying to run any other commands as well? For example if you just run `wp plugin list` or something like that do you get an error?

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [November 29, 2024, 1:39pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/27 "2024-11-29T13:39:58Z")

</div>

Hi everyone, sorry for my late reply!

Here is a full shell screenshot when trying to run `wp search-replace` and then `wp plugin list`.

I guess there must be something that is not working properly. What do you think?

 ![Shell Screenshot](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/f/1/f13de5140b52075989366c7e608cb6b939196f51.jpeg)

---

<div class="post-metadata">

**Author:** ![emmtre](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/emmtre/32/15116_2.png) [@emmtre](https://community.localwp.com/u/emmtre)\
**Post date:** [November 29, 2024, 5:57pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/28 "2024-11-29T17:57:00Z")

</div>

@Fra

It looks like you are not in the correct directory for the Wordpress installation to be able to execute any `wp` command. Have you moved or renamed the `Local Sites` directory after the installation? Or have you changed the `Sites path` setting in the Local app? Take a look at your shell script file `07IG1cSU3.sh`. I guess the `cd <directory>` is wrong or missing in the shell script.

```auto
/Users/<user_name>/Library/Application Support/Local/ssh-entry/07IG1cSU3.sh

```

```auto
cd "/Users/<user_name>/Local Sites/<website_name>/app/public"

```

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [December 1, 2024, 9:59am UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/29 "2024-12-01T09:59:50Z")

</div>

No I din’t make any changes to those options. I’ve just tried to run a new test site and there’re the same problems. Now I can’t even trust the certificate and the shell I see the same things when trying to run `wp ...`.

 ![Screenshot 2024-12-01 alle 10.52.01](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/0/0/005969d654637786c915c5787ece7950e92b4aec.png)  
This always happens when I try to build a new site.

What I did, before building the site, is selecting a different folder to use as the _Local sites_ one. But all the files seemed to be fine there.

I am a neophyte so this is very difficult for me to sort out.

---

<div class="post-metadata">

**Author:** ![emmtre](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/emmtre/32/15116_2.png) [@emmtre](https://community.localwp.com/u/emmtre)\
**Post date:** [December 1, 2024, 8:54pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/30 "2024-12-01T20:54:43Z")

</div>

> [@Fra](#):
>
> No I din’t make any changes to those options. I’ve just tried to run a new test site and there’re the same problems. Now I can’t even trust the certificate and the shell I see the same things when trying to run `wp ...`.
> 
> This always happens when I try to build a new site.
> 
> What I did, before building the site, is selecting a different folder to use as the `Local Sites` one. But all the files seemed to be fine there.

Judging from your screenshot above, you are not in the WordPress directory and therefore all `wp` commands will fail.

Depending on where your newly renamed `Local Sites` folder is located it could also be a permission issue.

Please post answers and/or screenshots to the following questions so @Nick-B or someone else can help you out.

1. What directory is the `Sites path` set to in the Local app Preferences panel? The directory path should be:

```auto
~/Local Sites/

```

```auto
/Users/<user_name>/Local Sites/

```

 ![preferences](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/8/4/84ab3a97c8683b2628397c36550df5e409bb6fa3.jpeg)

1. Where is the WordPress installation located for the site in question? The directory path should be:

```auto
/Users/<user_name>/Local Sites/<website_name>/app/public/

```

 ![public_folder](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/b/2/b22c8b7c815439b2771396e5b7736f712c8d50db.jpeg)

1. What’s the path to the site folder that opens when you press the `Site folder` button in the Local app? The path should be:

```auto
/Users/<user_name>/Local Sites/<website_name>/

```

 ![local_app](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/0/8/08b5a33615fb0041a51cc804ded8e6ab61eba781.jpeg)

 ![site_folder](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/9/b/9bd6c14e23e2202e26ec84f61e4d80f27a0c1cc0.jpeg)

1. Find and open the shell script file for the site in question (07IG1cSU3.sh in your screenshot above). The file path is:

```auto
/Users/<user_name>/Library/Application Support/Local/ssh-entry/07IG1cSU3.sh

```

 ![ssh_folder](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/1/1/1180a3319019d8e505681d6676c462eabb6802ef.jpeg)

1. What does it say after the `cd` command in the end of the shell script? The `cd` directory path should be:

```auto
cd "/Users/<user_name>/Local Sites/<website_name>/app/public"

```

 ![shell_script](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/4/4/44c127a59075045359512c70d50dea58bc462ba9.jpeg)

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [December 2, 2024, 4:15pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/31 "2024-12-02T16:15:19Z")

</div>

Thank you for the help here @emmtre!

There is definitely some great information worth checking through above there @Fra from Emmtre, but if you’re still struggling you might try the reset steps I outlined here. If something has been moved or shifted and is no longer syncing up, then that may correct the behavior again for you.

> [@SSL Certificate on macOS](https://community.localwp.com/t/ssl-certificate-on-macos/45690/14):
>
> 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](https://localwp.com/help-docs/getting-started/how-to-backup-a-local-site/) Fully uninstall Local from your computer with the steps for your specific OS here: [Uninstall Local - Local](https://localwp.com/help-docs/troubleshooting/uninstalling-local/) Install the latest version of Local on this link: [Releases - Local](https://localwp.com/releases/) Once ins…

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [December 16, 2024, 9:35am UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/32 "2024-12-16T09:35:16Z")

</div>

Thank you @emmtre and @Nick-B! Sorry for my late reply!

Here are all the screenshot you asked me, I hope this can help sort the problem out. In the meantime I also tried to create a new site from scratch but it shows the same exact problem.

When I installed local, I changed `Preferences>New site defaults>Site path` and I chose a different folder in order for all the sites to be in an iCloud Drive folder. I don’t know if this may be what caused the problem.

 ![Screenshot 1](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/5/2/5261e3bf2bb512603207131b94c5fcdba0a1512f.png)  
 ![Screenshot 2](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/6/9/696efd3952396af821068b52f9e287862987540e.jpeg)  
 ![Screenshot 3](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/8/a/8a0342fa83a0bc5e279ba7b368137570172c3bcf.jpeg)  
 ![Screenshot 4](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/6/2/623c6cc67488cd8caf22d0e879aa9176507ec622.jpeg)  
 ![Screenshot 5](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/a/f/afba0b13e4b33a5994e29611431b35274aaa0105.png)

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [December 16, 2024, 2:45pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/33 "2024-12-16T14:45:32Z")

</div>

Hi @Fra - I think the New Site Defaults might be part of the issue. Could you try my uninstall/reinstall steps I provided above but when you bring Local back just leave the New Site Defaults to where it originally starts up and see if that works?

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [December 17, 2024, 8:54am UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/34 "2024-12-17T08:54:03Z")

</div>

Hi @Nick-B, thanks, I’ll try that, even though the reason I did that is because I wanted all the files in my iCloud in case my Mac had any problem. Let’s see if in this way it works as it should.

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [December 17, 2024, 9:16am UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/35 "2024-12-17T09:16:22Z")

</div>

Ok, I’ve followed all your steps. I’ve just tried to create a new site from scratch to try, but now I can’t trust the SSL ([https://localwp.com/help-docs/getting-started/managing-local-sites-ssl-certificate-in-macos/](https://localwp.com/help-docs/getting-started/managing-local-sites-ssl-certificate-in-macos/)) because Step 1 doesn’t seem to work at all. It shows the red bar in the upper part, as in the image I sent, but it still creates the certificate in the Keychain Access, which I modified in “always trust”. Then I stopped the site, closed Local, reopened it and started the site again. Then I went back clicking on the “trust” button on Local but it keeps showing the red bar. When opening the site via `WP Admin`, though, there is the `https://` so I don’t know what is the problem now.

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [December 17, 2024, 9:56am UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/36 "2024-12-17T09:56:25Z")

</div>

I tried this way. Opened the shell and run the `WP search-replace` command, here is the picture. The SSL went automatically on trusted, but as it happened before, when trying to open the site via the `Open site` button on Local, there is again no SSL or certificate within it.

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [December 17, 2024, 2:55pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/37 "2024-12-17T14:55:22Z")

</div>

It doesn’t look like your picture came through @Fra

But your Site Shell and commands are working normally now?

Aside from the SSL issue are you otherwise able to access your site in the front and back end?

Have you tried any other other SSL troubleshooting tips in the help article above?

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [December 18, 2024, 5:31pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/38 "2024-12-18T17:31:45Z")

</div>

Hi @Nick-B! I’ll try to upload the pictures again. The Site Shell seems to work normally for I am able to understand. I am also able to access the site both in the front and back end, despite of the SSL issue. And I tried everything I found, but the problem now is just the Open Site button not opening the site with SSL. I don’t understand why all this happened just by changing the New site folder. Now I need to have all the files saved on my Mac HD instead of iCloud Drive, but I could use the plugin to do backups on Google Drive.

Here are the picture of the `WP search-replace` command:

 ![Screenshot WP search-replace](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/e/3/e3b858be224bc3139edaf7e25ebebf87be4b4f3f.jpeg)

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [December 19, 2024, 3:27pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/39 "2024-12-19T15:27:07Z")

</div>

Okay so it sounds like all of your issues are resolved now but the only thing outstanding is that your Open Site opens insecurely. Is that correct?

Which brings us back to this bug that Emmtre mentioned earlier. If your certificate is trusted and your S/R is done and caches are flushed, then you might just be experiencing the bug.

> [@Site opens in http only](https://community.localwp.com/t/site-opens-in-http-only/41890):
>
> Bug Summary The WP-admin and the Open Site button opens the site in question only via http not https, even though a SSL is set and the cert is trusted in OS X. You CAN change the protocol manually. Once changing the home and siteurl options in the db manually. I can use the WP-admin to force the site via https but not the Open Site button/link. This is both for existing and NEW sites. Apache and NginX do not seem to make a difference. Why is this important? To ensure that remote loaded asset…

---

<div class="post-metadata">

**Author:** ![Fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Fra](https://community.localwp.com/u/Fra)\
**Post date:** [January 4, 2025, 5:10pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/40 "2025-01-04T17:10:10Z")

</div>

Thank you both! I decided to leave it as it is, since being developed locally there’s no actual need for SSL.

It would be nice to be notified, if possible naturally, when this issue is solved.

Thanks again for your help!

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [January 4, 2025, 5:13pm UTC](https://community.localwp.com/t/ssl-certificate-on-macos/45690/41 "2025-01-04T17:13:33Z")

</div>

If you vote or comment on that Bug above @Fra you’ll get notified there when we resolve it and close it!

[Previous page](https://community.localwp.com/t/ssl-certificate-on-macos/45690.md?page=1)

[Next page](https://community.localwp.com/t/ssl-certificate-on-macos/45690.md?page=3)
