How to set up the dev. environment - smilingrobots/another-unit-converter GitHub Wiki

  1. Clone the repository to a local directory

    $ git clone [email protected]:wvega/another-unit-converter.git
    
  2. 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.

  3. Install Vagrant.

    Vagrant is a command-line tool used to automate the management of VirtualBox instances.

  4. Install Vagrant's hostsupdater plugin with the following command:

    $ vagrant plugin install vagrant-hostsupdater
    
  5. Once Vagrant is installed, there are several alternatives to setting up and running the testing Vagrant instance.

  6. 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.

  7. 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 😸.