How to Setup/Run PHP 8.3 in VSCode without XAMPP (2024 Update)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's see how we can set up PHP and run PHP in Visual Studio code without zamp first we will install PHP without zamp then we will add PHP to environment variable and finally we will install the required PHP extension so let's get started first go to this URL I'll have this in the description below and click on this ZIP here let's wait till this download is complete so finally our PHP code is now downloaded so let's go back to our downloads folder and from here I'll move it to C drive and just paste it here or wherever you want so click on continue and once this is copied right click on this and click on extract all and click on extract so now the file is successfully extracted I will just rename this so that the path or the folder name is a bit easier I'll call it just PHP and we can delete this now okay so once we have PHP downloaded and extracted I'll go to my visual studio code and let's create a new project so I'll just click on file open folder and desktop I'll just create a new folder for our project let's call it my PHP project select this folder and let's create a PHP file and let's see what happens when you try to run it so I'll call it indps PHP and I just paste some PHP code this is just a sample PHP code and let's try to run this so click on run and click on run without debugging anything and as you can see you'll get this message that says there is no PHP extension so what you need to do is go to search and search for not search go to extensions and search for phb intelence and this is the one intelence from intell defense.com click install and as you can see you will have to disable the built-in PHP extension to use this so I'll just search for this and then disable that extension let's search for this and in my case I already have it disabled but in your case you can disable this if it is uh showing enabled now go back to your file here sorry go back to extensions and search for PHP server now you'll see this the first result from VRA with the these many downloads and these many ratings now click on install Okay so once both the extensions are installed go back to your PHP file and right click and click click on PHP server serve project now here you will see this message PHP not found this is because we have downloaded PHP file here but we have not added this to inment variable so copy this and press your Windows key and search for environment variables click on environment variables come here to path and double click on this and double click on this empty row at the bottom and paste it click okay click okay and click okay again and finally go back to your vs code and let's try running this again right click and click on PHP servers or project and you'll again see this message so close Visual Studio code and let's start Visual Studio code again this time I will right click and do this again and this time as you can see our code is working and our PHP is hosed so this is how you can set up PHP and if you want to open that page again after closing what you can do is just click on control click on this link and your page will open again if you have any questions let me know in the comments below
Info
Channel: The Code City
Views: 212
Rating: undefined out of 5
Keywords: setup php in vscode, setup php in visual studio code, run php in vscode, run php in vscode without xampp, install php without xampp vscode, php without xampp visual studio code
Id: _We4tQM4Axw
Channel Id: undefined
Length: 4min 19sec (259 seconds)
Published: Tue Apr 02 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.