how to run php server on a folder command line code example Example: run a server php with a specific folder terminal $ cd ~/public_html $ php -S localhost:8000 -t foo/