How To Install Laravel on Windows, macOS, and Linux

Once installation is completed, click Finish.

3. Verify Composer Installation

Summary

curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer

5. Verify PHP and Composer Installations

Replace app-name above with whatever you wish.

As you dive deeper into Laravel, be sure to explore the wealth of resources available to help you learn and get the most out of this powerful tool. The Laravel community is known for its strong support and comprehensive documentation, so don’t hesitate to reach out if you need assistance.

When it comes to deploying your Laravel applications, consider using Kinsta Application Hosting. Kinsta provides a hosting solution that is optimized for Laravel, which is both strong and scalable. This ensures that your applications run smoothly and safely. You can manage your Laravel projects effectively with the help of Kinsta’s advanced features and world-class support.

Visit the Composer download page and download the Composer-Setup.exe file.

Composer for Windows download page. 
Composer for Windows download page.

Laravel offers built-in support for task scheduling, making it easy to automate tasks like sending emails or cleaning up old data. Additionally, Laravel’s authentication system simplifies the process of adding secure user authentication to your web applications.

Now, install Laravel by running the following command in the Terminal:

Visit the XAMPP download page and download the appropriate installer for your Windows version.

Geocodio is a geocoding service that converts addresses to latitude and longitude coordinates and vice versa. Laravel powers Geocodio’s web application, allowing it to provide its customers a reliable and efficient geocoding service.

October CMS

This will automatically download all the relevant Laravel files to create a new project.

5. Verify Laravel Installation

To install PHP, use the following command in the Terminal:

To start the local development server, execute the following command within the project directory:

This command will launch a local development server on port 8000. You can access your Laravel application by opening your web browser and navigating to:

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

composer create-project laravel/laravel app-name

http://127.0.0.1:8000

After installation, secure your MariaDB installation by running:

 

But first, let’s talk about what Laravel is, why it’s useful, and who can make the most of it.

What Is Laravel?

Laravel website.
Laravel website.

 

First, update your package index and install Apache by running the following commands in the Terminal:

 

Some of the key features and functionality offered by Laravel include:

Eloquent ORM For Database Interactions

cd app-name

7. Run the Laravel Server

Who Uses Laravel?

The New York Times uses Laravel for its internal web applications, helping the company to build and maintain complex web applications quickly and effectively.

St Jude Children’s Research Hospital

sudo systemctl enable apache2 sudo systemctl start apache2

2. Install PHP

Then go to the newly created project directory:

Make sure to select the correct PHP executable during the installation process (usually located in the XAMPP installation folder under xampp/php/php.exe).

Laravel provides intuitive syntax, built-in tools, and extensive documentation, enabling developers to create web applications quickly and efficiently, significantly reducing development time.

Readable and Maintainable Code

Laravel’s Object-Relational Mapping (ORM) allows for smooth and intuitive interactions with your database, making it easy to perform CRUD (Create, Read, Update, Delete) operations and manage relationships between tables.

Blade Templating Engine

To create a new Laravel project, use the following command in the Terminal:

With the server started you should then be able to access your app project via your web browser. To do this, open your browser and go to the following: https://localhost:8000

Homebrew is a package manager for macOS that simplifies the installation of software. To install Homebrew, open the Terminal and run the following command:

To verify that Laravel was installed correctly, open the Terminal and run the following command:

This article will guide you through the process of installing Laravel on Windows, macOS, and Linux operating systems.

php --version composer --version
php -v mysql --version composer -V

6. Install Laravel Using Composer

laravel --version

So you know you want to use Laravel, but what do you need to know before getting started with it? That’s what we’ll discuss next.

Laravel Prerequisites

sudo apt install mariadb-server

To verify that Laravel was installed correctly, open the Command Prompt and run the following command:

To access your Laravel application, run this command to launch a local development server on port 8000. Then, open your web browser and navigate to:

 

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar
sudo chmod +x /usr/local/bin/composer

5. Verify PHP, MariaDB, and Composer Installations

Follow the on-screen instructions to set up a root password and other security settings.

4. Install Composer

You can use Composer, which is now installed, to install Laravel globally on your system. To do so, open the Command Prompt and run the given command:

To launch the development server for the project, go to the project directory and run the specified command.

After a successful installation, you will be able to see the Laravel version.

6. Start The Server

Ensure your system meets the following requirements:

  • Supported operating systems: Windows, macOS, Linux
  • Hardware requirements: Minimal (dependent on PHP and Composer)
  • PHP installation: Required before installing Laravel
  • Composer installation: Required for Laravel installation

Versions

Wait for the installation process to complete.

7. Verify Laravel Installation

Next, install Node.js and npm (Node.js package manager) using Homebrew. In the Terminal, type the following command:

This command installs both Node.js and npm on your system.

3. Install PHP

But if you’re new to the framework or don’t know how to use it yet, don’t worry! This guide will help you get up and running with Laravel in no time.