Developers, want to get the most out of WP Engine? From setup to build to maintenance mode, we’ll cover the tools, tips, and workflows to keep you efficient and agile.
To watch on-demand webinar, go to: https://wpengine.com/resources/on-demand-webinar-wp-engine-developer-experience/
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
The WP Engine Developer Experience. Increased agility, improved efficiency.
1. #wpewebinar
The WP Engine Developer
Experience.
Increased agility, improved efficiency
#wpewebinar
Scott Amerman and Michael Smith, WP Engine
2. #wpewebinar
What You’ll Learn
● Agile development with WordPress
● Git based workflows
● Working with multiple environments
● Automating your work
● Demo
● Get involved
3. #wpewebinar
Senior Product Marketing Manager
WP Engine
Scott Amerman
● Homebrews cider
● Worked in neuroprosthetics
● Has an amazing internal timer
Technical Architect
WP Engine
Michael Smith
● Escaped from Alcatraz twice
● Doesn't speak Norwegian
● Learned to drive a stick on an
800-mile solo road trip
4. #wpewebinar
Common dev tools
● Version Control System (e.g. Git, Subversion)
● Version Control Hosting Platform (e.g. GitHub, Bitbucket, GitLab)
● CI/CD Service (Codeship, CircleCI, TravisCI, Jenkins)
● Dependency Manager (Composer, npm)
● Task Runner (Gulp, Grunt, npm)
● Local Development tool (VVV, WP Docker, Local)
10. #wpewebinar
Git makes it easy to collaborate with a team of developers.
● One Git repository for each WordPress site
● Develop locally, and commit your changes to Git
● Use a centralized Git repository (e.g. GitHub, Bitbucket, GitLab)
● Deploy to WP Engine with Git
Best-Practice: Use a Git-based development workflow
11. #wpewebinar
One Git repository per site
Include:
● Your code: Themes & Plugins
Exclude:
● WordPress core files
● Media files
● WordPress config and WP Engine-specific files
Setting up the Git repository
12. #wpewebinar
Deploying to WP Engine with Git
WP Engine Git 1.0 (a.k.a Git Push)
● For pushing code changes to WP Engine
● Limitation: Code changes that are made on the live server are difficult
to merge back into Git
WP Engine Git 2.0 (coming soon)
● Integrated with SSH Gateway
● Ability to commit and pull changes that are made directly on the live
server
● Simplified user management & access control
15. #wpewebinar
• Use Git branches to track multiple streams of development
• Use a well-known branch names to track your Production, Staging or Dev
environments (e.g. "master" or "staging")
Best-Practice: One code repository, multiple environments
16. #wpewebinar
● Simplest way to get started
● Push from local machine directly to WP Engine
● Use multiple Git remotes:
○ Your centralized repository (e.g. GitHub)
○ One remote per WP Engine environment (e.g. prod, staging, dev)
Option 1: Manual Deployment
17. #wpewebinar
Option 2: Continuous Deployment
● Good for larger teams or sites with an automated build or test step
● Developers push to centralized repository, CI/CD tool will automatically
deploy to WP Engine
18. #wpewebinar
Why CI/CD?
● Standardize the deployment of your code
● Enforce coding standards
● Run automated tests
● CSS or JavaScript pre-processing
21. #wpewebinar
• A number of choices out there, common ones include WP Docker,
MAMP, VVV, Internal Vagrants
• You can use WP Engine backup points to get a complete copy to your
local machine
Local Development Environment
22. #wpewebinar
Great foundation for building your experiences
Built in SEO and security
Can start from scratch or build off a child theme
Recommended resources:
• Documentation in WP Engine User Portal
• Know the Code course
• Forums
25. #wpewebinar
Full List of Current Endpoints
End Point Description Create Read Update Delete
Accounts WP Engine Account(s) ✓
Sites Site Management ✓ ✓ ✓ ✓
Installs WordPress Installations ✓ ✓ ✓ ✓
Domains Domain Mapping ✓ ✓ ✓ ✓
Full descriptions and instructions here: https://wpengineapi.com/
26. #wpewebinar
Ways to leverage the WP Engine API
• Combine with WP-CLI for automatically creating and configuring
sites
• Assist in batch migrations
• Integrate WP Engine as part of your product offering
29. #wpewebinar
Anatomy of a WP-CLI command
wp plugin install amazon-polly --activate
argument options/flagscommand
30. #wpewebinar
• Setup new sites quickly
• Maintain multiple sites easily
• Troubleshoot WordPress faster
• Database admin
• Working with WP-CLI packages
Top use cases
31. #wpewebinar
It’s important to note that WP-CLI has a lot of great built in documentation, via wp help command
# install and activate my favorite plugins on my new install
$ wp plugin install woocommerce genesis-visual-hook-guide amazon-polly --activate
# import a list of users from a CSV, don’t update existing users
$ wp user import-csv users.csv --skip-update
We can even create a config file that defines aliases such as production, dev, and all!
# use a local config file to install and activate themes on multiple installs
$ wp @all theme install twentythirteen --activate
By using a WP CLI, we can quickly perform common tasks like installing plugins, importing
users, and adding a theme to a group of sites
Setting up sites quickly
32. #wpewebinar
# check to see which of my active plugins have updates pending
$ wp plugin list --update=available --status=active
# update all plugins, except WooCommerce and WordPress SEO
$ wp @dev plugin update --all --except=woocommerce,wordpress-seo
# delete the user associated with ID 123 and assign posts to user 567
$ wp user delete 123 --reassign 567
# delete all comments that have been flagged as spam
$ wp comment delete `wp comment list --status=spam --format=ids`
Maintaining sites more easily
Perform common maintenance tasks around things like plugin updates, user permissions, and
comment moderation
33. #wpewebinar
You can use New Relic APM to verify proper performance after a deploy
Using New Relic APM for faster dev cycles
39. #wpewebinar
Know the Code Course: Let’s Build a Developer’s Genesis Starter Child Theme
Learn More
Getting Started with SSH Gateway
Commands, Executors, and Jobs for testing a WordPress site and deploying to WPE installs
WP Engine API beta
Webinar: Developers, Be a Bada$$ with WP-CLI
Continuous Integration with CodeShip and WP Engine