8 Ways to Check Magento Version
Magento, a popular and widely used E-commerce platform, keeps on releasing the updated versions with improvement and bug fixing. The store owners are expected to keep in pace with these updates to be able to offer the latest features and enhanced security to the shoppers.
However, to update the Magento version requires proficiency and thorough information about the current version. To kickstart with the upgrade process, I have compiled a list of methods to check Magento version. Pick any one and find out the Magento version installed in your store.
8 Methods to Check Magento Version:
- Check Admin Dashboard
- Check Composer.json file
- Check Composer.lock file
- Check via Command Line
- Using the Chrome Extension
- Check from the URL
- Check PHP Code
- Using Online Tools
Reviewing each method in detail,
Check Admin Dashboard
A very simple method, often unnoticed! Login to your admin panel and scroll to the bottom of the dashboard. You’ll find the version of your Magento installed as shown below:
Magento 1:
Magento 2:
For Magento 2, if the admin theme is reformed, you need to navigate to System > Web Setup Wizard > System Upgrade to check the version instead of footer. Enter the public key and the private key to check the version as shown below:
Check Composer.json file (For Magento 2 Only)
Get the Magento 2 version in the root composer.json file:
1234567891011{"name": "magento/project-community-edition","description": "eCommerce Platform for Growth (Community Edition)","type": "project","license": ["OSL-3.0","AFL-3.0"],"version": "2.3.1",......}Check Composer.lock file (For Magento 2 Only)
Get the Magento 2 version in the root composer.lock file:
12345678910{"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"}}Check via Command Line (For Magento 2 Only)
Run the below command to get the Magento version:
1php bin/magento --versionFor finding if the Magento version is community or enterprise edition, run the below command:
1composer licenses | grep Name:Using the Chrome Extensions
- Wappalyzer: Simply use the chrome extension to find out if the store is in Magento 1 or Magento 2 version!
- Version Check for Magento: A paid tool for checking the Magento version. However, with so many free methods available, it is not feasible to use the paid options.
- Wappalyzer: Simply use the chrome extension to find out if the store is in Magento 1 or Magento 2 version!
Check from the URL (For Magento 2 Only)
If you do not want to use any tools, simply type your store domain url and add /magento_version in the address bar. Hit enter and you’ll see the results as below:
Check PHP Code
For Magento 1:
Mage::getVersion() //will return the magento version
For Magento 2.0.X
echo \Magento\Framework\AppInterface::VERSION;
For Magento 2.1.x to 2.3.x
- Using DI123456public function __construct( \Magento\Framework\App\ProductMetadataInterface $productMetadata ) {$this->productMetadata = $productMetadata;}public function getMagentoVersion() {return $this->productMetadata->getVersion();}
- Using ObjectManager123$objectManager = \Magento\Framework\App\ObjectManager::getInstance();$productMetadata = $objectManager->get('Magento\Framework\App\ProductMetadataInterface');echo $productMetadata->getVersion();
- Using DI
Using Online Tools
- Use the Magento Version Checking Tool tool to get the Magento version by entering the store URL.
- MageReport: Not only does it check the Magento version but also gives a detailed report about the edition, security patches, default admin location, outdated server software, ransomware, and information that can be useful to secure the store!
I am sure you’ll find your suitable method from this list.
Sometimes, the online tools may not give accurate results, and hence it is recommended to not rely on them all the time.
If you find a new method to check Magento version, do share them in the Comments section below. Also, feel free to discuss any doubts regarding the topic and I’d be happy to help.
If you find out that your Magento version is not the latest, it is high time you get the latest Magento upgrade. Not sure how to do it or want to avoid the tiresome task? You may check the Magento Upgrade Service 🙂
Thanks!