Open Site Shell not working. Exits before loading .sh file

Issue Summary

When I try to fire up “open site shell” for any of my sites, my terminal opens, attempts to load the .sh file, but then exits before loading it and creating the environment.

Last login: Thu May 19 16:22:15 on ttys011
You have mail.
/Users/Gray/Library/Application\ Support/Local/ssh-entry/ ; exit;

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit

There aren’t any errors

What I’ve been doing as a workaround is load the .sh file directly via the command line afterwards, which works fine:

Grays-MacMini:~ Gray$ /Users/Gray/Library/Application\ Support/Local/ssh-entry/
Setting Local environment variables...
WP-CLI:   WP-CLI 2.6.0
Composer: 2.1.5 2021-07-23
PHP:      7.4.1
MySQL:    mysql  Ver 8.0.16 for macos10.14 on x86_64 (MySQL Community Server - GPL)
Launching shell: /bin/zsh ...
➜  public git:(live) ✗ wp plugin list

I’d just like it to work as intended.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?

All of my sites

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?

Yes. I can access all the sites in the browser, I just can’t get into wp-cli and other commands quickly through terminal.

System Details

  • Which version of Local is being used?


ZSH is updated to the latest version, as is Oh My ZSH.

  • What Operating System (OS) and OS version is being used?

    • For example: macOS Catalina or Windows 10 Professional
      macOS Monterey - Version 12.3.1
  • Attach the Local Log. See this Help Doc for instructions on how to do so:

PHP Version
after it exits, and I use /opt/homebrew/bin/php the result is /opt/homebrew/bin/php
but after I manually load the .sh file, i get /Applications/ as i’d expect

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.

I have the same issue. MacOS Monterey 12.3.1 (21E258)

It’s the exit; at the end that messes it up.

I found another workaround by simply opening the folder where the shell commands reside

cd ~/Library/Application\ Support/Local/ssh-entry/

and then adding a symlink to the shell file for the install I want. This means i don’t need to remember the install key like 5HmJdlCF4 or something.

ln -s ./
chmod +x ./

Then I can simply open any terminal window and drag and drop this shell file onto the window then press return to run it

I could also reference it by name in its full directory:

~/Library/Application\ Support/Local/ssh-entry/

but who wants to type that much.

At any rate, I agree with the original poster here. It would be very nice if this just worked. Is it actually more complicated than just removing the exit command?

1 Like

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