My site is not working even, My admin also. I HAVE TRIED getversion() method in app/mage.php but still, I am not able to get the version of Magento.
Can anyone suggest me, please?
My site is not working even, My admin also. I HAVE TRIED getversion() method in app/mage.php but still, I am not able to get the version of Magento.
Can anyone suggest me, please?
You can easily check if a website is running Magento Enterprise Edition or Magento Community Edition hitting
Just simply write --> website_base_url/magento_version
After you will see **top of the left corner** some thing like... (Magento/2.2 (Community) or Magetno/2.3(Community), or Magento/2.3/(Enterprise) version...
Check Magento 1 version using Command line
(Note : This cmd only for magento 1)
php -r "require 'app/Mage.php'; echo Mage::getVersion();"
I have checked versio n using ssh.
BY following these few commands -
1. Login in SSH
2. cd public_html/<your directory>
3. php -a
4. include 'app/Mage.php';
5. include 'app/Mage.php';
In your Question, You have typo mistake you have call getversin() instead of getVersion()
You have to call just like, Mage::getVersion()
in your file.
You can also check version from your app/Mage.php file if you have file access of your project,
Search function like getVersionInfo()
and you have display your current magento installed version.
You need to create a file "version.php" in root folder and paste below code :
<?php
include_once 'app/Mage.php';
umask(0);
Mage::app("default");
echo Mage::getVersion();
?>
run file version.php.
You can always find the Magento version number in the Magento Admin Panel in the footer area.
If you have installed magerun you could also use the command of magerun sys:info
Open the app/Mage.php manually and check the gerVersion functionality because it will be hard coded
Another way to check of course is through MageReport https://magereport.com/
If you are in Linux try this command from htdoc folder
/opt/bitnami/apps/magento/htdocs$ sudo ./bin/magento-cli --version
Magento CLI 2.3.0
For M1 run following command in webroot:
grep -A6 'static function getVersionInfo' app/Mage.php
For M2: view in composer.json in webroot or access this path: /magento_version
I'm a bit late but it may help someone. You can check the Magento version (both for Magento 1 and 2) by opening your composer.json file, located inside the Magento installation root folder.
If you have ssh access just use nano composer.json