To install Laravel 11 on Windows, you need to set up a local development environment using PHP, Composer, and a database like MySQL. Here’s a step-by-step guide to help you install Laravel 11 on your Windows machine:
- Install PHP:
- Download the latest version of PHP for Windows from the official PHP website.
- Follow the installation wizard, and make sure to add PHP to your system’s PATH.
- Install Composer:
- Download and run the Composer Windows Installer from getcomposer.org.
- Follow the installation instructions in the wizard.
- Install Laravel Installer:
- Open a command prompt and run the following command to install Laravel Installer globally:
composer global require laravel/installer
- Create a New Laravel Project:
- Once the installation is complete, navigate to the directory where you want to create your Laravel project using the command prompt.
- Run the following command to create a new Laravel project named
mylaravelapp
:laravel new mylaravelapp
- Start the Development Server:
- Navigate to your project directory:
cd mylaravelapp
- Start the Laravel development server by running the following command:
php artisan serve
- Verify Installation:
- Open your web browser and visit
http://localhost:8000
. You should see the default Laravel welcome page, indicating that your installation was successful.
- Set Up Database (Optional):
- If you want to use a database, you need to set up your
.env
file with your database credentials.
That’s it! You’ve successfully installed Laravel 11 on your Windows machine. You can now start building your Laravel applications. Make sure to check out the official Laravel documentation for more information on how to get started with Laravel development.