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?
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.
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.
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?
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.
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.
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.
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.
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.
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.
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.
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 ?
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.