How to Install XAMPP on Windows & How to Install Composer
How to Install XAMPP on Windows
In order to build Laravel applications, we need to install PHP and MySQL on our machine. The easiest way to install PHP on Windows is through XAMPP. It is available on all three desktop operating systems—Windows, Linux, and Mac. However, on Mac it's best to use MAMP, which is compatible with the new M1 and M2 chips.
Now let's take a look at how to install XAMMP on Windows.
Go to https://www.apachefriends.org/download.html and download the installer for your operating system. Select the latest version of PHP, i.e. the one at the bottom of the list.
![Install wizard xammp pic 1](https://cms-assets.tutsplus.com/cdn-cgi/image/width=850/uploads/users/1997/posts/93381/image-upload/xamppwizard_pic_1.jpg)
1. Install Wizard
Double-click the installer, and then follow the prompts.
2. Installer Settings
You won’t need to change any of the installation settings—the defaults are all good as is.
![xammp select components pic 2](https://cms-assets.tutsplus.com/cdn-cgi/image/width=850/uploads/users/1997/posts/93381/image-upload/xammpselectcomponents_pic2.jpg)
![xammp location pic 3](https://cms-assets.tutsplus.com/cdn-cgi/image/width=850/uploads/users/1997/posts/93381/image-upload/xampplocation_pic3.jpg)
3. Installation Folder
Of particular note, you should leave the installation drive as the C:\
drive on Windows in order for things to function correctly.
You may also need to grant approval for XAMPP’s Apache installation to have network access through Windows Defender or any other firewall you might be running.
4. Control Panel
Continue following the prompts. When the installation is complete, leave the option checked that says Do you want to run the Control Panel now? Then close the installer, and you’ll see the XAMPP Control Panel appear.
If you missed the chance to leave that box checked, just run XAMPP from your list of installed software to start the Control Panel.
![xammp control panel pic 4](https://cms-assets.tutsplus.com/cdn-cgi/image/width=850/uploads/users/1997/posts/93381/image-upload/xamppcontrolpanel_pic4.jpg)
How to Install Composer
Once you have PHP installed on your system, it's easy to install Composer. First, download it from the Composer website.
1. Install Composer
Click on the downloaded Composer-Setup.exe file (for Windows) or the equivalent for your operating system. Run the installer, and it will install the latest Composer version.
How to Install Laravel
1. Open the Terminal
Now that you have installed PHP and Composer, creating a Laravel project is straightforward. Open your terminal.
2. Create a Laravel Project
Run the command below to create a brand new project inside a folder named my-app (or any project name you wish):
This will download all the necessary Laravel files for this project.
3. Start the Development Server
After the application has been created, cd into my-app and start your development server using the following commands:
Comments
Post a Comment