Last active
November 21, 2021 05:03
-
-
Save Ebeldev/d241005ab68f347c0fa9247aac2fc517 to your computer and use it in GitHub Desktop.
My ultimate 30 seconds WordPress install. It install WordPress, makes a database, create the admin user, install some default plugins and other ones as 2nd arguments when invoke makewp, makes a https site, and open a Firefox browser tab. To work you need 3 things: 1. WP cli, 2. valet 3. aaemnnosttv / wp-cli-valet-command package. Usage: 1. Edit …
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
function makewp(){ | |
wp valet new $1 --dbname=$1 --admin_user=adminusernametoreplace --admin_password=adminpasswordtoreplace --admin_email=adminemailadresstoreplace && cd $1 && installAndActivePlugins && installPlugins | |
if [ -s "@:2"]; then | |
wp plugin install ${@:2} --activate | |
fi | |
valet secure $1 && open -a "Firefox" https://$1.test/wp-admin | |
} | |
function installAndActivePlugins(){ | |
wp plugin install query-monitor really-simple-ssl duracelltomi-google-tag-manager imsanity --activate | |
} | |
function installPlugins(){ | |
wp plugin install all-in-one-wp-security-and-firewall wordfence webp-express | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My ultimate 30 seconds WordPress install. It install WordPress, makes a database, create the admin user, install some default plugins and other ones as 2nd arguments when invoke makewp, makes a https site, and open a Firefox browser tab. To work you need 3 things: 1. WP cli, 2. valet 3. aaemnnosttv / wp-cli-valet-command package. Usage: 1. Edit this file and put the admin user, admin password and admin email and you are good to go. 2. cd into your park folder of valet 3. makewp andthenameofsiteyouwant