setup php code localhost code example Example: simple localhost php 1) cd ~/public_html 2) php -S localhost:8000