-
Notifications
You must be signed in to change notification settings - Fork 0
Initial Setup
-
Add SSH Key to WP Engine
To get started, add your SSH key to WP Engine. For more information, refer to the WP Engine SSH Gateway Documentation.
-
Create a Working Directory and Clone the Repository
Create a working directory and clone this repository into it.
-
Download and Restore Backups from WP Engine
Download and restore the latest backups from WP Engine using the instructions provided in the WP Engine Restore Documentation. Unzip the backups into your working directory.
-
Access the Remote Database Using SSH
Use SSH and local port forwarding to access the remote database. Here's an example command:
ssh -L 3307:127.0.0.1:3306 -i ~/.ssh/wpengine_ed25519 -o IdentitiesOnly=yes [email protected]
For more details, refer to the WP Engine Remote Database Access Guide.
-
Update Environment Variables
Update the environment variables in the
.env
file using the database credentials from WP Engine. You can find the credentials with the following command once you have SSH access to the remote database:grep WPENGINE_SESSION_DB_PASSWORD ./sites/environmentname/_wpeprivate/config.json
To access the admin dashboard from localhost, add the following to
wp-config.php
in thewordpress
directory after theWP_DEBUG
line:define( 'WP_SITEURL', 'http://localhost:8080' ); define( 'WP_HOME', 'http://localhost:8080' );
A project by CodeforAfrica