Run PHP Server On A Mac Without Installing Anything

  • Sonar Systems admin
    Likes 0

    Problem Description

    Running a simple file/project can become a long task if you have ot set up a local server especially if it’s a new/different computer. But on Mac you can actually run a PHP server easily for basic tasks using the terminal.

    Solution Description

    Steps for running a PHP Server on a Mac via the Terminal

    1. cd to project directory
    2. run the following command php -S 127.0.0.1:8080
    3. Go to your web browser and open http://127.0.0.1:8080/ or http://localhost:8080/ 

Login to reply