A super straight forward workflow for using Devkit to push a wordpress headless demo to a live WP Engine install. We’re going to be using an existing project from Jack Reichert called “A wp react redux theme” (source) that uses WordPress’s theme convention to load the react.js code.
Full WP Engine Devkit quick-start Guide here.
Time needed: 45 minutes.
Here’s a super straight forward workflow for using Devkit to push a wordpress headless demo to a live WP Engine install.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wpengine/wpe-cli/wpe-cli
Node.js is bundled into Devkit. Loading it’s bash will give you access to it so you can run things like
wpe projects new INSTALLNAME
Replace INSTALLNAME with your name of choice.
INSTALLNAMEdirectory and start WPE-Cli (Devkit):
cd INSTALLNAME && wpe start
/wp-content/themes/and install the A WP React Redux Theme:
cd wp-content/themes/ && git clone https://github.com/jackreichert/a-wp-react-redux-theme.git
A WP React Redux Themeas your active theme
This will log you in to the test site. Go to
Themes and click
Activate on the
A WP React Redux Theme theme.
While you’re in
/wp-admin, go to
Permalinks and set them to
cd a-wp-react-redux-theme && npm install
npm run build
wpe config prod_install WPEINSTALLNAME
…where WPEINSTALLNAME is the name of the install on the WP Engine side.
wpe config push_environment prod
You may be also interested in checking out our guide on how to deploy a headless WordPress site for to the cloud with Frontity and Zeit Now.