Last active
March 25, 2018 09:21
-
-
Save joeinnes/6da64d3a3d345b37e50f to your computer and use it in GitHub Desktop.
Wordpress deploy into ServerPilot app
This file contains 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 | |
# Script to deploy Wordpress into a ServerPilot app. | |
# Call programmatically via ssh - ssh <serverpilot-username>@<serverpilot-host> "curl <script-url> | sh -s <app-name> <db-name> <db-user> <db-user-pw>" | |
# This will prompt for password unless the user is able to log in using keys | |
cd /srv/users/serverpilot/apps/$1/public | |
wget https://wordpress.org/latest.tar.gz | |
tar xzf latest.tar.gz | |
mv wordpress/* . | |
rm latest.tar.gz | |
rmdir wordpress | |
sed -e "s/database_name_here/$2/" \ | |
-e "s/username_here/$3/" \ | |
-e "s/password_here/$4/" \ | |
<wp-config-sample.php >wp-config.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment