Three steps to test PHP locally without installing a server

By | March 15, 2016

1. Install PHP 5.5+ which has a built-in server

sudo apt-get install php5

2. Create a directory for php files. For example public_html/index.php

3. Run

php -S localhost:8000

4. Check http://localhost:8000/index.php

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.