Skip to content

Initial Setup

Kipruto edited this page Feb 5, 2024 · 3 revisions

Repository Setup Guide

  1. 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.

  2. Create a Working Directory and Clone the Repository

    Create a working directory and clone this repository into it.

  3. 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.

  4. 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.

  5. 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 the wordpress directory after the WP_DEBUG line:

    define( 'WP_SITEURL', 'http://localhost:8080' );
    define( 'WP_HOME', 'http://localhost:8080' );
Clone this wiki locally