How to use Acorn? Constantly getting ''acorn' is not a registered wp command'

Hi guys,

I’m trying to set up https://github.com/Log1x/acf-composer by @Log1x , I’ve installed it via composer in my Sage 10 theme directory. How is acorn supposed to work, is it meant to be run from my theme directory? I am trying to run the command locally in my theme directory with
wp @development acorn vendor:publish --provider="Log1x\AcfComposer\Providers\AcfComposerServiceProvider"

but I just get
Error: 'acorn' is not a registered wp command. See 'wp help' for available commands.

What am I missing here? I presume it’s something simple. Running the full roots stack with Bedrock and Trellis on a multisite instance.

Many thanks!

Is Sage activated? Does it work without @development?

1 Like

Hi @Log1x , yes Sage is active. I’ve been working with the theme for months. Without @development it gives me:

Error: Error establishing a database connection.

WP CLI works fine for everything else, it’s just acorn I’m having these issues with.

Ok so the issue is with multisite and I presume linked to this: Wp acorn vendor:publish fail

My main site wasn’t using the sage theme, so I made the main site use Sage and now it’s working.

1 Like

@Log1x may I just ask what is the purpose of the publish command:

wp acorn vendor:publish --provider="Log1x\AcfComposer\Providers\AcfComposerServiceProvider"

It returns Publishing complete. but what does it actually do? I don’t see any files added etc.

Many thanks :slightly_smiling_face:

It just copies over the configuration file. Just grab it from the repo and toss it in your config folder – I’ll take a look at the underlying issue when I can.

This topic was automatically closed after 42 days. New replies are no longer allowed.