Yes, you do not need any server, MySQL database or even PHP. All will run from our custom docker environment.
Although it is possible and in some cases recommended to install WP Setup globally, we recommend to install at project basis. This way all configuration will bee keep in your project and can be easily replicate by all your team members. It can drastically reduce new tem members onboarding and facilitate project replication and testing.
So to add it in your project, first ensure you have a npm package started. If not you just need to run the following command in our project directory:
npm init -y
Then you can simply add WP Setup as a development dependency to your project and call the init command to create your setup file.
npm install wp-setup --save-dev
npx wp-setup init
This commands will install WP Setup and will create a file called wp-setup.json in your project root directory. This file is responsible for all your configurations.
As you can see in the commands above, after install the WP Setup as dependency, you can run our CLI calling npx wp-setup
"scripts": {
"env:start": "wp-setup start",
"env:stop": "wp-setup stop",
"env:destroy": "wp-setup destroy",
"env:composer": "wp-setup run wp-cli --workdir . composer",
"env:pest": "wp-setup run wp-test-cli --workdir . global-pest"
}
Now you can simply start your new environment just calling:
npm run env:start
# or
npx wp-setup start
And to stop the environment:
npm run env:stop
# or
npx wp-setup stop
Also you can destroy the current environmend installation with all volumes running:
npx wp-setup destroy
If you find this project useful, please consider giving it a Star on GitHub!
For more details, check out the project documentation: - WP Setup
This project is licensed under the MIT License - see the LICENSE file for details.