How to set up the dev. environment - smilingrobots/another-unit-converter GitHub Wiki
-
Clone the repository to a local directory
$ git clone [email protected]:wvega/another-unit-converter.git
-
Install VirtualBox.
We use VirtualBox to encapsulate the environment where the plugin is tested providing separation between your actual system (where the repository resides, files are edited, etc.) and a customized Linux environment running WordPress and the current plugin's code.
-
Install Vagrant.
Vagrant is a command-line tool used to automate the management of VirtualBox instances.
-
Install Vagrant's hostsupdater plugin with the following command:
$ vagrant plugin install vagrant-hostsupdater
-
Once Vagrant is installed, there are several alternatives to setting up and running the testing Vagrant instance.
-
Our git repo already comes with a special file, called Vagrantfile, that Vagrant can use to create and set up the instance. This is the quickest way to start working on Another Unit Converter.
The following command should download CentOS, configure an instance and make it available at http://another-unit-converter.dev on your machine:
$ vagrant up
For this instance, the admin user/password is just "admin". The plugin is disabled by default but can be enabled from WP's backend.
-
Use Varying-Vagrant-Vagrants VVV instead of the bundled Vagrantfile. This requires a bit more configuration but provides a much richer toolset for WP development. @wvega can help you with this 😸.