Created
August 31, 2022 22:01
-
-
Save as3k/3200ea3b343dd64330b058ee5c5aaa53 to your computer and use it in GitHub Desktop.
Easy Engine WP Creation shell script
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/sh | |
clear | |
read -p "Enter the site url: " url | |
read -p "Enter admin email: " adminEmail | |
read -p "Enter admin username: " adminUser | |
read -p "Enter admin password: " adminPass | |
read -p "Use letsencrypt for SSL? (y/n) " le | |
read -p "Use Redis Cache? [y/n] " redis | |
echo "Creating wordpress site...." | |
if [ "$le" != "${le#[Yy]}" ] ; then | |
LESTR="--ssl=le" | |
else | |
LESTR="" | |
fi | |
if [ "$redis" != "${redis#[Yy]}" ] ; then | |
REDISSTR="--cache" | |
else | |
REDISSTR="" | |
fi | |
# fire off the command with the correct flags | |
sudo ee site create $url $LESTR $REDISSTR --type=wp --admin-email=$adminEmail --admin-user=$adminUser --admin-pass=$adminPass | |
sleep 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment