Created
July 2, 2018 19:47
-
-
Save sewmyheadon/09238c0189c9c3a3d1b4de2bd127edaa to your computer and use it in GitHub Desktop.
Pantheon / Lando New Site Bash Script - run script locally to create Pantheon WordPress site and clone locally into new Lando environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# siteslug="SITE_SLUG" | |
read -p "Enter site slug: " siteslug | |
# sitename="SITE_NAME" | |
read -p "Enter site name: " sitename | |
read -p "Continue? (Y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1 | |
# assign variables | |
export SITE_SLUG=$siteslug | |
export SITE_NAME=$sitename | |
# spin up new site on Pantheon | |
terminus site:create $SITE_SLUG "$SITE_NAME" XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX --org MYORGNAME | |
terminus dashboard:view $SITE_SLUG | |
terminus wp $SITE_SLUG.dev -- core install --url=https://dev-$SITE_SLUG.pantheonsite.io --title="$SITE_NAME" --admin_user=ivycat --admin_password=changemelater [email protected] | |
mkdir $SITE_SLUG && cd $SITE_SLUG | |
# create local site | |
lando init pantheon | |
lando start | |
lando pull |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment