This repo contains default configuration for setting up a development environment for our plugins.
- Node
- Yarn
- Git
- Composer
- Docker
To set up your repo for active development work, make sure you have Node installed on your machine. To do this, you can head over to node.js.org/en to download the runtime environment. This will provide you the ability to run node commands directly from your terminal and also install node packages using NPM.
Once you have Node installed you can verify by opening a terminal to see if you can check its version like so:
node -v && npm -vYarn is a faster & more efficient dependency management tool and it is advisable to use this to manage your dependencies.
To install, run the following commands like so:
npm install -g yarnTo verify it is installed, please run:
yarn -vGit is a version control system that enables software engineers collaborate & work together easily. Download the CLI for your operating system using the following link:
https://git-scm.com/downloadsComposer is a PHP dependency management tool. The easiest way to get it is to use brew like so:
brew install composerWe use Docker for managing our WP instances easily. To get this, please visit the link:
https://docker.com/get-startedTo setup, please run the following command:
yarn setupThis should spin up a Wordpress development site at:
http://appworld.localhost:8080You should be able to log in using the default user should be admin and the default password should be password.
Please, proceed to the .wp-env.json file, change the "core" version to the new version you'd like to install. For example, to install WordPress 6.4, change the line to "core": "WordPress/WordPress#6.4".
Now rebuild the WP instance by running the following command:
yarn rebuildPlease, proceed to the .wp-env.json file, change the "phpVersion" to the new version you'd like to install. For example, to install PHP 8.4, change the line to "phpVersion": "8.4".
Now rebuild the WP instance by running the following command:
yarn rebuildIf you use Windows, you might have challenges setting up your repo using wp-env. To workaround this, you can use the docker configuration to setup your local environment.
To setup, please run the following command:
yarn dockerThis should spin up a Wordpress development site at:
http://localhost:8080Please, proceed to the docker-compose.yml file, change the image version to the new version you'd like to install. For example, to install WordPress 6.4, change the line to image: wordpress:6.4.
Now rebuild the WP instance by running the following command:
yarn docker-rebuild