Trying to get Sage to run on WPEngine = sooo frustrating :)

Hi there, swapped from a cruddy aging WP dev set up to Bedrock and Sage - but next 2 clients are on WPEngine and I am struggling to get anything onto a test site.

I gave up on Bedrock as found a doc on using Sage10 to WPE but when following that I have encountered errors - initially with the PHPversion tho that was relating to the github action but now with Acorn.

My builds fail with:

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

I have tried installing acorn at theme level, and adding an Acorn install to my action.yml

   - name: Install Acorn
      run: cd wp-content/themes/${{ env.THEME_NAME }} && composer require roots/acorn

The build pipeline shows that it installs Acorn but then fails with the error above.

Ideally I would have got both Bedrock and sage working but at this point just getting Sage would be acceptable.

Anyone manaing this just fine and have any piointers? :slight_smile:

Thx!

Not exactly WPEngine but I have Acorn running on a few other shared hosting providers just fine.

Acorn at the theme level would be ideal yes, have you made sure the theme which boots Acorn has been activated before you try and run the command? As per docs: Installing Acorn | Acorn Docs | Roots

I can’t activate the theme until it is up there :slight_smile: Everything else in the github action passes - just falls over once it tries to reference acorn.

Am speaking to WPE support also so will update if it turns out the issue lies there but I can’t imagine I am the only person trying to do this as there is a wpengine github for sage 10 running on WPE - it just doesn’t work when I follow it :smiley:

Is WP Engine’s example no longer working?

It seems not as that is what I was using. :slight_smile: It does everything in the github actions but is not happy about acorn.

I am going to go through the ‘do it yourself’ version - just figured the example-sage-theme would be super quick to get working and then I could work from there.

I’m slightly confused by your responses. Acorn isn’t going to be a registered command if it isn’t booted anywhere (e.g. with the theme) – so if you have workflows depending on it and your site isn’t provisioned yet (e.g. activated with a database so it is able to actually use the command) – you may need to adjust something for the initial deploy.

2 Likes

I remember using CircleCI to build and deliver code to WPEngine. It seemed to work. I didn’t use GitHub for this, as I specialize in CircleCI. Unfortunately, I’m not sure if there might be any issues in WPEngine with Sage 10.

I ran into this EXACT same issue today. It’s quite the “chicken or egg” problem: can’t use Acorn until it has been booted, can’t boot Acorn until, well, it has been registered. :slight_smile:

The solution:

  • ssh into your server at WPEngine
  • upload your theme if you haven’t earlier
  • run: composer require roots/acorn
  • Use phpmyadmin in the user control panel to install the database of your local version of the site
  • Acorn is now “registered” !!!
  • run: wp acorn acorn:install

Ta-Daaaah!

2 Likes