-
-
Save rilwis/6b3ae9528665dabdbb4eef38b1d303f2 to your computer and use it in GitHub Desktop.
Vhost
This file contains 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
@echo OFF | |
SET ApacheConf=C:\xampp\apache\conf\extra\httpd-vhosts.conf | |
SET InstallPath=D:\Sites\%1.dev | |
SET MysqlUsername=root | |
SET MysqlPassword= | |
SET SiteTitle=%1 | |
SET AdminUsername=admin | |
SET AdminPassword=admin | |
SET AdminEmail=admin@%1.dev | |
echo.127.0.0.1 %1.dev>> %SYSTEMROOT%\System32\drivers\etc\hosts | |
echo.^<VirtualHost *:80^>>> %ApacheConf% | |
echo. DocumentRoot "%InstallPath%">> %ApacheConf% | |
echo. ServerName %1.dev>> %ApacheConf% | |
echo.^</VirtualHost^>>> %ApacheConf% | |
mysqladmin -u %MysqlUsername% --password="%MysqlPassword%" create %1 | |
if not exist "%InstallPath%" mkdir %InstallPath% | |
cd /d %InstallPath% | |
wp core download && wp core config --dbname=%1 --dbuser=%MysqlUsername% --dbpass=%MysqlPassword% && wp core install --url=%1.dev --title=%SiteTitle% --admin_user=%AdminUsername% --admin_password=%AdminPassword% --admin_email=%AdminEmail% | |
echo Done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment