Last active
September 14, 2022 12:18
-
-
Save yavuz/042a1e39c94b33d39f82625e6fbc3c07 to your computer and use it in GitHub Desktop.
Create Wordpress with works Valet in Local
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 | |
| 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