-
Notifications
You must be signed in to change notification settings - Fork 3
/
wp-install.sh
17 lines (15 loc) · 959 Bytes
/
wp-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# disable xdebug
alias wp="php -d xdebug.mode=off /usr/local/bin/wp"
wp core install --url=http://localhost --title="${WP_TITLE:=Demo}" --admin_user="${WP_USER:=admin}" --admin_email=${WP_EMAIL:="demo@local.tld"} --admin_password="${WP_PASS:=demo}" --skip-email
# Remove unused plugins
wp plugin uninstall hello akismet
# Install necessary plugins
wp plugin install woocommerce --version=9.3.3
# Install neccesary plugin
wp plugin activate woocommerce
wp plugin activate wc-recurring-pdf
# create necessary pages
found=$(wp post list --format=count --title="Legacy Cart" --post_type=page)
[ $found -eq 0 ] && wp post create --post_type=page --post_title="Legacy Cart" --post_content="[woocommerce_cart]" --post_status="publish"
found=$(wp post list --format=count --title="Legacy Checkout" --post_type=page)
[ $found -eq 0 ] && wp post create --post_type=page --post_title="Legacy Checkout" --post_content="[woocommerce_checkout]" --post_status="publish"