Setting Up PHP Development Environment with VSCode on Linux
Setting Up PHP Development Environment with VSCode on Linux
Prerequisites
- Internet connection
- Linux
Setup
- Download and install VSCode from here
- Install php with:
apt install php php-cli php-cgi
- Go to VSCode Settings
- Make this settings:
- add this line like photo:
"php.validate.executablePath": "/usr/bin/php"
- add this line like photo:
- Install Extensions:
Ctrl+P
ext install bmewburn.vscode-intelephense-client
(PHP Intelephense)ext install brapifra.phpserver
(PHP Server)
- Restart VSCode
- Create an index.php file, right click an you can see
PHP: Serve Project
andPHP Server: Stop Serve
- Open browser and go to
localhost
This post is licensed under
CC BY 4.0
by the author.