IMPORTANT: The server command now comes bundled with WP-CLI. This repository is kept for historical purposes only.
It uses the PHP built-in server to serve a given WordPress instance.
The main advantage is that you don't have to install and configure Nginx or Apache, which can be overkill if you just want to work on a theme or a plugin.
How is this different from Whippet?
The main difference is that we don't modify the wp-config.php
file, so you can run other WP-CLI commands while the server is running.
Yep; just write a WordPress plugin that checks PHP_SAPI == 'cli-server'
and redirects as appropriate.
For example, here's a working plugin for the Roots theme: leoj3n/wp-server-roots-rewrites.