Setup to start new projects using WordPress in the Devilbox development environment.
Enter the root folder of the repository.
Using Linux/Mac:
./devilbox-config.sh
Using Windows:
devilbox-config.bat
The docker-compose
command needs to be run in the devilbox
folder.
Start necessary services for the project:
docker-compose up httpd php mysql livereload mailhog
docker-compose exec --user devilbox php bash -l \
-c "wp core download --path=/shared/httpd/my_project/htdocs --locale=pt_BR"
docker-compose exec --user devilbox php bash -l \
-c "composer install -d /shared/httpd/my_project/htdocs/wp-content/themes/my_theme"
docker-compose exec --user devilbox php bash -l \
-c "npm install --prefix /shared/httpd/my_project/htdocs/wp-content/themes/my_theme"
docker-compose exec --user devilbox php bash -l \
-c "npm run dev --prefix /shared/httpd/my_project/htdocs/wp-content/themes/my_theme"
docker-compose exec --user devilbox php bash -l \
-c "npm run prod --prefix /shared/httpd/my_project/htdocs/wp-content/themes/my_theme"
Enter the devilbox
folder:
cd devilbox
Using Linux/Mac:
./shell.sh
Using Windows:
shell.bat
Inside the container, you can enter development mode by running start
or create files for production with build
.