Skip to content

Instantly share code, notes, and snippets.

@as3k
Created August 31, 2022 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save as3k/3200ea3b343dd64330b058ee5c5aaa53 to your computer and use it in GitHub Desktop.
Save as3k/3200ea3b343dd64330b058ee5c5aaa53 to your computer and use it in GitHub Desktop.
Easy Engine WP Creation shell script
#!/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