How to Install Laravel on Windows in 2025?



title: How to Install Laravel on Windows in 2025 description: A comprehensive guide to installing Laravel on Windows in 2025, including prerequisites, installation steps, and useful resources. keywords: Laravel 2025, Laravel installation, Windows, PHP, Composer, XAMPP author: Your Name date: 2025-05-10

Laravel is a popular PHP framework designed for web application development, renowned for its elegant syntax and robust features. In 2025, Laravel continues to be a preferred choice for developers. This guide walks you through the process of installing Laravel on Windows, ensuring you begin with the right foundation.

Best PHP Books to Buy in 2025

ProductFeaturesPrice
PHP & MySQL: Server-side Web Development
PHP & MySQL: Server-side Web Development
Shop Now
Check Amazon Price
Front-End Back-End Development with HTML, CSS, JavaScript, jQuery, PHP, and MySQL
Front-End Back-End Development with HTML, CSS, JavaScript, jQuery, PHP, and MySQL
Shop Now
Check Amazon Price
Programming PHP: Creating Dynamic Web Pages
Programming PHP: Creating Dynamic Web Pages
Shop Now
Check Amazon Price
PHP and MySQL: The Comprehensive Guide to Server-Side Web Development with PHP 8 – Build Dynamic Websites with Database Integration, Security, and More (Rheinwerk Computing)
PHP and MySQL: The Comprehensive Guide to Server-Side Web Development with PHP 8 – Build Dynamic Websites with Database Integration, Security, and More (Rheinwerk Computing)
Shop Now
Check Amazon Price
PHP Crash Course: The Complete, Modern, Hands-On Guide
PHP Crash Course: The Complete, Modern, Hands-On Guide
Shop Now
Check Amazon Price

Prerequisites

Before you install Laravel, ensure you have the following:

  1. PHP: Laravel requires PHP version 8.0 or higher. Ensure PHP is installed on your system. You can download the latest PHP version from the official PHP website.

  2. Composer: Laravel uses Composer for dependency management. Download and install Composer from the official Composer website.

  3. Web Server: A local web server setup such as XAMPP or WAMP is recommended. XAMPP is a popular choice and can be downloaded from the Apache Friends website.

Best PHP Books to Buy in 2025

ProductFeaturesPrice
PHP & MySQL: Server-side Web Development
PHP & MySQL: Server-side Web Development
Shop Now
Check Amazon Price
Front-End Back-End Development with HTML, CSS, JavaScript, jQuery, PHP, and MySQL
Front-End Back-End Development with HTML, CSS, JavaScript, jQuery, PHP, and MySQL
Shop Now
Check Amazon Price
Programming PHP: Creating Dynamic Web Pages
Programming PHP: Creating Dynamic Web Pages
Shop Now
Check Amazon Price
PHP and MySQL: The Comprehensive Guide to Server-Side Web Development with PHP 8 – Build Dynamic Websites with Database Integration, Security, and More (Rheinwerk Computing)
PHP and MySQL: The Comprehensive Guide to Server-Side Web Development with PHP 8 – Build Dynamic Websites with Database Integration, Security, and More (Rheinwerk Computing)
Shop Now
Check Amazon Price
PHP Crash Course: The Complete, Modern, Hands-On Guide
PHP Crash Course: The Complete, Modern, Hands-On Guide
Shop Now
Check Amazon Price

Installing Laravel

Follow these steps to install Laravel on your Windows machine:

Step 1: Install XAMPP

  1. Download XAMPP: Visit the Apache Friends website to download the latest XAMPP version compatible with PHP 8.0 or higher.

  2. Install XAMPP: Execute the installer and follow the on-screen instructions. Once installed, start the Apache and MySQL services from the XAMPP Control Panel.

Step 2: Verify PHP Installation

Open a command prompt and type the following to verify PHP is installed and available globally:

php -v

Step 3: Install Composer

  1. Download Composer: Visit the official Composer website and download the Composer-Setup.exe file.

  2. Install Composer: Run the downloaded file and ensure you select the option to install Composer globally. This allows you to use Composer from any command prompt.

Step 4: Create a New Laravel Project

  1. Open Command Prompt: Navigate to the directory where you wish to install your Laravel project.

  2. Run Laravel Installer: Use the following command to create a new Laravel project:

composer create-project --prefer-dist laravel/laravel my-laravel-app

Replace my-laravel-app with your desired project name.

  1. Navigate to Your Project:
cd my-laravel-app
  1. Serve the Application:
php artisan serve

Open your web browser and navigate to http://localhost:8000. You should see the Laravel welcome page, indicating a successful installation.

Best PHP Books to Buy in 2025

ProductFeaturesPrice
PHP & MySQL: Server-side Web Development
PHP & MySQL: Server-side Web Development
Shop Now
Check Amazon Price
Front-End Back-End Development with HTML, CSS, JavaScript, jQuery, PHP, and MySQL
Front-End Back-End Development with HTML, CSS, JavaScript, jQuery, PHP, and MySQL
Shop Now
Check Amazon Price
Programming PHP: Creating Dynamic Web Pages
Programming PHP: Creating Dynamic Web Pages
Shop Now
Check Amazon Price
PHP and MySQL: The Comprehensive Guide to Server-Side Web Development with PHP 8 – Build Dynamic Websites with Database Integration, Security, and More (Rheinwerk Computing)
PHP and MySQL: The Comprehensive Guide to Server-Side Web Development with PHP 8 – Build Dynamic Websites with Database Integration, Security, and More (Rheinwerk Computing)
Shop Now
Check Amazon Price
PHP Crash Course: The Complete, Modern, Hands-On Guide
PHP Crash Course: The Complete, Modern, Hands-On Guide
Shop Now
Check Amazon Price

Additional Resources

By following these steps, you can set up a Laravel environment on your Windows machine, ready for development. Whether you’re new to Laravel or looking to update your knowledge, these resources provide a solid foundation for working with Laravel in 2025.