How to Start & Run PHP Files Directly in VSCode Using LIVE Development Server in Browser
Aug 26, 2026
Buy the full source code of application here:
Watch My Visual Studio Code IDE Setup Video For Fonts,Themes & Extensions
https://youtu.be/Bon8Pm1gbX8
Hi Join the official discord server to resolve doubts here:
https://discord.gg/cRnjhk6nzW
Visit my Online Free Media Tool Website
https://freemediatools.com/
Buy Premium Scripts and Apps Here:
https://procodestore.com/
Show More Show Less View Video Transcript
0:00
Uh hello guys, in this video I'll show
0:02
you how to actually install a PHP live
0:05
local development server and run your
0:07
HTML
0:09
file directly in VS code. So, there is
0:11
an extension for this that you can
0:12
install. Go to extensions tab and this
0:15
PHP server if will come. Simply type the
0:19
inside the extensions tab PHP server.
0:22
If you type this, the very first
0:24
extension which comes
0:26
Uh personally I use this extension.
0:29
There are a lot of extensions which will
0:31
come. PHP
0:33
PHP live server but you need to install
0:36
the very first extension which comes,
0:38
PHP server. And it's basically serves
0:41
your project with PHP. So, if you are a
0:43
PHP developer, it automatically adds you
0:46
the appropriate headers.
0:48
So, it automatically starts a local host
0:53
local development server. So, serve your
0:56
project with PHP. It's got almost 3
0:58
million installs. So, PHP server, simply
1:00
install this extension. After that
1:05
Uh let me create a PHP file here,
1:07
index.php.
1:09
And
1:13
I simply write here hi.
1:21
And then simply create a file here.
1:26
Hello world.
1:30
So, as you see we are running this PHP
1:32
file right here, index.php.
1:35
And now to run this, it's quite easy.
1:37
Once you install the extension, you will
1:39
see these options appearing.
1:40
PHP server
1:43
reload, open file in browser, stop the
1:46
server. So, these four options will
1:47
come. Now, to start the project, you
1:49
simply select the first option, serve
1:51
projects. So, now as you see it started
1:54
the server, localhost 3000 index.php.
1:58
So, your project is running.
2:00
Let me make the windows side by side.
2:03
So if I make any kind of changes to it,
2:06
let's suppose I change this I
2:09
My name is
2:13
So now if you do want to refresh this,
2:15
you simply click the second option
2:17
reload server.
2:18
And it will reload the server and
2:21
automatically all your changes will be
2:23
reflected back. So you can do this
2:25
once you add some more content to the
2:27
page.
2:43
So again
2:44
you click on reload server.
2:46
And now your paragraph is added.
2:49
So once you make changes, you can select
2:51
the second option to actually reload the
2:53
PHP server.
2:55
And uh
2:56
you can open file in browser. Now if you
2:59
do want to stop this, you select the
3:01
last option to stop this.
3:03
So it's quite a very simple way to run
3:05
PHP files directly inside VS Code.
3:09
As you see, this is a PHP file that
3:11
we're running and
3:13
it actually saves you a lot of time. You
3:15
don't need to require any extra
3:18
software. So this extension simply
3:20
install this
3:21
and run your PHP files directly inside
3:24
VS Code.
3:25
And it actually starts a local
3:28
development server. By default, it will
3:30
run on local host 3000.
3:33
So this is the actual
3:35
PHP server extension. Definitely check
3:38
this out.
3:39
It has its some settings. You can
3:41
customize it. Go to setting section.
3:44
So if you click on settings, so by
3:47
default as you you can check by default
3:50
it is set to local host, but you can
3:52
even change that as well. You can
3:54
directly provide where PHP is installed,
3:58
the path to PHP.ini
4:00
file.
4:02
If empty, the extension uses the default
4:04
path. So, PHP is already installed in my
4:07
system, so for this extension to work,
4:09
PHP do need to install.
4:11
And
4:13
by default, you can also change the port
4:15
number as well. So, it uses 3000 port
4:18
number as the default port number. So,
4:20
these are some of the settings you can
4:21
change inside this extension, PHP Server
4:24
it is called. Definitely install this
4:27
and start running your PHP files in VS
4:30
Code.
#Jobs & Education
