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

Not Your Grandmother's WordPress v2, MidwestPHP

Not Your Grandmother's WordPress v2, MidwestPHP

Version 2 of this talk, given at Midwest PHP in March 2014

0953b75cd018be4c5bc5ebe973616df4?s=128

Jason Rhodes

March 15, 2014
Tweet

More Decks by Jason Rhodes

Other Decks in Programming

Transcript

  1. N O T Y O U R GRANDMOTHER’S W O

    R D P R E S S
  2. 2004

  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. YOU?

  15. WHAT THIS TALK IS NOT

  16. • A DEFENSE OF WORDPRESS • AN EXPLANATION OF WHY

    YOU SHOULD USE WORDPRESS WHAT THIS TALK IS NOT
  17. • A GUIDE FOR HOW TO SURVIVE WORDPRESS • A

    WALK-THROUGH OF WHAT WE’VE DONE AT JOHNS HOPKINS WHAT THIS TALK IS
  18. 1WILL I HAVE TO USE IT?

  19. STATISTICS* • 4 to 6 out of every 5 new

    websites are built on WordPress, every day
 • There are roughly 250 billion people in the US who “just want a simple website” and who think WordPress is “the coolest” INCLUDES A CONSIDERABLE AND UNKNOWN MARGIN OF ERROR * (And who have lots of money to spend.)
  20. None
  21. 2 WILL IT BE TORTURE?

  22. None
  23. None
  24. None
  25. None
  26. None
  27. SUGGESTED WORDPRESS 3 WILL I BE HATED?

  28. MANAGE DEPENDENCIES with style

  29. WORDPRESS IS A DEPENDENCY

  30. None
  31. None
  32. MANAGE DEPENDENCIES WITH STYLE conductor?

  33. MANAGE DEPENDENCIES WITH STYLE composer.json

  34. MANAGE DEPENDENCIES WITH STYLE

  35. MANAGE DEPENDENCIES WITH STYLE

  36. MANAGE DEPENDENCIES WITH STYLE WAIT

  37. MANAGE DEPENDENCIES WITH STYLE define(“WP_CONTENT_DIR”, “/path”);

  38. MANAGE DEPENDENCIES WITH STYLE WPACKAGIST + CUSTOM INSTALL PATHS

  39. MANAGE DEPENDENCIES WITH STYLE config/ public/ assets/ plugins/ uploads/ !

    vendor/
  40. MANAGE DEPENDENCIES WITH STYLE

  41. MANAGE DEPENDENCIES WITH STYLE

  42. MANAGE DEPENDENCIES WITH STYLE

  43. MANAGE DEPENDENCIES WITH STYLE

  44. MANAGE DEPENDENCIES WITH STYLE myApp/ public/ .htaccess assets/ plugins index.php

    ! vendor/ wordpress/ wordpress/ core… ! composer.json NO CONFIG ADMIN PAGES MISSING…
  45. MANAGE DEPENDENCIES WITH STYLE bin/wp-deploy-symlink.sh composer.json

  46. MANAGE DEPENDENCIES WITH STYLE myApp/ public/ .htaccess assets/ plugins wp

    -> ../vendor/wordpress/wordpress index.php vendor/ wordpress/ wordpress/ …core files… composer.json
  47. MANAGE DEPENDENCIES WITH STYLE ADD TO WP-CONFIG include ‘path/to/vendor/autoload.php’;

  48. MANAGE DEPENDENCIES WITH STYLE <?php ! ! use MyNamespace\CustomObject; !

    ! $event = new CustomObject(‘event’);
  49. MANAGE DEPENDENCIES WITH STYLE

  50. THE POST IS DEAD LONG LIVE THE POST

  51. KNOW YOUR DATA THE POST IS DEAD LONG LIVE THE

    POST
  52. OWN YOUR DATA THE POST IS DEAD LONG LIVE THE

    POST
  53. TABLE: POSTS THE POST IS DEAD LONG LIVE THE POST

  54. TABLE: POSTMETA THE POST IS DEAD LONG LIVE THE POST

  55. THE POST IS DEAD LONG LIVE THE POST • ARTICLE

    • PRODUCT • BOOK • EVENT • DEPARTMENT • PROGRAM • LOCATION
  56. THE POST IS DEAD LONG LIVE THE POST

  57. THE POST IS DEAD LONG LIVE THE POST

  58. MAKE YOUR OWN REST API

  59. MAKE YOUR OWN REST API DATA SHARING

  60. MAKE YOUR OWN REST API JAVASCRIPT APPS & COMPONENTS

  61. MAKE YOUR OWN REST API

  62. BYE BYE, THEMES

  63. BYE BYE, THEMES 1. Open up your index.php file 2.

    Change:
 
 
 to:
 
 3. That’s it.
  64. BYE BYE, THEMES TA DA!

  65. BYE BYE, THEMES CHOOSE YOUR OWN TEMPLATING ENGINE

  66. BYE BYE, THEMES

  67. BYE BYE, THEMES

  68. BYE BYE, THEMES

  69. BYE BYE, THEMES BUILD BUILD BUILD BUILD BUILD

  70. BYE BYE, THEMES

  71. wp_enqueue_script() HELP!

  72. DEPLOY WITH CONFIDENCE

  73. DEPLOY WITH CONFIDENCE

  74. DEPLOY WITH CONFIDENCE

  75. DEPLOY WITH CONFIDENCE Capfile

  76. DEPLOY WITH CONFIDENCE config/deploy/staging.rb

  77. DEPLOY WITH CONFIDENCE Task definition

  78. DEPLOY WITH CONFIDENCE myApp/ current -> releases/20131106133229 releases/ 20131009150239 20131028161941

    20131029163056 20131031180031 20131106133229 shared
  79. DEPLOY WITH CONFIDENCE Task running

  80. DEPLOY WITH CONFIDENCE WAIT

  81. DEPLOY WITH CONFIDENCE

  82. DEPLOY WITH CONFIDENCE VANDELAY WP PLUGIN: A simple options importer/exporter

    github.com/johnshopkins/vandelay
  83. DEPLOY WITH CONFIDENCE

  84. import/export diffs HELP!

  85. AUTOMATE ALL THE THINGS WITH CLI TOOLS

  86. AUTOMATE ALL THE THINGS WITH CLI TOOLS DRUPAL DRUSH SYMFONY

    CONSOLE ZF2 ZFTOOL WORDPRESS WP-CLI
  87. AUTOMATE ALL THE THINGS WITH CLI TOOLS

  88. AUTOMATE ALL THE THINGS WITH CLI TOOLS • wp shell

    • wp post edit 142 • wp scaffold [theme | plugin | post-type | taxonomy] • wp core install • wp core update • wp user generate
  89. AUTOMATE ALL THE THINGS WITH CLI TOOLS

  90. • MANAGE DEPENDENCIES WITH STYLE • THE POST IS DEAD

    (LONG LIVE THE POST) • BYE BYE, THEMES (HELLO SMALL MODULES) • DEPLOY WITH CONFIDENCE • AUTOMATE ALL THE THINGS WITH CLI TOOLS
  91. PHEW.

  92. None
  93. @RHODESJASON GITHUB.COM/JASONRHODES THANKS. *NOTES AND LINKS HERE, TOO RATE THIS

    TALK AT JOIND.IN/10545*