ServerAvatar Logo

How to Check Installed Laravel Version

  • Author: Meghna Meghwani
  • Published: 9 August 2026
  • Last Updated: 8 August 2026
How to Check Installed Laravel Version

Table Of Contents

Blog banner - ServerAvatar

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.09.010.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.

php artisan - Check Installed Laravel Version

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 artisancomposer.json, and a vendor/ folder is a quick sanity check.

Method 2: Reading composer.json – When You Only Have File Access

Sometimes you’re on a server where SSH access is limited, or you want to check the version before pulling code. That’s when opening composer.json becomes the most practical option.

Navigate to your project’s root directory and open composer.json in any text editor. Look for the require section:

"require": {
    "php": "^8.1",
    "laravel/framework": "^10.0",
    ...
}

The laravel/framework line tells you the version constraint that Composer used when installing. The ^10.0 notation means Composer installed the highest available version in the 10.x series that was compatible when you ran composer install.

If you want to see the exact installed version rather than the constraint, look for composer.lock in the same directory and search for "laravel/framework" inside it. The lock file records the exact version that was resolved and installed.

From the command line, you can pull this information even faster with:

grep '"laravel/framework"' composer.lock

This saves you from opening the file and scanning manually.

check laravel framework - Check Installed Laravel Version

It’s especially useful when you’re connected to a server via SSH and want a one-liner answer.

Method 3: composer show – When You Need the Full Picture

The php artisan --version command tells you the framework version. But Laravel is a collection of packages, and sometimes you want to see all of them at once.

Run this from your project root:

composer show laravel/framework

What you get is a comprehensive output that includes the installed version, the Laravel release channel (stable, dev, etc.), and the date it was installed. Here’s a sample of what that looks like in practice:

name     : laravel/framework
version  : v10.48.0
source   : [git]
dist     : [zip]
type     : library
license  : MIT
...

The version line is what you’re after. But the rest is useful too, if you’re debugging a deployment, knowing the exact installation date from the installed field can help you confirm whether a recent update happened.

check laravel version using composer show - Check Installed Laravel Version

One practical scenario: imagine a package stopped working after your colleague ran composer update. If the package targets a specific Laravel version and the update pulled a newer Laravel version, composer show laravel/framework immediately tells you what changed.

For an even more concise output, use:

composer show laravel/framework --format=json | grep '"version"'

This is handy when you’re scripting or logging version info programmatically.

Method 4: Laravel Tinker – For the Application-Level Version

Most of the time, the framework version from php artisan --version is exactly what you need. But Laravel also exposes a version at the application level through app()->version(). These are usually the same, but understanding the distinction matters when you’re working in edge cases.

To enter Tinker, run:

php artisan tinker

Once inside the Tinker console, type:

app()->version();

Press Enter, and you’ll see the version printed back.

check laravel version using tinker - Check Installed Laravel Version

Tinker is Laravel’s interactive REPL, a live PHP shell where you can execute code within the context of your application. The app() helper gives you the Laravel application instance, and version() is a method on that instance that returns the framework version string.

Why does this distinction exist? In most cases, it doesn’t matter. But if you’ve ever worked with Laravel Octane or a customized Laravel installation where the framework version is swapped or stubbed, the application-level version might differ. For 99% of projects, both commands return the same number.

If you’re new to Tinker, here’s a practical tip: it’s incredibly useful for debugging beyond just version checks. You can inspect configuration values, test helper functions, and explore your application’s service container, all without modifying any files.

Method 5: The Web Route – When CLI Access Isn’t an Option

There are situations where you can’t SSH into a server and the terminal isn’t accessible.

Maybe you’re on a shared hosting plan, or you’re debugging an application that’s deployed through a platform with limited shell access. In those cases, checking the version through the browser is your fallback.

Open your routes/web.php file and add this at the bottom:

Route::get('/check-laravel-version', function () {
    return 'Laravel Version: ' . app()->version();
});

Save the file, then visit http://your-domain.com/check-laravel-version in your browser.

The page will display your Laravel version as plain text.

Here’s the critical part: remove this route immediately after you’ve checked the version. Exposing your framework version publicly gives attackers valuable information about which known vulnerabilities might apply to your setup. This isn’t theoretical, version disclosure is a low-effort recon step that automated scanning tools use to identify vulnerable targets.

A better practice for ongoing debugging on production is to protect the route with middleware that only allows internal IP access, or to use Laravel’s built-in debugging tools that already handle access control properly. But for a quick one-time check? The route method works, just don’t leave it lying around.

Quick Reference: All Methods at a Glance

Here’s a comparison table for the five methods we’ve covered. Use it as a cheat sheet when you need to pick the right approach fast.

MethodCommand / ActionWorks RemotelyShows Exact VersionBest For
Artisan commandphp artisan --versionYes (SSH)YesQuick CLI check, any Laravel project
composer.jsonOpen file or grepYes (SSH/File Manager)Constraint onlyQuick file-level check, no terminal needed
composer.lockgrep or open fileYesYesExact version when composer.json shows constraint
Composer showcomposer show laravel/frameworkYes (SSH)YesDetailed package info, debugging updates
Laravel Tinkerphp artisan tinker then app()->version()Yes (SSH)YesIn-app context, application-level version
Web routeBrowser access to /check-laravel-versionYesYesWhen CLI/SSH is unavailable

Common Version-Related Issues and How to Handle Them

Over the years, I have run into several situations where the version check itself becomes part of a bigger problem. Here’s what tends to go wrong and how to handle it.

php artisan command not found. This usually means you’re not in a Laravel project directory, or PHP isn’t in your system PATH. Check your current directory with pwd. If you’re in the right place, verify PHP is installed with php -v. If that works but artisan doesn’t, try calling it directly with php artisan.

Version mismatch between local and server. This is one of the most common sources of “it works on my machine” bugs. If php artisan --version returns different numbers locally versus on your server, your composer.lock files are out of sync. Run composer install --no-dev on your server to match the locked versions from your local setup.

Outdated Laravel with no easy upgrade path. If you’re running Laravel 8 or below, you’re on versions that no longer receive security patches. Upgrading from those versions requires working through Laravel’s upgrade guide and testing your application thoroughly.

Multiple PHP versions confusing the results. On systems with multiple PHP versions installed, the php command might point to a different version than what your web server uses. Run which php to see which binary is being called. For web-based checks, create a PHP info file (<?php phpinfo(); ?>) in your web root to see exactly which PHP version Apache or Nginx is using.

Blog banner - ServerAvatar

Understanding Laravel’s Version Numbering System

Laravel uses semantic versioning, and understanding how this works helps you interpret what you see when you check your version.

The format is MAJOR.MINOR.PATCH. Here’s what each part means in plain terms:

MAJOR versions, like going from Laravel 9 to Laravel 10, introduce breaking changes. Code that worked before might need modifications. These are the upgrades that require reading the upgrade guide before proceeding.

MINOR versions, like going from 10.0 to 10.6, add new features while keeping everything backward compatible. You can usually upgrade these without rewrites.

PATCH versions, like going from 10.5.0 to 10.5.1, are bug fixes and security patches. These are low-risk updates you should apply promptly.

As of mid-2026, Laravel 10 is the most widely deployed LTS-style version, with Laravel 11 being the current latest stable release. If you’re on anything below Laravel 10, it’s worth planning an upgrade soon, not just for features, but for the security patches that older versions no longer receive.

Key Takeaways

  • php artisan --version is the go-to command for quick, reliable version checks
  • composer.json and composer.lock give you version info even without CLI access
  • composer show laravel/framework provides detailed package-level information
  • Laravel Tinker (app()->version()) returns the application-level version in a live context
  • Web route checks are a valid fallback when CLI isn’t available, but remove them after use
  • Never leave debug routes exposed publicly; version disclosure aids reconnaissance attacks
  • Laravel’s semantic versioning tells you whether an update is safe, feature-adding, or breaking
  • Staying on actively supported Laravel versions is a security requirement, not a preference

If you’re managing multiple Laravel applications across different servers and want a simpler way to handle deployments, version tracking, and server configuration without living in the terminal all day, exploring ServerAvatar is worth your time.

Conclusion

Checking your Laravel version from the command line isn’t complicated, but doing it the right way for your specific situation saves time and prevents confusion. Whether you’re on a local development machine with full SSH access, a remote server with limited shell privileges, or a shared hosting plan where you only have file manager access, there’s a method that fits.

Start with php artisan --version for most situations. Fall back to composer.json when you need file-level access, and use composer show when you want the complete picture. Tinker is there for in-context checks, and the web route method exists for those rare moments when the terminal isn’t an option.

The bigger lesson here is that version awareness is part of running a healthy Laravel application. Before you add a package, plan an upgrade, or debug a production issue, know where you stand.

FAQs

What’s the fastest way to check Laravel version? 

Run php artisan --version from your project root. It returns the framework version in under a second and works on any system with PHP and Artisan available.

How do I check Laravel version without SSH? 

Open your composer.json file and look for the laravel/framework entry in the require section. This shows the version constraint Composer used. Alternatively, if you have file manager access, open composer.lock and search for the same entry to see the exact installed version.

Can I check Laravel version on shared hosting? 

Yes. If your hosting provider gives you a file manager or file editing access, upload a small PHP script containing <?php echo 'Laravel: ' . app()->version(); ?> (wrapped in the appropriate Laravel bootstrap context), or use the web route method described above. Note that most shared hosting panels also display Composer version information in their UI.

Why does php artisan --version show a different version than composer.json

The composer.json shows the version constraint (what range Composer was allowed to install), while php artisan --version shows the actual installed version. For example, composer.json might say ^10.0 but the exact installed version is 10.48.0. The lock file is what records the exact resolved version.

How do I check which PHP version Laravel needs? 

Laravel’s composer.json lists the PHP requirement under the require section as "php": "^8.1" or similar. Laravel 11 requires PHP 8.2 or higher. Run php -v to see your current PHP version and compare it against what Laravel requires.

Related Articles

About the Author

Meghna Meghwani is a technical writer focused on Linux, Ubuntu, VPS hosting, server management, WordPress, PHP, Node.js, cloud hosting, and DevOps. She creates beginner-friendly tutorials, practical hosting guides, troubleshooting articles, and server security content designed to help developers and businesses manage applications and servers more efficiently.

Deploy your first application in 10 minutes, Risk Free!

Learn how ServerAvatar simplifies server management with intuitive dashboards and automated processes.
  • No CC Info Required
  • Free 4-Days Trial
  • Deploy in Next 10 Minutes!