Hello, Magento folks,
When it comes to know the version of Magento, there are several ways to do that. Today, we are going to learn how to check your Magento 2 version.
Magento is one of the most used CMS platforms to build your Ecommerce store. With its frequent upgrades, it’s hard to keep track of what version of the Magento 2 you are using. It is very essential when it comes to upgrading your Magento 2 version. Every version has its advantages and disadvantages.
To upgrade the Magento version, or install a new extension, first, you need to check the version of the Magento because some of the extensions can only be compatible with 2.3+. In this article, I am going to list all of the ways you can check the version of your Magento 2 store.
Let’s Get Started?
1. Check the version by adding “/magento_version” at the end of the URL
The first and simple way to check the current version of the Magento 2 store is by adding the /magento_version at the end of the URL. This will show the current version of your Magento 2 store. Let’s look at an example,
2. Check the current version from the backend
This is also the simple way to know the current version of Magento on which your store is running. Just simply go to the backend of your store. At the bottom right corner of the dashboard and each backend page, you can see the current version of your Magento 2 store.
3. Check Magento 2 version in Composer.Json file
You can also get the current version of your Magento 2 store in Compose.Json file.
{ "name": "magento/magento2ce", "description": "Magento 2 (Open Source)", "type": "project", "version": "2.2.6-dev", "license": [ "OSL-3.0", "AFL-3.0" ],
4. Check Magento 2 version using PHP code
You can check the version of Magento 2 using PHP codes as shown below,
For Magento 2.0.x, use this,
echo\Magento\Framework\AppInterface::VERSION;
For version 2.1+
First method:
public function __construct( \Magento\Framework\App\ProductMetadataInterface $productMetadata ) { $this->productMetadata = $productMetadata; } public function getMagentoVersion() { return $this->productMetadata->getVersion(); }
Second method:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $productMetadata = $objectManager->get('Magento\Framework\App\ProductMetadataInterface'); echo $productMetadata->getVersion();
5. Check Magento 2 version from the command line
Enter the below command to check the version of your Magento 2 store,
php bin/magento –version
6. Check Magento version with online tools
There are several online tools available to check the version of your Magento 2 store.
- http://magentoversion.com/
- https://www.magereport.com/
Over to You!
So, this was it for the day. Using this simple method, you will be able to check the current version on which your Magento 2 store is running. If you found this helpful, then share this with your Magneto colleagues and partners.
Lastly, if you are facing any problem with your Magento store, then contact our support team for help. We will be happy to help you.
Happy Reading! with ❤️ from MageComp