In this comprehensive tutorial, you will be guided through the step-by-step process of installing the Laravel framework on various operating systems, including Windows 10/11, Mac, and Ubuntu. Whether you’re a beginner or an experienced developer, this tutorial is designed to help you set up Laravel with ease and get your development environment up and running.
How to Install Laravel 10|9|8 in Windows 11, macOS, Ubuntu 22.0|20.04
By following these steps, you can install Laravel on Windows 10/11, Mac, and Ubuntu systems and be ready to start creating your Laravel 10 applications.
- Installing Laravel on Windows 10/11
- Installing Laravel on Mac
- Installing Laravel on Ubuntu
Installing Laravel on Windows 10/11
First of all, open your terminal or cmd. Then you need to type the command In command prompt => composer create-project laravel/laravel Project-Name. It will install laravel fresh setup on your system.
composer create-project --prefer-dist laravel/laravel blog
OnceIf you’re using an ubuntu machine. open your terminal and go to your project root directory (
using the command cd blog ) and type the below command in the command prompt :
sudo chmod -R 777 storage
sudo chmod -R 777 bootstrap
Installing Laravel on Mac
First of all, open your terminal and execute the following command into it to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once you have installed homebrew in your mac system, now you need to execute the following commands to install PHP and Composer using Homebrew:
brew install php brew install composer
Then execute the following command to install Laravel using Composer on mac system:
composer global require laravel/installer
Installing Laravel on Ubuntu
First of all, open your terminal or command line and execute the following commands to install PHP and Composer:
sudo apt update sudo apt install php sudo apt install composer
Once you have executed the above given commands, now you need to execute the following command to install Laravel using Composer:
composer global require laravel/installer
After installing Laravel, you can create a new Laravel project by running the
laravel new command followed by the desired project name. For example:
laravel new myproject
Note: Make sure to set the correct permissions for the Laravel storage and bootstrap/cache directories according to your operating system’s requirements. So, open terminal or execute the following command into it:
sudo chmod -R 777 storage sudo chmod -R 777 bootstrap
In conclusion, installing Laravel on different operating systems (Windows 10/11, Mac, and Ubuntu) is a straightforward process that involves installing PHP, Composer, and the Laravel installer. By following the step-by-step instructions provided in this guide, you can set up Laravel on your preferred operating system and start developing powerful web applications.
On Windows, you need to install PHP manually and then install Composer to manage dependencies. Once Composer is installed, you can use it to install the Laravel installer globally. On Mac, you can utilize Homebrew to install PHP and Composer, and then proceed with installing Laravel. Similarly, on Ubuntu, you can use the apt package manager to install PHP and Composer, followed by Laravel.
After the installation is complete, you can create new Laravel projects by using the Laravel installer command (
laravel new). This will set up a fresh Laravel installation in the specified directory, and you can start working on your Laravel application right away.
Remember to configure the necessary file and directory permissions, such as setting appropriate permissions for the storage and cache directories, to ensure your Laravel application runs smoothly.
With Laravel installed, you have a powerful framework at your disposal to build feature-rich and scalable web applications. Laravel provides a wide range of tools and features that streamline the development process and make it easier to create robust and maintainable code.
Whether you’re developing on Windows, Mac, or Ubuntu, Laravel offers a consistent and enjoyable development experience. Take advantage of Laravel’s extensive documentation, active community support, and vibrant ecosystem of packages and extensions to enhance your Laravel projects.
Now that you have successfully installed Laravel, you can explore its vast capabilities and unleash your creativity to build amazing web applications. Happy coding!
Recommended Laravel Tutorials
If you have any questions or thoughts to share, use the comment form below to reach us.