PHP Server on Mac

Have you ever wanted to host your website locally, ie. on your laptop?

Well, this is now easy since php comes with a built in server.

How to do it?

To get started, install php, open up terminal, and navigate to your website folder.

Then type

php -S localhost:8080

which will start your php server.

Access your website by opening your browser and visiting http://localhost:8080

Leave a Reply

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