How to run PHP Using VS Code (Visual Studio Code)

Requirements:

  • PHP (make sure it was added on your Environment Variables Path)
  • VS Code (Visual Studio Code)

Step 1:

Go to the VSCode Extensions and search ‘@builtin php‘, then choose PHP Language Features and Disable it.

Step 2:

Search again on the Extensions ‘php intelephense‘ and choose PHP Intelephense, then click the Install button .

Step 3:

After that, search ‘php server‘ on the Extensions and choose PHP Server, then click the Install button and wait the installation to be completed.

Now you can start creating php project and run it by simply right clicking the php file and selecting PHP Server: Serve Project.

After that you will automatically redirect to your created php project.

Reference:
https://www.youtube.com/watch?v=Ry8tRRfxxf4&t=59s

Leave a Comment

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