Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # webiste info
- WP_TITLE=${WP_SITENAME//\"/}
- WP_HOME=$WP_HOME
- WP_USER=$WP_ADMIN_NAME
- WP_PASSWORD=$WP_ADMIN_PASS
- WP_EMAIL=$WP_ADMIN_EMAIL
- # install
- if ! $( wp core is-installed --allow-root --path=/var/www/html/web/wp ); then
- # install wordpress
- wp core install \
- --url=$WP_HOME \
- --title="$WP_TITLE" \
- --admin_user=$WP_USER \
- --admin_password=$WP_PASSWORD \
- --admin_email=$WP_EMAIL \
- --skip-email \
- --allow-root \
- --path=/var/www/html/web/wp
- # enable all available plugins
- wp plugin activate --all
- fi
- # refresh permalinks
- wp rewrite structure '/%postname%/' --hard --allow-root
Add Comment
Please, Sign In to add comment