PHPackages                             wp-cli/server-command - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. wp-cli/server-command

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

wp-cli/server-command
=====================

Launches PHP's built-in web server for a specific WordPress installation.

v2.0.17(2mo ago)687.2M↑20.7%195MITPHPCI passing

Since Mar 13Pushed 1mo ago6 watchersCompare

[ Source](https://github.com/wp-cli/server-command)[ Packagist](https://packagist.org/packages/wp-cli/server-command)[ Docs](https://github.com/wp-cli/server-command)[ RSS](/packages/wp-cli-server-command/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (35)Used By (5)

wp-cli/server-command
=====================

[](#wp-cliserver-command)

Launches PHP's built-in web server for a specific WordPress installation.

[![Testing](https://github.com/wp-cli/server-command/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/server-command/actions/workflows/testing.yml) [![Code Coverage](https://camo.githubusercontent.com/0d6e33456fb3f857c5772beac5c867555a469f02a3e1c3d7c6d373c62134f889/68747470733a2f2f636f6465636f762e696f2f67682f77702d636c692f7365727665722d636f6d6d616e642f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/wp-cli/server-command/tree/main)

Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contributing) | [Support](#support)

Using
-----

[](#using)

```
wp server [--host=] [--port=] [--docroot=] [--config=] [--adapt-scheme] [...]

```

Uses `php -S` to launch a web server serving the WordPress webroot.

Importantly, PHP's built-in web server doesn't support `.htaccess` files. If this is a requirement, please use a more advanced web server.

**OPTIONS**

```
[--host=]
	The hostname to bind the server to.
	---
	default: localhost
	---

[--port=]
	The port number to bind the server to.
	---
	default: 8080
	---

[--docroot=]
	The path to use as the document root. If the path global parameter is
	set, the default value is it.

[--config=]
	Configure the server with a specific .ini file.

[--adapt-scheme]
	Replace HTTPS URLs matching the original site URL with HTTP in server responses.
	Useful when the site is configured with HTTPS but the development server runs on HTTP.

[...]
	Optional arguments to pass to the PHP binary. Any arguments after `--`
	will be passed through to the `php` command.

```

**EXAMPLES**

```
# Make the instance available on any address (with port 8080)
$ wp server --host=0.0.0.0
PHP 5.6.9 Development Server started at Tue May 24 01:27:11 2016
Listening on http://0.0.0.0:8080
Document root is /
Press Ctrl-C to quit.

# Run on port 80 (for multisite)
$ wp server --host=localhost.localdomain --port=80
PHP 5.6.9 Development Server started at Tue May 24 01:30:06 2016
Listening on http://localhost1.localdomain1:80
Document root is /
Press Ctrl-C to quit.

# Configure the server with a specific .ini file
$ wp server --config=development.ini
PHP 7.0.9 Development Server started at Mon Aug 22 12:09:04 2016
Listening on http://localhost:8080
Document root is /
Press Ctrl-C to quit.

# Pass extra parameters to the PHP binary
$ wp server --docroot=public -- -dzend_extension=xdebug.so
PHP 7.4.0 Development Server started at Wed Nov 10 18:00:00 2025
Listening on http://localhost:8080
Document root is /var/www/public
Press Ctrl-C to quit.

# Adapt HTTPS links when the site is configured with HTTPS
$ wp server --adapt-scheme
PHP 8.0.0 Development Server started at Wed Nov 10 18:00:00 2025
Listening on http://localhost:8080
Document root is /var/www/html
Press Ctrl-C to quit.

```

Installing
----------

[](#installing)

This package is included with WP-CLI itself, no additional installation necessary.

To install the latest version of this package over what's included in WP-CLI, run:

```
wp package install git@github.com:wp-cli/server-command.git

```

Contributing
------------

[](#contributing)

We appreciate you taking the initiative to contribute to this project.

Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.

For a more thorough introduction, [check out WP-CLI's guide to contributing](https://make.wordpress.org/cli/handbook/contributing/). This package follows those policy and guidelines.

### Reporting a bug

[](#reporting-a-bug)

Think you’ve found a bug? We’d love for you to help us get it fixed.

Before you create a new issue, you should [search existing issues](https://github.com/wp-cli/server-command/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.

Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/wp-cli/server-command/issues/new). Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, [review our bug report documentation](https://make.wordpress.org/cli/handbook/bug-reports/).

### Creating a pull request

[](#creating-a-pull-request)

Want to contribute a new feature? Please first [open a new issue](https://github.com/wp-cli/server-command/issues/new) to discuss whether the feature is a good fit for the project.

Once you've decided to commit the time to seeing your pull request through, [please follow our guidelines for creating a pull request](https://make.wordpress.org/cli/handbook/pull-requests/) to make sure it's a pleasant experience. See "[Setting up](https://make.wordpress.org/cli/handbook/pull-requests/#setting-up)" for details specific to working on this package locally.

### License

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

Support
-------

[](#support)

GitHub issues aren't for general support questions, but there are other venues you can try:

*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance89

Actively maintained with recent releases

Popularity59

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~121 days

Recently: every ~232 days

Total

28

Last Release

63d ago

Major Versions

v1.0.9 → v2.0.02018-08-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b5740d002b5556abcceed36e016c8f8ba6f533eefef6107b3c60a830704993b?d=identicon)[danielbachhuber](/maintainers/danielbachhuber)

![](https://www.gravatar.com/avatar/6dde7f578e5530884238e7173f768ae3a890b6d66eb99262a82f2c494a1b67d4?d=identicon)[schlessera](/maintainers/schlessera)

---

Top Contributors

[![schlessera](https://avatars.githubusercontent.com/u/83631?v=4)](https://github.com/schlessera "schlessera (90 commits)")[![swissspidy](https://avatars.githubusercontent.com/u/841956?v=4)](https://github.com/swissspidy "swissspidy (40 commits)")[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (29 commits)")[![wojsmol](https://avatars.githubusercontent.com/u/4176111?v=4)](https://github.com/wojsmol "wojsmol (15 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (7 commits)")[![gitlost](https://avatars.githubusercontent.com/u/481982?v=4)](https://github.com/gitlost "gitlost (6 commits)")[![scribu](https://avatars.githubusercontent.com/u/225715?v=4)](https://github.com/scribu "scribu (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")[![janw-me](https://avatars.githubusercontent.com/u/1026882?v=4)](https://github.com/janw-me "janw-me (2 commits)")[![ernilambar](https://avatars.githubusercontent.com/u/2098823?v=4)](https://github.com/ernilambar "ernilambar (2 commits)")[![ssnepenthe](https://avatars.githubusercontent.com/u/10903810?v=4)](https://github.com/ssnepenthe "ssnepenthe (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")[![waviaei](https://avatars.githubusercontent.com/u/1564991?v=4)](https://github.com/waviaei "waviaei (1 commits)")[![daalderp](https://avatars.githubusercontent.com/u/6084166?v=4)](https://github.com/daalderp "daalderp (1 commits)")[![francescolaffi](https://avatars.githubusercontent.com/u/357331?v=4)](https://github.com/francescolaffi "francescolaffi (1 commits)")[![mrsdizzie](https://avatars.githubusercontent.com/u/1669571?v=4)](https://github.com/mrsdizzie "mrsdizzie (1 commits)")[![mweimerskirch](https://avatars.githubusercontent.com/u/362092?v=4)](https://github.com/mweimerskirch "mweimerskirch (1 commits)")[![DrewAPicture](https://avatars.githubusercontent.com/u/995399?v=4)](https://github.com/DrewAPicture "DrewAPicture (1 commits)")

---

Tags

clihacktoberfestlocallocalhostserverwordpresswp-cliwp-cli-package

### Embed Badge

![Health badge](/badges/wp-cli-server-command/health.svg)

```
[![Health](https://phpackages.com/badges/wp-cli-server-command/health.svg)](https://phpackages.com/packages/wp-cli-server-command)
```

###  Alternatives

[wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

1048.8M55](/packages/wp-cli-entity-command)[wp-cli/scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.

1717.7M15](/packages/wp-cli-scaffold-command)[wp-cli/i18n-command

Provides internationalization tools for WordPress projects.

11610.4M52](/packages/wp-cli-i18n-command)[wp-cli/extension-command

Manages plugins and themes, including installs, activations, and updates.

919.0M53](/packages/wp-cli-extension-command)[wp-cli/db-command

Performs basic database operations using credentials stored in wp-config.php.

768.0M30](/packages/wp-cli-db-command)[wp-cli/profile-command

Quickly identify what's slow with WordPress.

294332.2k2](/packages/wp-cli-profile-command)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
