Here is how you can use the wp-cli on WP Engine
You will need this so you can connect to WP engine server via ssh.
To generate it you only need to run a command.
On a Mac just run the following in your Terminal
ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org
On a Windows just download git bash and run the same command.
This will generate a
.ssh hidden folder under your user directory with two files in it:
We are only interested in the .pub file. It will hold your new public key.
Simply log in to WP engine and click your name in the top right corner. > Select profile > click SSH Key
Hit the Create SSH Key button and paste the content of the
id_rsa.pub file into the prompt window’s input field.
Navigate to the project dashboard on WP engine that you would like to ssh in and run WP CLI on the server.
Scroll to where the “Environment stats” are and there is an “SSH” label there. Hit the copy icon on it. The address should look like this.
Simply open your terminal or your newly added git bash on windows and run the following.
Once connected just
cd sites and
after which you can run your favorite WP CLI commands.
Here are Common WP CLI commands that I find myself using a lot