How to Check the Magento Version?

By Liam Ashley
How to check your magento version
Magento is a renowned e-commerce platform, widely used globally. Staying updated with the latest Magento versions is crucial for maintaining security and accessing new features. Here are eight methods to check your Magento version: 1. Check Magento Admin Dashboard The simplest way to check your Magento version is through the Admin Panel: 2. Check the…

Magento is a renowned e-commerce platform, widely used globally. Staying updated with the latest Magento versions is crucial for maintaining security and accessing new features. Here are eight methods to check your Magento version:

1. Check Magento Admin Dashboard

The simplest way to check your Magento version is through the Admin Panel:

  • Magento 1: Log in to your Admin Panel and scroll down to the bottom.

  • Magento 2: If you have customized the dashboard, navigate to System > Web Setup Wizard > System Upgrade. Enter your private and public keys to view the version.

2. Check the composer.json File (Only for Magento 2)

For Magento 2, the version can be found in the root composer.json file. Look at line #5 for the version information:

jsonCode kopiëren{
    "name": "magento/magento2ce",
    "description": "Magento 2 (Open Source)",
    "type": "project",
    "version": "2.2.6-dev",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    …
}

3. Check the composer.lock File (Only for Magento 2)

Similarly, the composer.lock file in the root directory contains the version information at line #3:

jsonCode kopiëren{
  "name": "magento/magento2-base",
  "version": "2.3.1",
  "dist": {
    "type": "zip",
    "url": "https://repo.magento.com/archives/magento/magento2-base/magento-magento2-base-2.3.1.0.zip",
    "reference": null,
    "shasum": "7877828bb63a7cfca5c62c6c6caf6a9c05ab154b"
  }
}

4. Check via Command Line (Only for Magento 2)

To check the Magento version using the command line, run the following command:

bashCode kopiërenphp bin/magento --version

To determine if your Magento version is an enterprise or community edition, use:

bashCode kopiërencomposer licenses | grep Name:

5. Use Chrome Extensions

Two Chrome extensions can help you identify your Magento version:

  • Wappalyzer: Detects if your store is on Magento 1 or Magento 2.

  • Version Check for Magento: A paid tool for checking the Magento version.

6. Check Using PHP Code

  • For Magento 1: phpCode kopiërenMage::getVersion(); // Returns the Magento version
  • For Magento 2.0.X: phpCode kopiërenecho \Magento\Framework\AppInterface::VERSION;
  • For Magento 2.1.x to 2.3.x: Using Dependency Injection:phpCode kopiërenpublic function __construct( \Magento\Framework\App\ProductMetadataInterface $productMetadata ) { $this->productMetadata = $productMetadata; } public function getMagentoVersion() { return $this->productMetadata->getVersion(); } Using Object Manager:phpCode kopiëren$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $productMetadata = $objectManager->get('Magento\Framework\App\ProductMetadataInterface'); echo $productMetadata->getVersion();

7. Using Online Tools

You can use online tools like the Magento Version Checking Tool. Simply enter your store URL to check the Magento version.

8. Check from the URL

Add /magento_version after your store URL to check your Magento version.

Keeping your Magento version updated is essential for security and leveraging new features. We hope these methods help you easily check your Magento version and stay current with updates.

Information checked and edited by Liam Ashley

Last updated: August 9, 2024....
Liam Ashley is a highly skilled e-commerce specialist with a deep expertise in Magento 2. With over a decade of experience in the industry, Liam has become a prominent figure in the e-commerce landscape, known for his innovative solutions and strategic insights. Currently serving as the lead Magento 2 developer
Read more about Liam
Stay in the loop
Now you can update. Receive product updates, new and successful versions from Magstack customers directly in my mailbox.