Skip to content

Instantly share code, notes, and snippets.

@yavuz
Last active September 14, 2022 12:18
Show Gist options
  • Select an option

  • Save yavuz/042a1e39c94b33d39f82625e6fbc3c07 to your computer and use it in GitHub Desktop.

Select an option

Save yavuz/042a1e39c94b33d39f82625e6fbc3c07 to your computer and use it in GitHub Desktop.
Create Wordpress with works Valet in Local
#!/bin/sh
DBUSER="root"
DBPASS="1"
# create directory
mkdir -p ~/Sites/$1
# goto websites directory
cd ~/Sites/$1
# downloading wordpress
/usr/local/bin/wp core download
# create database
echo "create database wp_"$1 | mysql -u $DBUSER -p$DBPASS
# set database information
/usr/local/bin/wp core config --dbname="wp_"$1 --dbuser=$DBUSER --dbpass=$DBPASS --dbhost=localhost --dbprefix=wp_ --locale=en_US --allow-root
# set wp config
/usr/local/bin/wp core install --url=$1.test --title=$1" Website" --admin_user="yavuz" --admin_email="[email protected]" --admin_password="123123"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment