Skip to main content

Create a New Project

Learn how to create a new decoupled WordPress backend project.


This section provides information on how to create a new WordPress backend project with Pantheon's starter kit.

Create with Dashboard Upstream

  1. Go to the workspace, that the new site should be a part of, then select the Sites page.

  2. Click +Create New Site.

  3. Select Front-End Site when prompted.

  4. Select WordPress for Front-End under Create Backend CMS.

    Select a Starter

  5. Name your site, select your decoupled environment from the Choose a Workspace for the Site drop-down menu, and then click Continue.

    Site and Multidevs names cannot contain a . (period) or _ (underscore).

  • To do this step through Terminus, replace my-new-site, the site description, and the org (if available) in My Team Name in the following command:

    terminus site:create my-new-site "Describe Site" --org='My Team Name' c9f5e5c0-248f-4205-b63a-d2729572dd1f

    Note that c9f5e5c0-248f-4205-b63a-d2729572dd1f is the upstream_id for Decoupled WordPress Composer Managed.

  1. Confirm your organization selection when prompted in Confirm Organization Selection. The Deploying Decoupled WordPress Composer Managed progress indicator displays while your site is being created.

  2. Click Visit your Pantheon Dashboard when the site creation completes.

  3. Click the Visit Development Site button to install WordPress.

  4. Select the profile. This can also be done via terminus remote:wp.

Your backend starter is ready to develop!

Create with Terminus Plugin

Terminus is a command line interface that provides advanced interaction with Pantheon. You can create your project with the Terminus Decoupled Kit Plugin if you prefer to work in the terminal.

The Terminus Decoupled Kit plugin provides commands useful for creating decoupled projects on Pantheon using pre-configured starter kits.

Info:
Note

Note that the Terminus plugin creates your frontend codebase, but does not automatically deploy it to Pantheon. Deploy your frontend codebase to Pantheon using the import repository workflow.

The steps in this section show how to use the Front-End Sites Terminus plugin to:

  • Create a new site on Pantheon for the CMS backend of your choice.
  • Optionally install your CMS.
  • Create a frontend codebase that sources data from your newly created CMS project. This codebase will be automatically configured for local development, and can later be deployed to Pantheon using the import repository workflow.

Before you continue, make sure you have:

  1. Open your terminal and run the command below to install the Terminus Decoupled Kit plugin.

    terminus self:plugin:install pantheon-systems/terminus-decoupled-kit-plugin
    • You should see a message, such as Installed pantheon-systems/terminus-decoupled-kit-plugin
  2. Run terminus decoupled-kit:create, updating $SITE-NAME and $LABEL with your own information, to create your project:

    terminus decoupled-kit:create $SITE-NAME $LABEL
    • Additional optional commands:

      • --org[=ORG]: Organization name, label, or ID.
      • --region[=REGION]: The region in which you want to create your site. Refer to the Pantheon regions documentation for more information.
      • --cms[=CMS]: This selects the CMS you want to use. Current supported CMS options are: drupal and wordpress.
      • --install-cms[=INSTALL-CMS]: This instructs the plugin to install your CMS or not. The default value is true. You can set this value to false if you do not want to install a CMS for your project.
  3. When prompted, select the CMS you want to use. This option does not appear if you used the optional --cms[=CMS] command. The options should look similar to:

    Choose your CMS back-end:
    [0] Drupal-10
    [1] Drupal-9
    [2] WordPress
    • CMS installation will take several minutes. You should see a message similar to the following example to let you know your project is deploying:

      Creating a new site...
      [notice] Deploying CMS...
  4. Enter your password when prompted and enter y to proceed:

    Now let's create your front-end project...
    [Exec] Running npm init pantheon-decoupled-kit@canary -- --cmsType d10 --cmsEndpoint=https://dev-donnerstag.pantheonsite.io
    Need to install the following packages:
    [email protected]
    Ok to proceed? (y)
  5. Select the framework generator you want to use:

    Which generator(s) would you like to run? (Press <space> to select, <a> to toggle all, <i> to
    invert selection, and <enter> to proceed)
    ◯ next-drupal
    ◯ next-drupal-umami-addon
    ◯ tailwindcss-addon
    ◯ next-drupal-search-api-addon
  6. Enter a name for your project:

    What is the name of your project?
  7. Enter the location where you want your output to go. For example, /Users/anitapantheon/anita-site/anita-portfolio:

    Where should the output go?
  8. Select if you want to include additional frameworks, such as Tailwind CSS:

    Would you like to include tailwindcss? (Y/n) selected y
  9. Select if you want to continue with your selected changes. You will see a list of the changes you selected.

    Listing changes for /Users/anitapantheon/anitasite/anita-portfolio/.env.development.local:
    
    - BACKEND_URL=https://dev-anita-portfolio.pantheonsite.io
    - CLIENT_ID=
    - CLIENT_SECRET=
    - PREVIEW_SECRET=
    - #DEBUG_MODE=true
    ? About to overwrite /Users/anitapantheon/anitasite/anita-portfolio/.env.development.local with
    the changes listed above.
    Would you like to continue? (Use arrow keys)
    yes
    skip
    yes to all
    abort

    If you select yes to all, you'll receive a message similar to:

    Your project was generated with:
    next-drupal
    cd into /Users/anitapantheon/anitasite/anita-portfolio to start developing!
    (node:53117) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
    Goodbye.
    [Exec] Done in 07:44
    [notice] Next steps: import your repository to create a Front-End Site https://docs.pantheon.io/guides/decoupled/no-starter-kit/import-repo
    Your Decoupled Kit project has been created!
    • You can see this backend project in your Pantheon account. Go to your Pantheon dashboard and select Sites. You will see your backend project listed with the label name you entered in the steps above.
  10. Import your repository to create the frontend of your Pantheon Front-End Site.