DropVPS Team
Writer: John hens
how to install laravel on ubuntu 25.04

Table of Contents
What you will read?
Laravel is one of the most popular PHP frameworks used to build modern, secure, and scalable web applications. Installing it on Ubuntu 25.04 is straightforward if you follow the right steps
Step 1: Update Your System
Before installing any software, it’s important to update your system so you have the latest security patches and package lists. This ensures your Laravel installation won’t face dependency issues later:
sudo apt update && sudo apt upgrade -y
Step 2: Install PHP and Required Extensions
Laravel depends on PHP and specific extensions to function properly. Without these, core features like routing and database handling may not work. Let’s install them in one go:
sudo apt install php php-cli php-mbstring php-xml php-bcmath unzip curl -y
Step 3: Install Composer
Composer is the dependency manager Laravel uses to pull in its libraries and keep them updated. It’s a required tool, and installing it on Ubuntu 25.04 is simple with apt:
sudo apt install composer -y
Step 4: Install Laravel
Now that Composer is installed, you can bring Laravel onto your system. Installing it globally allows you to create projects from anywhere without needing repeated setup:
composer global require laravel/installer
To make the Laravel command available system-wide, add it to your PATH:
export PATH="$HOME/.config/composer/vendor/bin:$PATH"
Step 5: Create a New Laravel Project
With everything ready, you can now generate a fresh Laravel application. Laravel comes with an integrated development server, so you can test your setup right away:
laravel new myapp
cd myapp
php artisan serve
Open your browser and go to http://127.0.0.1:8000. You should see the Laravel welcome page.