Permalink
Browse files

update .bat script

  • Loading branch information...
moraleida committed Jul 6, 2018
1 parent cdbac64 commit 1d8b3898f3abd1208ef4c3536db691049e9e5515
Showing with 2 additions and 27 deletions.
  1. +2 −27 bin/setup.bat
View
@@ -12,39 +12,17 @@ if exist "./wordpress/wp-config.php" (
)
)
REM Ask for the site title
SET /P TITLE=[Site title: ]
REM Ask for the user name
SET /P ADMIN_USER=[Username: ]
REM Ask for the user password
SET /P ADMIN_PASSWORD=[Password: ]
REM Ask for the user email
SET /P ADMIN_EMAIL=[Your Email: ]
REM Ask for the type of installation
SET /P MULTISITE=[Do you want a multisite installation? [y/n] ]
REM Install WordPress
docker-compose exec --user www-data phpfpm wp core download --force
docker-compose exec --user www-data phpfpm wp core config --force
REM Set default admin user if none was provided
if "" == "%ADMIN_USER%" (
SET ADMIN_USER="admin"
)
REM Set default admin password if none was provided
if "" == "%ADMIN_PASSWORD%" (
SET ADMIN_PASSWORD="password"
)
if "y" == "%MULTISITE%" (
docker-compose exec --user www-data phpfpm wp core multisite-install --url=localhost --title="%TITLE%" --admin_user="%ADMIN_USER%" --admin_email="%ADMIN_EMAIL%" --admin_password="%ADMIN_PASSWORD%"
docker-compose exec --user www-data phpfpm wp core multisite-install --prompt
) else (
docker-compose exec --user www-data phpfpm wp core install --url=localhost --title="%TITLE%" --admin_user="%ADMIN_USER%" --admin_email="%ADMIN_EMAIL%" --admin_password="%ADMIN_PASSWORD%"
docker-compose exec --user www-data phpfpm wp core install --prompt
)
REM Adjust settings
@@ -74,6 +52,3 @@ if "y" == "%EMPTY_CONTENT%" (
echo "Installation done."
echo "------------------"
echo "Admin Username: %ADMIN_USER%"
echo "Admin Password: %ADMIN_PASSWORD%"
start "" http://localhost/wp-login.php

0 comments on commit 1d8b389

Please sign in to comment.