how to setup built-in webserver in PhpStorm

First (check your interpreter)

1- From File choose Setting

2- In setting navigate to PHP

3- In Interpreter (if you don't have interpreter you will see message like that )

enter image description here

Second (Add new interpreter)

1-Add new interpreter From Add sign (green plus +) --> choose (other)local if you work in your local pc

2-write any name you want refer to (default PHP)

3- navigate to your PHP directory file From PHP home*

I hope this help you

enter image description here

*If you use wamp you will find it in c:\wamp\bin\php(your php version)

If you use xamp you will find it C:\xampp\php


sudo apt-get install php-cgi

Maybe will help too.


if you install wamp server or any other local server in your pc... as i showed in below photos you can set the default localhost to wamp server

enter image description here

enter image description here