1. INSTALL XAMPP
XAMPP is the most popular PHP development environment.XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.
XAMPP can be easily installed using the below URL.
Just install the latest version (7.2.9) from the list. It is to be noted that only 32-bit version is available for Windows platform, but it works fine in 64 bit Windows.
Now you will get a XAMPP exe file on Downloads directory. Install this application by double-clicking it (Neglect the warnings by Windows). I have shown the screenshots of the installation steps below.
2. Clone/Paste PHP our application inside C:\xampp\htdocs
Now we need to clone or paste our PHP application inside C:\xampp\htdocs directory.
If your project is in Git, cone it with the below command.
git clone [git_repository_url]
Or, if your project is in another directory, copy and paste it to C:\xampp\htdocs.
3. Install packages/dependencies (optional)
If our PHP application using any packages/dependencies, we have to install it. The Composer is the most popular package manager for PHP. Running the below command from the root directory of our project install the packages in the package.json file.
4. Running our project
After everything is set, we can access our project from our browser window. I am assuming that my_php_app is the project directory we pasted/cloned in the previous step. Now we can start our PHP app using the URL.
This will open our PHP app on our browser.
Note that, it only works if our project’s root directory contains index.php or index.html. If not, use the below URL.