A few weeks ago the company I work for was changing the server that several client sites are hosted on and this included a website built up using the eCommerce package magento. All of the migrations went ahead without any problems with the exception of this magento site and it had a couple of us stumped for quite a while.
Process
We followed the basic plan for the migration:-
- Copy magento files up to the new server
- Backup the database on the old server and restore on the new server and set the MySQL user
- Update the “web/unsecure/base_url” and “web/secure/base_url” keys within the core_config_data
This seems to work well for almost everyone we found asking for migration help on the forums but did not work for us. We even tried updating the /downloader/pear/pear.ini to ensure any additional modules downloaded via Magento Connect would install properly (I have since found out you can simply delete the pear.ini and Magento Connect will rebuild it with the correct paths!)
Symtoms
After performing the above steps the site out only partically work… You ccould browse the site, use the administration pages, add a simple product to the cart but you could not add a comfigurable product to the cart nor could you update the quantities of the items already in the cart. As you were able to add some products and not others this left us quite confused.
After checking that the folder permissions were correct, session files were getting written and trying the migration on 2 or 3 different servers (all of which worked except the new server) one of our colleagues manage to isolate the issue as being a problem with the virtual host configuration for the magento site. As this configuration worked on all the other servers we tried we didn’t suspect that would be a problem but the new server must have been configuration to be more secure than the other ones we have been testing the migration on.
Solution
This fix was really quite simple… all we had to do was add the following line into the magento sites virtual host configuration:-
AllowOverride All
Now everything runs fine… and everyone is happy (and now a little wiser) again!
Comments
Leave a comment Trackback