Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Vagrant: Boost Your WordPress Development

Vagrant: Boost Your WordPress Development

WordPress development can be quite cumbersome, especially if you deal with different clients and everybody has own server configurations or special needs. Using Services like MAMP are great for a quick start but if you need to match certain criteria it is good to be as close as possible to live environment.

Vagrant is a tool, which lets you setup a Virtual Machine on your computer, which reflects your live environment. And people from the community already built some special VMs for WordPress developer. Setting up a new WordPress (Multi-) Site is just a mater of seconds and you’re ready to go.

This session, will teach you what Vagrant is, how you can use it and what specific WordPress solution exists to boost your WordPress development.

Hans-Helge Buerger

August 28, 2015
Tweet

More Decks by Hans-Helge Buerger

Other Decks in Programming

Transcript

  1. Vagrant
    Boost Your WordPress Development
    1 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  2. Hans-Helge Bürger
    @obstschale | hanshelgebuerger.de
    2 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  3. 1
    Local Development with Vagrant
    3 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  4. What is a Local
    Development?
    4 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  5. Why Do I Need It?
    5 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  6. How Can I Use It?
    6 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  7. How Can I Use It?
    7 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  8. 2
    Vagrant
    8 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  9. 9 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  10. Vagrant Commands
    10 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  11. $ vagrant init
    "Hello, World!" in Vagrant
    11 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  12. $ vagrant up
    $ vagrant halt
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Checking if box 'ubuntu/trusty64' is up to date...
    ==> default: There was a problem while downloading the metadata for your box
    ==> default: to check for updates. This is not an error, since it is usually due
    ==> default: to temporary network problems. This is just a warning. The problem
    ==> default: encountered was:
    ==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
    ==> default: Running 'pre-boot' VM customizations...
    ==> default: Booting VM...
    12 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  13. $ vagrant status
    Current machine states:
    default poweroff (virtualbox)
    The VM is powered off. To restart the VM, simply run `vagrant up`
    13 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  14. $ vagrant provision
    14 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  15. $ vagrant ssh
    15 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  16. $ vagrant destroy
    16 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  17. $ vagrant help
    Don't Panic!
    17 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  18. Vagrantfile
    18 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  19. Vagrantfile
    # -*- mode: ruby -*-
    # vi: set ft=ruby :
    Vagrant.configure(2) do |config|
    config.vm.box = "ubuntu/trusty64"
    config.vm.network "forwarded_port", guest: 80, host: 8080
    # config.vm.network "private_network", ip: "192.168.33.10"
    config.vm.synced_folder "www/", "/srv/www/"
    config.vm.provision "shell", inline: <<-SHELL
    sudo apt-get update
    sudo apt-get install -y apache2
    SHELL
    end
    19 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  20. 3
    Vagrant Demo
    20 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  21. 4
    Varying Vagrant Vagrants
    21 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  22. 22 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  23. Variable VVV
    a VVV Site Creation Wizard
    23 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  24. 5
    VVV Demo
    24 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  25. 6
    More Awesome Stuff
    25 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  26. Theme Juice
    26 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  27. Vagrant Manager
    27 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  28. 28 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  29. Vagrant Plugins
    29 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  30. Vagrantbox.es
    30 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  31. VVV Dashboards
    31 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  32. 32 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  33. 33 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  34. Recap
    http://buer.gr/wcnkpg15
    34 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide

  35. Hans-Helge Bürger
    Thank You
    @obstschale
    35 — WordCamp Norrköping 2015 – Hans-Helge Bürger - http://buer.gr/wcnkpg15

    View full-size slide