$30 off During Our Annual Pro Sale. View Details »

Wordmove, multistaging deploy for WordPress

Ju Liu
September 13, 2013

Wordmove, multistaging deploy for WordPress

http://github.com/welaika/wordmove

Wordmove is a nice little gem that lets you automatically mirror local Wordpress installations and DB data back and forth from your local development machine to the remote staging server. SSH and FTP connections are both supported.

Think of it like Capistrano for Wordpress, complete with push/pull capabilities.

Here are the videos in this talk:
https://vimeo.com/74648079
https://vimeo.com/74647529
https://vimeo.com/74646861

Ju Liu

September 13, 2013
Tweet

More Decks by Ju Liu

Other Decks in Programming

Transcript

  1. WORDMOVE
    @Pioneer_Skies @delphaber
    WP Day 13/09/13

    View Slide

  2. To install, test and implement
    a computer system or application.
    DEPLOY
    /dɪˈplɔɪ/

    View Slide

  3. ✓ 46% freelancer
    ✓ 78% uses FTP for deploying
    ✓ 76% worked live on production
    ✓ No common approach for database
    via Smashing Magazine | http://bit.ly/1atrWRp
    WordPress usage

    View Slide

  4. Bad habits
    Manual tasks

    View Slide

  5. Good habits
    Automation

    View Slide

  6. Bad habits
    No conventions

    View Slide

  7. Shared practices
    Good habits

    View Slide

  8. Bad habits
    Late deploy & Live coding

    View Slide

  9. Deploy early, deploy often
    Good habits

    View Slide

  10. View Slide

  11. View Slide

  12. wordmove

    View Slide

  13. $ gem install wordmove
    $ cd ~/dev/blog
    $ wordmove init

    View Slide

  14. Movefile
    local:
    vhost: "http://wpday.local"
    wordpress_path: "/home/welaika/sites/wpday.local"
    database:
    name: "wpday"
    user: "root"
    password: "root"
    host: "localhost"
    remote:
    vhost: "http://wpday.welaika.com"
    wordpress_path: "/var/www/wpday.welaika.com"
    database:
    name: "wpday"
    user: "welaika"
    password: "p4ssw0rd"
    host: "localhost"
    ssh:
    user: "welaika"
    password: "sshpass"
    host: "mt.welaika.com”

    View Slide

  15. Is SSH an
    expensive dream?
    Keep calm and use FTP.
    It is supported as well :)

    View Slide

  16. Let’s move your code

    View Slide

  17. $ wordmove push --all

    View Slide

  18. View Slide

  19. $ wordmove push -t

    View Slide

  20. View Slide

  21. $ wordmove help push
    Usage:
    wordmove push
    Options:
    -w, [--wordpress]
    -u, [--uploads]
    -t, [--themes]
    -p, [--plugins]
    -l, [--languages]
    -d, [--db]
    -v, [--verbose]
    -s, [--simulate]
    -e, [--environment=ENVIRONMENT]
    -c, [--config=CONFIG]
    [--no-adapt]
    [--all]

    View Slide

  22. Multistage

    View Slide

  23. Movefile
    local:
    vhost: "http://wpday.local"
    wordpress_path: "/home/welaika/sites/wpday.local"
    database:
    [...]
    demo:
    vhost: "http://wpday.demo.welaika.com"
    wordpress_path: "/var/www/wpday.demo.welaika.com"
    database:
    [...]
    ftp:
    [...]
    production:
    vhost: "http://wpday.welaika.com"
    wordpress_path: "/var/www/wpday.welaika.com"
    database:
    [...]
    ssh:
    [...]

    View Slide

  24. $ wordmove push -t -e [demo | production]

    View Slide

  25. Case study

    View Slide

  26. Local
    ✓ Where you are developing
    Demo
    ✓ Where your customer is doing data entry
    Production
    ✓ Where the site is on air
    Case study

    View Slide

  27. $ wordmove pull -du -e demo

    View Slide

  28. View Slide

  29. Problem fixed!
    ✓ Push to the customer’s stage for review:
    $ wordmove push -t -e demo
    Customer approved!
    ✓ Go live with your site
    $ wordmove push -tud -e production
    Case study

    View Slide

  30. $ wordmove help pull
    Usage:
    wordmove pull
    Options:
    -w, [--wordpress]
    -u, [--uploads]
    -t, [--themes]
    -p, [--plugins]
    -l, [--languages]
    -d, [--db]
    -v, [--verbose]
    -s, [--simulate]
    -e, [--environment=ENVIRONMENT]
    -c, [--config=CONFIG]
    [--no-adapt]
    [--all]

    View Slide

  31. Good to know!
    ✓ DB serialized arrays translation (cForms anyone?)
    ✓ DB deploy over FTP? Yes, we can!
    ✓ Invoke wordmove from anywhere in your project tree

    View Slide

  32. WORDMOVE
    ✓ Fully automated, only one command to deploy
    ✓ Frequent and fast deploy... on multiple environments
    ✓ Push and pull operations
    ✓ If it doesn’t work, than fix it!

    View Slide

  33. ✓ Alessandro Fazzi @Pioneer_Skies
    ✓ Fabrizio Monti @delphaber
    ✓ weLaika dev.welaika.com
    http://github.com/welaika/wordmove
    QUESTIONS!
    Open Source

    View Slide