Skip to main content
Last Reviewed: December 13, 2022

Prepare Your Site for Migration

Get your local environment and the existing site ready.


It's important to prepare your site before you begin the migration process. Complete the steps outlined below to ensure that your site is prepared for migration to Pantheon's platform.

  1. Review our documentation on Git, Composer, and Terminus, and install and configure them on your local computer. Pantheon requires Composer 2 at minimum.

    • Mac users can use Homebrew to install Git, Composer, and PHP, along with their required dependencies. Note: Terminus 3 should be used for PHP >= 8.0. Restart the shell or terminal environment after entering the following command:

      brew install git composer php
    • Windows users can install Composer and Git, and may need to install XAMPP or similar to satisfy some dependencies.

  2. Get a local copy of both your new Pantheon site and your existing codebase.

  3. Set the temporary variables $SOURCE and $DESTINATION in your terminal session to match the location of your folders.

    This doc uses several commands that depend on the locations of both your existing and new site codebases. Setting the variables will simplify the process for you.

    export SOURCE=/absolute/path/to/source/site/codebase
    export DESTINATION=/absolute/path/to/codebase/cloned/from/pantheon
  4. Ensure the trusted host setting is up-to-date. Refer to the Trusted Host Setting documentation for more information.

  5. Set the Dev environment site mode to Git to perform Git operations.

  6. Clone your site to your local environment using the git clone command from the Dashboard.