How to Use PHP’s built-in Web Server

PHP (>= 5.4) comes with a built-in web server. This server can be used to run your Sulu application during development. This way, you don’t have to bother configuring a full-featured web server such as Apache or Nginx.


The built-in web server is meant to be run in a controlled environment. It is not designed to be used on public networks.

The server can be started with the server:start command. You will have to start two different servers for the administration and the website:

bin/adminconsole server:start
bin/websiteconsole server:start

These commands will start two servers listening on and in the background.

You can change the IP and port of the web servers by passing them as argument:

bin/adminconsole server:start
bin/websiteconsole server:start

The server can be stopped again with the server:stop command:

bin/adminconsole server:stop
bin/websiteconsole server:stop

Read the Symfony documentation on the built-in web server to learn more about the different server:* commands and options.