How to Install Laravel Framework in Windows
Part 1 of 5:
Installing XAMPP
- Open the XAMPP download page. Go to https://www.apachefriends.org/download.html in your computer's web browser.
- Scroll down to the "7.2.8 / PHP 7.2.8" heading. You'll find it near the bottom of the list of downloads.
- This is important; since Laravel requires PHP 7.13 or higher, you'll need to make sure you don't accidentally install an older version of XAMPP.
- Click Download (32 bit). It's a blue button to the right of the "7.2.8 / PHP 7.2.8" heading. This will download the XAMPP setup file onto your computer.
- Open the XAMPP setup file. Double-click the downloaded setup file to do so.
- Click Yes when prompted. This will open the XAMPP setup window.
- Navigate through the XAMPP setup process. Click through the XAMPP menus by doing the following:
- Click Next three times.
- Uncheck the "Learn more about Bitnami for XAMPP" box.
- Click Next twice.
- Click Finish when prompted. This will open the XAMPP language preferences pop-up window.
- Click Save when prompted. Doing so will save your default language settings and open the XAMPP dashboard.
- Start Apache. Click Start to the right of each of the "Apache" heading. This will turn on Apache. At this point, you're ready to install Composer.
- You can also do the same with the "MySQL" heading, but you'll need to have MySQL installed in order to do so.
Part 2 of 5:
Installing Composer
- Open the Composer website. Go to https://getcomposer.org/download/ in your computer's web browser.
- Select the Composer download link. Click the Composer-Setup.exe link near the top of the page.
- Open the downloaded Composer setup file. Double-click the "Composer-Setup" file to do so.
- Click Yes when prompted. This will open the Composer installation window.
- Click Next. It's at the bottom of the window.
- Select XAMPP if necessary. If you have multiple different command line-based PHP options installed on your computer, click the one listed in the drop-down box at the top of the window, then click C:xamppphpphp.exe in the drop-down menu.
- Click Next twice. This option is at the bottom of the menu.
- Click Install. It's at the bottom of the window. Composer will begin installing.
- Click Finish when prompted. Doing so signifies that Composer has been installed successfully.
Part 3 of 5:
Activating Composer
- Open Start
- Search for Command Prompt. Type in command prompt to do so.
- Right-click
- Click Run as administrator. It's in the drop-down menu.
- Click Yes when prompted. Doing so opens Command Prompt with administrator privileges.
- Enter the Composer validation command. Type in php composer.phar and press ↵ Enter.
- Wait for Composer to finish updating. Once the update completes, you can proceed with installing Laravel.
- If you receive an error when you run the "php composer.phar" command, you'll need to manually change the Composer directory before you proceed with installing Laravel.
Part 4 of 5:
Installing Composer Manually
- Close Command Prompt. If the last attempt to install Composer didn't work, you can use a PHP script in Command Prompt to manually install Laravel.
- Copy the installation script. Select the entire script in the code box below, then press Ctrl+C to copy it.
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');"
- Re-open Command Prompt. Doing so ensures that Command Prompt won't return any errors due to other commands interfering with your script.
- Paste in the script. Press Ctrl+V to add the script to Command Prompt. The script will automatically begin running.
- Remove the installer once the installation is complete. Simply press ↵ Enter once you see the "php -r "unlink('composer-setup.php');"" line appear to do so.
- Re-run the Composer command. Type the following into Command Prompt, then press ↵ Enter:
php composer.phar
Part 5 of 5:
Installing Laravel
- Close and re-open Command Prompt. Doing so ensures that you don't have any interference from past commands.
- Enter the Laravel installation command. Type in composer global require "laravel/installer" and press ↵ Enter. Laravel will immediately begin to install.
- Wait for Laravel to install. Once Laravel finishes installing, you'll see the regular Command Prompt tag (e.g., "system32>") appear below the list of commands. At this point, you can begin using Laravel as needed.
5 ★ | 1 Vote
You should read it
- How to add 'Open command window here as administrator' to the right-click menu on Windows 10
- How to Run Command Prompt Commands from a Windows Shortcut
- 10 tips for using Command Line Windows 10 users should know
- How to Locate Viruses Using the Attrib Command
- Del command in Windows
- How to Customize the Font in Windows Command Prompt
- How to use the command history function in Command Prompt
- Set command in Windows
May be interested
- What is the Microsoft .NET Framework? Why do I need to install .Net Framework on my computer?what is the microsoft .net framework? why is .net framework installed on the computer ?. when we install the software on our computer, we will encounter some cases that require the computer to have the .net framework to run. so what is the .net framework, at
- How to install Microweber CMS on CentOS and Rocky Linuxmicroweber is a free, open source drag-and-drop cms website builder written in the php programming language and laravel 5 framework.
- Effective Microsoft .NET Framework repair and removal toolthe .net framework is a collection programming platform of programming libraries that are installed or available in microsoft operating systems. this will help users to run as well as use programs that require installing the .net framework.
- How to check .NET Framework version on Windows 10some software requires you to install the appropriate version of the .net framework to run, here are the two simplest and most common ways to check the .net framework version.
- How to activate .Net Framework 3.5 on Windows 10how to enable .net framework 3.5 on win10. some old software still works and requires .net framework 3.5 and you have to do the following to re-enable .net framework 3.5 on windows 10.
- .NET Framework 3.0 (WinFX)at the end of may 2006, microsoft unveiled the beta version of windows vista with a number of models and tools for developing windows applications such as .net framework 3.0 (formerly known as winfx), office 2007 ... in there are tools related to .net framework 3.0
- Installing C # environmentin this chapter, we will introduce the tools needed to install the c # environment. we mentioned that c # is part of the .net framework and is used to write .net applications. therefore, before discussing the tools available to run a c # program, you should understand how c # relates to the .net framework.
- Download Net Framework 4.5 full Online - Offlinemicrosoft .net framework 4.5.2 full is a programming platform that supports the use and installation of software on personal computers. net framework 4.5.2 is a new upgraded version with many features that support many software on the system, helping your operating system operate more stably and securely.
- Instructions for Downloading .Net Framework and Installing it on Your Computerinstructions for downloading .net framework and the easiest and fastest way to install it on your computer so you can use it in just a few minutes.
- Is Framework Laptop the modular laptop you've been waiting for?framework laptop is a hot new modular laptop that has been praised by reviewers and tech enthusiasts alike. but why is everyone so excited about the release of the laptop framework? and what makes it different from other modular laptops that come before it?