Hi, I’m trying to get started with a new Bedrock and Sage site using Local by Flywheel for local development. I’ve followed the steps here and everything is working beautifully.
The next thing I would like to do is install the generoi/sage-woocommerce package, but I can’t seem to run wp acorn from the site shell.
I’ve confirmed the Sage starter theme is installed and activated, but I still see Error: 'acorn' is not a registered wp command.
Thanks @csorrentino, I had checked those things but now I see where the issue was…
When I open the site shell from Local, it drops me into the /public folder, not the new /bedrock folder. I needed to cd to /app/bedrock/web/app/themes/sage-example to use wp acorn. Dumb mistake!
If you’re using Local and wp acorn isn’t working in your regular terminal (outside Local’s built-in shell), it’s likely due to the database connection relying on a socket.
You can fix this by updating your wp-config.php like so:
Replace your username and your site ID with the correct values for your machine.
You can find the exact DB_HOST value by opening Local, selecting your project, then navigating to PHP → Details. Look for the line containing mysqld.sock, it shows the full socket path you need.
After that, you should be able to run wp acorn directly from your IDE terminal. No need to use Local’s built-in shell anymore.