How to Setup PHP in VSCode for Web Development (2024)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's see how we can set up and run phsp projects in Visual Studio code first go to your extensions here or hit control shift X as a shortcut and search for PHP now here you will see PHP intelligence so I already have it installed but in your case you'll have to install it so let me just uninstall this and let me show you how you can install it okay so this is now uninstalled so click on this install button and this will be installed for you okay now if you scroll back in quick start it will tell you to disable buil-in vs code PHP language feature so we need to disable the built-in feature for PHP C formatting so that we can use this PHP intell Defence so copy this built-in PHP or you can just type it and search it and you will get this so go here and disable both of these I have already done it but in your just click the disable button go here and again click the disable button okay now we have installed the PHP intelence now we again need to install another extension so that we can drawn our PHP files so to do that search for PHP server now here you get this click on this that has 1.6 million installs as of now and from brra I don't know if I pronounced it correctly so and now just click on install okay so we have now installed the PHP server so that we can actually run our PHP files in our web browser as a server and we have installed PHP intelligence and why did we install this for you know Coe intelligence that means for formatting autoc complete code completion and all that stuff so now let's go ahead and let's create a folder in which we will write our PHP code so let's go to desktop and let's create a new folder let's call it my PHP website go inside this and click on select folder here create a new PHP file and I'll just call it text. PHP here let's write some PHP code okay so there is no color coding here so what you need to do is I think I disabled something that should I should not have disabled so here you have two things right language Basics and language features so what you need to do is just disable the features not the basics so I'll just reenable it all right and I'll go back to my file and now yeah everything is colorcoded so excuse me for that okay now PHP is here let's see how we can run this now just right click and click on PHP server serve project and here as you can see hello world is shown now in your case you might get an error that says PHP not found or something like that that is because PHP is either not installed in your computer or PHP is not added to your environment variables now how can you install PHP so in Windows or in Linux or in Mac you can install PHP by installing Zam so I have already installed Zam here so I have PHP already installed with me or you can do a standalone installation of PHP check the link in the description and they will show you how to install PHP systemwide that is independent of vs code so what we just installed is just for vs code but we need an underlying PHP check the link in the description I'll show you how you can install that
Info
Channel: The Code City
Views: 4,528
Rating: undefined out of 5
Keywords: install php in vscode, run php in vscode, setup php in vscode, setup php in visual studio code, php for visual studio code, how to install php in visual studio code
Id: aOPIB_9zoIk
Channel Id: undefined
Length: 4min 13sec (253 seconds)
Published: Wed Jan 17 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.