We bought Ubuntu dedicated Server, I can't figure out where is my magento installed in our Ubuntu server. I am poor in CLI, Please help.


It's probably somewhere under /var/www, you can use this find command to look for Mage.php in all subdirectory's under /var/www

find /var/www -type f -name "Mage.php"

The apache configuration files will give you information on it's location, (if it runs Apache ofcourse). They can usually be found under /etc/apache2/sites-enabled and have a line something like this:

<Directory "/var/www/magento">

But, you could practically install magento anywhere you want if you configure it correctly. You can use above find command and and change the directory to for example /home in case it's installed in one of the users home directory.

I'm not sure if it's a smart move to go with a dedicated Ubuntu server if you're not known with it. Who's maintaining it? You should direct these questions to this person as it's server specific.

  • You rock, it was there. – VL Thlan Jan 30 '17 at 5:32

In command line, you have to write 'ls' and found where it is. I think it's a better way to ask the directory name installed to web hosting company.

Otherwise, you can access easily by using FTP in window server. Thanks.


Make a info.php file on root of Magento instal directory and add

<?php phpinfo(); ?>

Access the file in browser and you should see the full path in the output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.