Local development environments empower developers to work offline, code more efficiently, cut down on privacy concerns, and take risks. WP Engine recently launched DevKit, a WordPress local development environment and build toolkit that seamlessly works with WP Engine and encourages better, faster code. DevKit offers a hand-picked selection of best-in-class WordPress developer tools, including a local development environment, all made for building, debugging, and deploying your best digital experiences yet. 

Currently available as an open beta, DevKit is free to download and works with any WordPress environment (although it’s optimized specifically for the WP Engine Digital Experience Platform). To help you become more familiar with the benefits of DevKit and the technology involved, here are four ways the environment works to expedite your workflow:

Manage Your Sites Directly Via WP-CLI 

Working with the WordPress Command Line Interface (WP-CLI) tool will enable you to tackle administrative tasks in WordPress more efficiently. WP-CLI supports nearly every action you need to manage a WordPress site including Installing the platform, executing WordPress core updates, managing WordPress themes and plugins, creating child themes, and importing media files in bulk. For agencies managing several sites,  WP-CLI allows you to manage multiple WordPress sites on your WP Engine account with single commands. 

DevKit users can access WP-CLI directly to access their local environment or through SSH to access their local host. This way, users won’t have to toggle back and forth between dashboards to perform management tasks on your WordPress sites; WP-CLI will help work more efficiently so you can move forward with the projects you actually want to work on. For more information, check out the complete list of commands on the DevKit Command Line Interface.  

Do “Live” Testing, Locally

Even while developing locally, there will be times when you are going to want to preview a site to a client or colleague. Unfortunately, developers are often working on private IP networks making it hard to expose a local socket to the outside. There are multiple ways to go about exposing your work but DevKit uses innovate tools to do that work for you. 

Ngrok is a tool you can use to expose a local server to the public Internet by assigning a randomized URL. Nogrok works by setting up a tunnel between their servers and your local environment. No staging environment necessary! 

Save Time by Automating Code Tests 

Code testing is essential to any successful workflow. It’s not practical, and frankly wasteful, to test your code manually. Automated testing refers to the use of special software (separate from the software being tested) to control the execution of tests and the comparison of actual outcomes with predicted outcomes. DevKit uses PHPUnit, the official testing framework used by WordPress core to test PHP code, for unit testing. 

Unit tests verify that a block of code, function or class method does what it is intended to do. Using PHPUnit in DevKit simply requires a few commands. You can find more For more information on working with PHPUnit and writing PHPUnit tests in the official WordPress documentation.

Efficiently and Effectively Debug 

After you tested your code, you’ll want to fix the bugs that you’ve uncovered. Then, you’ll want to fix the bugs you created when debugging the previous bugs. Developers know that this is a tedious and often frustrating task. To help mitigate this problem, DevKit comes equipped with Xdebug, a PHP extension for debugging code. 

Xdebug allows you to break during code execution, inspect all the variables in scope during a request, and pinpoint the changes you need to make. This means troubleshooting can happen in one iteration, saving a huge amount of time when tracking down issues. Xdebug helps encourage developers to debug proactively rather than backtracking. With DevKit, Xdebug works locally via SSH. 

For a more large-scale overview of application performance, DevKit uses Webgrind. Webgrind is a frontend viewer for Xdebug output and, because it’s included in DevKit, no additional configuration is required to use it. 

Learn More About DevKit

WP Engine’s DevKit is currently available in open beta for any WordPress environment. It is free to download for anyone using WordPress-not just WP Engine customers. If you’d like more information on developer workflow and how WP Engine works to make things more efficient, check out our ebook: Maximizing Your Development Workflow with the WP Engine DevKit