php -S 127.0.0.1:8000 -t public

Category: Web App Development

php -S 127.0.0.1:8000 -t public

Run PHP's built-in dev server rooted at public

Serves the public directory as the document root, the common layout where only public is web-accessible. Requests map to files inside it and index.php is the default entry point. Stop the process with Ctrl+C.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.