If you’re using Magento Community Edition on your server and want to move it into a sub-directory or into/out of the root directory, here is a quick guide to how you do it.  You may need to speak to your System Administrator or web hosting technical support team for some parts of this, and you should have an understanding of how SSH access works before you begin.

Important note: Always back-up your e-commerce store and web site before starting work of this type.

If you have Magento installed in this location;



Let’s assume you have a directory structure like this, when viewed from your server;


Magento, based on the location of http://www.yourdomain.co.uk/store, will be found here;


Firstly, you need to login to the admin area of your Magento installation and navigate to System > Configuration > Web.

Update the unsecure and secure URLs (web addresses) for your store, to their new locations.

Then connect to your web server using SSH and go to the directory where you want to move your Magento installation, using this command;

cd public_html/

Then move all of the files from the directory to the directory you’re in;

mv store/* store/.htaccess .

Delete the cache date;

r, -rf var/cache/

And then you should be all done!  If you reload your web site in your internet browser and it doesn’t look like the theme you had is working properly, check the unsecure and secure URLs again.