There are several ways you can use to check the Magento 2 version.

Post Contents [hide]

    1. Check Magento version via Admin Panel

    In order to do the Magento version check, you need to log into your Magento Admin Panel. Once you scroll down the page, you will see the version of Magento in the bottom (footer) right corner. 

    Magento 2 Magento Version,Magento Admin Panel

    2. Check Magento version using CLI

    Besides, you can get the Magento version with the CLI. To do this navigate to your Magento 2 base directory and run the following command:

    php bin/magento --version

    The result should be like this:

    Magento CLI 2.3.2

    3. Get Magento version programmatically

    To get Magento version programmatically in code you need to have a ProductMetadataInterface object. You can define it in your PHP class constructor, e.g.:

    private $productMetadata;

    public function __construct(
        \Magento\Framework\App\ProductMetadataInterface $productMetadata,
    ) {
       $this->productMetadata = $productMetadata;

    And then receive the Magento version using $this->productMetadata object, e.g.:

    $version = $this->productMetadata->getVersion();

    You can also easily get the Magento edition, e.g. Community or Enterprise, using this code:

    $edition = $this->productMetadata->getEdition();

    4. Get Magento Version From URL

    If you don't have access to the Magento 2 website admin panel, CLI, or code, you can still try to check Magento version using this URL:

    Note: you need to replace "" with the actual store base URL.