# wp acorn not working in Sage site on Local app

**URL:** https://discourse.roots.io/t/wp-acorn-not-working-in-sage-site-on-local-app/29697
**Category:** sage
**Tags:** sage10, local
**Created:** 2025-06-21T14:09:03Z
**Posts:** 6

## Post 1 by @SalutBarbu — 2025-06-21T14:09:03Z

Hi, I’m trying to get started with a new Bedrock and Sage site using [Local](https://localwp.com/) by Flywheel for local development. I’ve followed the steps [here](https://roots.io/bedrock/docs/bedrock-with-local/) and everything is working beautifully.

The next thing I would like to do is install the [generoi/sage-woocommerce](https://github.com/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`.

The base Sage theme [should handle booting Acorn](https://roots.io/acorn/docs/installation/#booting-acorn), so I’m not sure what I’ve missed.

Thanks for your help!

---

## Post 2 by @csorrentino — 2025-06-21T15:25:52Z

Are you using the shell accessed through the local ui? Because it’s a container based environment you need to use the shell inside the container.

also is sage theme active? It needs to be to access acorn commands

---

## Post 3 by @SalutBarbu — 2025-06-22T00:57:31Z

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!

---

## Post 4 by @MaxSwinkels — 2025-07-23T09:35:45Z

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:

```
define( 'DB_HOST', 'localhost:/Users/your-username/Library/Application Support/Local/run/your-site-id/mysql/mysqld.sock' );
```

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

Hope this helps!

---

## Post 5 by @ben — 2025-07-23T14:32:08Z

Interesting approach, thanks for sharing!

Another solution is to setup WP-CLI aliases for not just remote environments, but also local Docker-based installs (like Local)

That way you could run commands like `wp @local acorn` (or `wp @development acorn`, whatever you’d like to name the alias)

> **[wp cli alias – WP-CLI Command | Developer.WordPress.org](https://developer.wordpress.org/cli/commands/cli/alias/)**
>
> Retrieves, sets and updates aliases for WordPress Installations.

---

## Post 6 by @SalutBarbu — 2025-07-24T11:59:54Z

Ah good to know, thanks @MaxSwinkels and @ben! I’ll try that when I get back to Local.

I just did my first deployment to Kinsta with Trellis and I’m seeing the light. Unfortunately the Trellis vm (lima) is a bit slow on my M2 Mac so it’s looking like I’ll use Local for development and Trellis just for deployment. Local is now native on Mac Silicon, it’s blazing fast and reliable (it used to freeze all the time haha).
