Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Page 1 of 3
Moving magento from subdirectory to root directory
 
kingkao
Member
 
Avatar
Total Posts:  50
Joined:  2008-04-02
Toronto
 

Hi,
I am about to move my ./magento test site to my root directory.
I was wondering if I will have any problems if I just copied all the files, then upload them to the root directory?
Anyone with experience?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jackstraw
Member
 
Total Posts:  61
Joined:  2008-06-02
Carbondale,Colorado
 

Hi, I am not 100 percent sure as I have not had to move anything yet.  However, under admin>system>configuration>web(on the left) check secure and unsecure.  You have some base url settings there.  You may also need to take a look at your .htaccess file.

Here is a thread if you are actually changing databases. http://www.magentocommerce.com/boards/viewthread/10551/

hope that helps,
Nigel

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

You should be able to disable caching, update the secure/unsecure URL as mentioned above, and move all the files in the sub-directory up a level. SSH to move everything up a directory is:

mv * .htaccess ../

I’ve never done a move like this, but have done lots of moves from one server to another. It’s easy enough to move everything back if that fails too.

 Signature 

Crucial Web Hosting
Our new site is live! Introducing Split-Shared and Split-Dedicated hosting products!
Join our new Developer Network and check out the updated Site Showcase!

 
Magento Community Magento Community
Magento Community
Magento Community
 
kingkao
Member
 
Avatar
Total Posts:  50
Joined:  2008-04-02
Toronto
 

I do not have SSH access, but I guess a manual move with FTP will work?
OK. So I change Secure and Unsecure from kingkao.com/magento to kingkao.com right?

 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelix.com
Enthusiast
 
Avatar
Total Posts:  903
Joined:  2007-08-31
Huntsville, AL
 

Yes, that would work.

 Signature 

SimpleHelix, LLC
A World-Class Magento Web Hosting company - Providing scalable, reliable, and secure enterprise hosting solutions
The creators of super-fast performance hosting. Find out more @ http://www.SimpleHelix.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
helpinghandhost
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-11-12
 

Hi Kingkao,

What control panel are you using? If cPanel, everything can be moved to your “root” directory very easily/quickly via the “File Manager” after you have made the appropriate changes in your Magento dashboard.

 Signature 

HHH US | HHH UK
Offering the BEST ”Magento Optimized” Hosting Plans (including Magento Auto Installer):
- US Demo Store
- UK Demo Store

 
Magento Community Magento Community
Magento Community
Magento Community
 
jimmyjazz
Jr. Member
 
Total Posts:  6
Joined:  2008-08-01
 

What would be the “appropriate changes in your Magento dashboard”, can you expand on that?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kingkao
Member
 
Avatar
Total Posts:  50
Joined:  2008-04-02
Toronto
 

I was in the middle of backing up my whole magento folder for transfer. Then I changed the secure and unsecure url to kingkao.com instead of kingkao.com/magento...thinking this might make changes to database and not files.

PROBABLY A BAD IDEA
well anyways, now my site is all buggy and non of the php is working
Can someone advise...can only see the main page, and not all of it is showing either, thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 

kingkao,
I actually will move my “testing” site to the root too.
I didn’t do this yet, but I think that after all files been moved, you need to open database with phpAdmin and browse table core_config_data.
There you will see the absolute path you need to change. Only after that table was changed you can try to open admin panel. I am not sure that it is enough, but I think it is necessary to do.
Let me know if you successfully moved the site.

Good luck,
Mike

 Signature 

Video games, video game consoles, electronics, kids education software

 
Magento Community Magento Community
Magento Community
Magento Community
 
beau
Member
 
Avatar
Total Posts:  50
Joined:  2008-02-03
 

What about doing the exact opposite? How can I move my store FROM the root level, into a dedicated level? I need to install the latest version of Magento - I’m still running 1.019, and it’s on the root level.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Enthusiast
 
Avatar
Total Posts:  835
Joined:  2008-04-24
 
beau - 12 October 2008 10:02 AM

What about doing the exact opposite? How can I move my store FROM the root level, into a dedicated level? I need to install the latest version of Magento - I’m still running 1.019, and it’s on the root level.

The procedure would be the same. First, copy your files from root to the subfolder. Then update the following values in your database:

Table: core_config_data
Two records with path = ‘web/unsecure/base_url’ and path = ‘web/secure/base_url’

If you have SSH access, this can be done very easily using the command line:

mysql -u db_user -p db_name
update core_config_data set value
='your new store url' where path like '% base_url';
quit;

Alternatively, you can use a web-based interface such as phpMyAdmin to make the changes.

This procedure can also be used when transferring your store from one domain to another, e.g. from a temp. url to a production environment.

Don’t forget to refresh your cache!

 Signature 

Magento Optimized Web Hosting
Professional LiteSpeed Enterprise™ Powered Magento Hosting. (see our demo store and hosting plans)
Unprecedented performance and fully compatible with the Magento Connect Manager.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 

Some update:
I moved store fine to the root and want to add one thing more (if I didn’t forget something else):
after moving I had problems until I renamed file app/etc/use_cache.ser
Rename or delete this file and Magento will create a new one.

 Signature 

Video games, video game consoles, electronics, kids education software

 
Magento Community Magento Community
Magento Community
Magento Community
 
lynnspain
Member
 
Avatar
Total Posts:  65
Joined:  2008-08-07
Baleares, Spain
 

Hi Just wanted to say thank you for this thread you saved me.  I wanted to move my magento installation down one level into another directory.
From:- mydomain.com
To:- mydomain.com/shop/
I moved all the files
Changed the two records in the core config as instructed above to inlcude the extra directory /shop/
Deleted the cache folder in Var
All worked perfectly.

I had some jpegs not showing and realised that I needed to go into the home page in admin - pages and add the extra directory in the link and that was it. Perrrrrfect.

Thank you all.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Batigol
Jr. Member
 
Total Posts:  5
Joined:  2009-01-02
 

Thank you all , I have the same problem and you really help me solve it.

Works Perfect now

Regards!

 
Magento Community Magento Community
Magento Community
Magento Community
 
zuiko
Sr. Member
 
Avatar
Total Posts:  262
Joined:  2009-02-06
Nantes France
 

To dive a little bit this thread: do you think that it’s mandatory to rename my magento directory which is called shops to magento before upgrading (magento or an extension) or installing an extension ?

BR

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Enthusiast
 
Avatar
Total Posts:  835
Joined:  2008-04-24
 

zuiko: the name of the directory does not have to be ‘magento’. Actually, if you rename it, it may cause problems with the PEAR config so it is best to keep it as it is.

 Signature 

Magento Optimized Web Hosting
Professional LiteSpeed Enterprise™ Powered Magento Hosting. (see our demo store and hosting plans)
Unprecedented performance and fully compatible with the Magento Connect Manager.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 3
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|1028 users currently online|497318 forum posts