how to make a php website a localhost code example Example: simple localhost php 1) cd ~/public_html 2) php -S localhost:8000