The document discusses modern tooling approaches for WordPress development. It recommends setting up a local development environment using tools like Composer, 12 Factor apps principles, and Vagrant. It also discusses leveraging plugins and libraries for custom fields, relations between custom content types, templating with Twig, CLI usage, coding standards and best practices around version control and deployment. The goal is to professionalize WordPress development and move it closer to web application development standards.
23. Wp-cli
Command line interface to interactwith Wordpress
Mostactions thatcan be undertaken with Wordpress
can be done through the command line
Wp core update
wp plugin install
Custom cli commands (migration, scripting, etc)
keanan@alphaparticle.com
AlphaParticle
@kkoppenhaver
24. Functions.php
Splitfunctions.php into multiple parts
template-tags.php, media.php, etc
Betteryet, if functionalitycan be encapsulated,
splititoutinto aplugin
Use namespaces to ensureyour functions don’t
conflict, because everything is global
keanan@alphaparticle.com
AlphaParticle
@kkoppenhaver
25. Frontend
You can use sass,justenqueueyour compiled
css
You can use webpackor gulp or npm or
whatever
Basically, findawayto outputacompiledJS/CSS
fileand you can use it
keanan@alphaparticle.com
AlphaParticle
@kkoppenhaver
26. Frontend (pt2)
You can havean entirelydecoupled front-end
oraSPAtype of site
WP RESTAPI (in core since 4.7)
Caveat:Auth is hard
Caveat2: Plugins
keanan@alphaparticle.com
AlphaParticle
@kkoppenhaver
27. Coding standards
Usefulwhen workingacrossateam
Phpcs andWPCS
WPCSactually includes:Wordpress-core,wordpress-
docs,Wordpress-extra(WPCORE++),Wordpress-vip
Can be hooked up toyour editor to run on save
keanan@alphaparticle.com
AlphaParticle
@kkoppenhaver
30. Version control
Some of the bestpracticeswe have covered
helpwith this
avoid constantfunctions.php merge
conflicts
Don’tversion controluploads…or plugins
(ifyou’re using composer)
keanan@alphaparticle.com
AlphaParticle
@kkoppenhaver
34. Deployment
Can useanything thathooks intoVCS
Trellis (uses bedrockand deploys
through Ansible)
Deploys should be the leastpainful
partofyourworkflow
keanan@alphaparticle.com
AlphaParticle
@kkoppenhaver