Picture this: you’re debugging a production issue, a dependency broke your deployment, and you need to check installed Laravel version because you can’t remember whether your project is running Laravel 9 or Laravel 10. It happens more often than you’d think.
Knowing how to check your installed Laravel version via the command line isn’t just a trivia question, it directly affects how you troubleshoot, upgrade, and maintain your applications. The wrong version assumption can lead you to incompatible package versions, mismatched documentation, and hours of wasted debugging.
This guide walks you through every reliable way to pull your Laravel version from the terminal. I’ll cover the quickest one-liners, methods that work when you only have file access, and the ones you’d use when you need the full picture. By the end, you’ll know exactly which command fits which situation.
One thing to note upfront: Laravel follows semantic versioning. That means 8.0, 9.0, 10.0 are major releases. Patch versions (like 10.5.1) contain bug fixes. Minor versions (like 10.6) add features. Knowing this helps you interpret what you’re seeing when you run these commands.
TL;DR
- Run php artisan --version from your project root, the fastest method
- Open composer.json and look under require["laravel/framework"] for the locked version
- Use composer show laravel/framework for detailed version info across all packages
- Call app()->version() inside Laravel Tinker for the application-level version
- Create a temporary web route returning app()->version() only when CLI isn’t accessible
- Never leave the debug route active, remove it immediately after checking
Why Knowing Your Laravel Version Matters More Than You Think
Before we get into the commands, let’s talk about why this matters in practice. I’ve seen developers lose half a day chasing a bug that only existed because they were reading Laravel 11 documentation while running a Laravel 9 application. The version mismatch made every recommendation irrelevant.
Here’s where version awareness pays off:
Package compatibility. Some Composer packages declare version constraints like "laravel/framework": "^9.0". If you’re running Laravel 8, those packages simply won’t install. Checking your version before adding a new dependency saves you from cryptic Composer errors that don’t immediately point to the real problem.
Upgrade planning. If you’re moving from Laravel 9 to Laravel 10, you need to know your starting point. Every major upgrade has a dedicated upgrade path, and skipping versions (going from 8 straight to 10, for example) is a recipe for broken applications.
Server environment issues. When your local machine runs a different PHP version than your server, Laravel automatically uses different code paths. Knowing your Laravel version helps you understand why something works locally but fails on production.
Security. Laravel releases security patches for actively supported versions. If you’re using an older Laravel release that has reached end-of-life, you may no longer receive important security updates. You can check Laravel’s official release notes and support policy to see the current support status for each version. Version awareness is the first step toward keeping your application secure.
Method 1: The Quickest Way – php artisan --version
If you need the answer right now and you have terminal access, this is the command you want.
Open your terminal, navigate to the root directory of your Laravel project, and execute the following command:
php artisan --version
What you’ll get back is something like Laravel Framework 10.48.0. The first number 10 is the major version. The rest tells you the minor and patch release.
This works because Laravel registers an Artisan command internally that reads the framework version directly from the installed vendor files. No guessing, no file hunting. You can explore more Laravel command-line features in the official Laravel Artisan documentation.
One thing worth mentioning: this command uses your system’s PHP. If you have multiple PHP versions installed (say, PHP 8.1 and 8.3), make sure you’re running the version that matches your server’s PHP. Use php -v first if you’re unsure.
Also, php artisan won’t run if you’re inside a directory that isn’t a Laravel project. If you get an error about Artisan not being found, double-check that you’re in the right directory. Running ls and confirming you see artisan, composer.json, and a vendor/ folder is a quick sanity check.
Read Full Article: https://serveravatar.com/check-installed-laravel-version
Top comments (0)