Skip to main content
Last Reviewed: December 13, 2022

Prepare


Complete all steps in this section to ensure that your site is ready to be migrated to Pantheon.

Create a New Drupal Site

  1. Log in to your Pantheon account. If you don't have an account, create one and familiarize yourself with Workspaces before you create a new site.

  2. Set up SSH Keys on your local computer and Pantheon account.

  3. Go to your Personal Workspace, then click Sites: Create New Site.

  4. Click Visit your Pantheon Site Dashboard.

Prepare the Local Environment

  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. Set the temporary variable $SITE in your terminal session to match the name of your site.

    This doc uses several commands that use the temporary command line alias, $SITE, to make entering command examples easier. Refer to the steps further in this doc to see which sites should be aliased (it may be more than one), then replace anita-drupal in this example:

    export SITE=anita-drupal && echo "New alias set as $SITE"
    How to Use Terminus to Find the Site Name

    Use terminus site:list for a list of sites you have access to:

    terminus site:list
    --------------------------- --------------------- ------------- ----------------------------------- -------------------- --------------------- ------------- ------------
    Name                        ID                    Plan          Framework          Region           Owner                Created               Memberships   Is Frozen?
    --------------------------- --------------------- ------------- ------------------- ---------------- -------------------- --------------------- ------------- ------------
    anita-drupal                abdc80ce-286c-1234-   Sandbox       drupal8             Canada           3374708c-987e-1234   2020-12-15 19:40:42   d3ecc20c-395a falseanita-wordpres              abdc9954-fab2-1234-   Sandbox       wordpress           United States    c96ddb25-336a-1234   2020-09-02 07:18:51   d3ecc20c-395a false

    The site name is listed under Name. In this example, the site name is anita-drupal.

  3. Create a new folder to use while working on the migration. This folder will contain two subdirectories that you'll create in the next sections, one for the site on the former platform, and one for the Pantheon site.

Create a Local Copy of the Old Site's Code

  1. Obtain a local copy of your old site's code.

    Your code includes all custom and contributed modules or plugins, themes, and libraries. The codebase should not include the sites/default/files directory, or any other static assets you do not want tracked by version control.

  2. Export the database and media files (sites/default/files) from the old platform, but do not add them or upload any files to Pantheon.

Retrieve a Local Copy of the Pantheon Site's Code

  • You have access to a local copy of the existing site and/or you have access to a Git repository of the existing site.

  • Your site is based on the drupal/recommended-project template or a similar non-composer managed structure.