In this guide, you'll learn the basics of deploying apps on the WP Engine Headless Platform.

Requirements:

  • A WP Engine Atlas account
  • Node.js. We recommend using nvm to install Node.js.
  • Git
  • WP Engine Headless CLI tool (install)

What this guide covers:

This guide does not cover how to add a custom domain. Custom domains require that you have an Atlas account with a production environment. Contact the WP Engine Atlas team to get set up with custom domains.

The platform supports Node.js-based applications.

We recommend using nvm to install Node.js:

  1. In your terminal application, install nvm by entering curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash.

  2. Restart your terminal and add the proper nvm settings to your ./bashrc or .zshrc.

  3. In terminal, enter nvm install <node-version-number> to install your chosen version of Node.js.

Node.js uses npm for its package management, which allows you to set the version of Node.js your applications require via the engines property inside your project's package.json.

{
"engines": {
"node": "12.18.0"
}
}

The supported versions of Node.js are 12, 14 and 16. Specifying a Node version below the minimum supported version will default to the minimum supported version (12); setting a higher version will default to the maximum supported version (16).

If no version is specified, your app will be built with current default version (16). To ensure your project is built with a version of your choice, make sure to include your desired settings in "engines" section of your package.json.

Note: Only major versions are available - minor and patch versions will be rounded to a given major version.

Depending on chosen major node version, environments are built using node:<version>-slim images (visit Docker page for more details)