Skip to content

Instantly share code, notes, and snippets.

@abaicus
Created January 2, 2017 10:49
Show Gist options
  • Save abaicus/12047a69d49e1c55c5d9742b654ceb3d to your computer and use it in GitHub Desktop.
Save abaicus/12047a69d49e1c55c5d9742b654ceb3d to your computer and use it in GitHub Desktop.
Creates a named wp-instance, installs woocommerce and deletes standard plugins.
@echo off
set /p wpInstance= Local WordPress instance name: & echo.
set dbName=%wpInstance%
set dbUser=root
set dbPass=
rem change this if you want to personalize installs.
set user=andrei
set pass=andrei
set [email protected]
rem change this if you want to personalize installs.
echo. & echo This will install a WordPress instance called %wpInstance%. & echo.
call mkdir %wpinstance% & cd %wpinstance% & explorer .
echo.
rem Install wp core.
call wp core download
echo.
call wp core config --dbname=%dbName% --dbuser=%dbUser% --dbpass=%dbPass%
echo.
call wp db create
echo.
call wp core install --url=localhost/%wpInstance% --title=%wpInstance% --admin_user=%user% --admin_password=%user% --admin_email=%email% --skip-email
echo.
call wp plugin install wordpress-importer --activate
call wp plugin install woocommerce --activate
call wp import .\wp-content\plugins\woocommerce\dummy-data\dummy-data.xml --authors=create
call wp plugin delete hello
call wp plugin delete akismet
echo All done! Prepare for your new WordPress installation.
echo.
start chrome /new-window localhost/%wpInstance%/wp-admin
echo Goodbye!
pause
:end
goto:eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment