News Archive
PhpRiot Newsletter
Your Email Address:

More information

Using The PHP 5.4 Webserver On Windows

Note: This article was originally published at Planet PHP on 31 July 2012.
Planet PHP
Starting a server from the command line PHP 5.4 has an built-in webserver. For local development it is not necessary to install Apache Httpd or another webserver anymore. You can just start an server from the command line.

Change the directory to your project directory. The argument -S starts the webserver. You need to specify a host and a port. All requests are shown in the console window.

A Shortcut

To make things a little easier you can create a windows shortcut. This allows you to change the console window size, font and color, too. The following pictures show the particular steps:
Step 1: Create A Shortcut Step 2: Select the PHP binary Step 3: Name the shortcutStep 4: Change command and working directoryStep 5: Change the window size