SSL Certificate on macOS

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.

Yes, same problem (SSL Certificate on macOS - #4 by Fra) when trying to wp search-replace, it still doesn’t work.

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.

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?

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

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?

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?

@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.

/Users/<user_name>/Library/Application Support/Local/ssh-entry/07IG1cSU3.sh
cd "/Users/<user_name>/Local Sites/<website_name>/app/public"

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.

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

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:
~/Local Sites/
/Users/<user_name>/Local Sites/

  1. Where is the WordPress installation located for the site in question? The directory path should be:
/Users/<user_name>/Local Sites/<website_name>/app/public/

  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:
/Users/<user_name>/Local Sites/<website_name>/

  1. Find and open the shell script file for the site in question (07IG1cSU3.sh in your screenshot above). The file path is:
/Users/<user_name>/Library/Application Support/Local/ssh-entry/07IG1cSU3.sh

  1. What does it say after the cd command in the end of the shell script? The cd directory path should be:
cd "/Users/<user_name>/Local Sites/<website_name>/app/public"

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.

1 Like