Skip to content

Instantly share code, notes, and snippets.

@Ebeldev
Ebeldev / gist:b6d2ef7954fd8376103f3deec952747e
Created November 21, 2021 05:06
My ultimate 30 seconds WordPress and roots/sage install.
function makesage() {
wp valet new $1 --dbname=$1 --admin_user=adminusertoreplace --admin_password=adminpasswordtoreplace --admin_email=adminemailtoreplace
cd $1
installAndActivePlugins
installPlugins
if [ -s "@:2"]
then
wp plugin install ${@:2} --activate
fi
valet secure $1 && cd ./wp-content/themes/ && composer create-project roots/sage $1 && rm -rf twentynineteen && rm -rf twentytwenty && rm -rf twentytwentyone && cd $1 && sageInstallLanguages && npm i && open -a "Firefox" https://$1.test && open -a "Firefox" https://$1.test/wp-admin
@Ebeldev
Ebeldev / gist:d241005ab68f347c0fa9247aac2fc517
Last active November 21, 2021 05:03
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 …
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
@Ebeldev
Ebeldev / cloudSettings
Last active November 7, 2018 20:47
bcv
{"lastUpload":"2018-11-07T20:46:50.690Z","extensionVersion":"v3.2.0"}