Download ArticleDownload Article

This How.com.vn teaches you how to install the Laravel framework for your PHP client on a Windows computer.

Part 1
Part 1 of 5:

Installing XAMPP

Download Article
  1. How.com.vn English: Step 1 Open the XAMPP download page.
    Go to https://www.apachefriends.org/download.html in your computer's web browser.
  2. Step 2 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.
    Advertisement
  3. How.com.vn English: Step 3 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.
  4. How.com.vn English: Step 4 Open the XAMPP setup file.
    Double-click the downloaded setup file to do so.
  5. How.com.vn English: Step 5 Click Yes when prompted.
    This will open the XAMPP setup window.
  6. How.com.vn English: Step 6 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.
  7. How.com.vn English: Step 7 Click Finish when prompted.
    This will open the XAMPP language preferences pop-up window.
  8. How.com.vn English: Step 8 Click Save when prompted.
    Doing so will save your default language settings and open the XAMPP dashboard.
  9. How.com.vn English: Step 9 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.
  10. Advertisement
Part 2
Part 2 of 5:

Installing Composer

Download Article
  1. How.com.vn English: Step 1 Open the Composer website.
    Go to https://getcomposer.org/download/ in your computer's web browser.
  2. How.com.vn English: Step 2 Select the Composer download link.
    Click the Composer-Setup.exe link near the top of the page.
  3. How.com.vn English: Step 3 Open the downloaded Composer setup file.
    Double-click the "Composer-Setup" file to do so.
  4. How.com.vn English: Step 4 Click Yes when prompted.
    This will open the Composer installation window.
  5. How.com.vn English: Step 5 Click Next.
    It's at the bottom of the window.
  6. How.com.vn English: Step 6 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:\xampp\php\php.exe in the drop-down menu.
  7. How.com.vn English: Step 7 Click Next twice.
    This option is at the bottom of the menu.
  8. How.com.vn English: Step 8 Click Install.
    It's at the bottom of the window. Composer will begin installing.
  9. How.com.vn English: Step 9 Click Finish when prompted.
    Doing so signifies that Composer has been installed successfully.
  10. Advertisement
Part 3
Part 3 of 5:

Activating Composer

Download Article
  1. How.com.vn English: Step 1 Open Start icon.
    Click the Windows icon in the bottom-left corner of the screen.
  2. How.com.vn English: Step 2 Search for Command Prompt.
    Type in command prompt to do so.
  3. How.com.vn English: Step 3 Right-click icon Command Prompt.
    You should see it appear at the top of the Start window. A drop-down menu will appear.
  4. How.com.vn English: Step 4 Click Run as administrator.
    It's in the drop-down menu.
  5. How.com.vn English: Step 5 Click Yes when prompted.
    Doing so opens Command Prompt with administrator privileges.
  6. How.com.vn English: Step 6 Enter the Composer validation command.
    Type in php composer.phar and press Enter.
  7. How.com.vn English: Step 7 Wait for Composer to finish updating.
    Once the update completes, you can proceed with installing Laravel.
  8. Advertisement
Part 4
Part 4 of 5:

Installing Composer Manually

Download Article
  1. How.com.vn English: Step 1 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.
  2. How.com.vn English: Step 2 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.phpphp -r "unlink('composer-setup.php');"
  3. How.com.vn English: Step 3 Re-open Command Prompt.
    Doing so ensures that Command Prompt won't return any errors due to other commands interfering with your script.
  4. How.com.vn English: Step 4 Paste in the script.
    Press Ctrl+V to add the script to Command Prompt. The script will automatically begin running.
  5. How.com.vn English: Step 5 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.
  6. How.com.vn English: Step 6 Re-run the Composer command.
    Type the following into Command Prompt, then press Enter:
    php composer.phar
  7. Advertisement
Part 5
Part 5 of 5:

Installing Laravel

Download Article
  1. How.com.vn English: Step 1 Close and re-open Command Prompt.
    Doing so ensures that you don't have any interference from past commands.
  2. How.com.vn English: Step 2 Enter the Laravel installation command.
    Type in composer global require "laravel/installer" and press Enter. Laravel will immediately begin to install.
  3. How.com.vn English: Step 3 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.
  4. Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • Due to Laravel's dependency on up-to-date PHP, you may have to update XAMPP more often than you did previously.


      Advertisement

      About This Article

      How.com.vn English: Jack Lloyd
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for How.com.vn. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 377,186 times.
      How helpful is this?
      Co-authors: 29
      Updated: December 1, 2019
      Views: 377,186
      Article SummaryX

      1. Download XAMPP from https://www.apachefriends.org/download.html.
      2. Run the setup file to install.
      3. Download Composer from https://getcomposer.org/download.
      4. Run the setup file to install.
      5. Open the Command Prompt as an administrator.
      6. Type "php composer.phar" and press Enter.
      7. Run the activation script.
      8. Type composer global require "laravel/installer"' and press Enter.

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 377,186 times.

      Reader Success Stories

      • How.com.vn English: Raju KSN

        Raju KSN

        Aug 16, 2016

        "Simple and helpful. Keep up the good work!!!"
      Share your story

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement