Upgrading from Magento 220.127.116.11 to 1.6.2 - Pitfalls and Solutions
Hello, my name is Dovy. Recently I have spent a lot of time over the past 2 weeks working to get Magento to upgrade flawlessly from Magento 18.104.22.168 to 1.6.2. I thought I’d make a wiki post to help anyone who may need assistance. This process is anything but smooth. Hopefully this entry will make your day much easier.
In my case I was moving hosts completely, so I needed to migrate my database. I spent a lot of time testing the migration and I am sure glad I did! Start with shutting-down your old store in any way you see fit to ensure you don’t get any orders during the migration.
Now let’s move/backup that database. A word of caution, I could only get mysqldump to work. PhpMyAdmin backups failed time and time again. I even had to ignore a few tables for things to work. Here is the command I ended up using:
mysqldump -h YOURDOMAIN.COM -uYOUROLDDBUSERNAME -p’YOUROLDDBPASSWORD’ –compress –ignore-table=YOUROLDTABLE.ugiftcert_history YOUROLDTABLE | mysql -uYOURNEWDBUSERNAME -p’YOURNEWDBPASSWORD’ -h YOURHOST YOURNEWDBNAME
I ran this command from my new web server. However, my new database was on a separate server as well. If this is not the case you can remove -h YOURHOST from the command. As you can see, I had to ignore the ugiftcert_history table errors for the data to migrate. It was quite the pain to find this exact command out!
I went through a whole mess of errors. Unfortunately I was using Fooman and that attributed to some of the errors. I don’t remember why I did everything, but I needed to run this SQL before things would work:
ALTER TABLE log_customer DROP INDEX IDX_LOG_CUSTOMER_VISITOR_ID; DELETE FROM `eav_attribute` WHERE `eav_attribute`.`attribute_code` = ‘meta_robots’; DELETE FROM `core_resource` WHERE CODE = ‘metarobots_setup’; DROP TABLE `tax_order_aggregated_created`; DROP TABLE `tax_order_aggregated_updated`; DROP TABLE `sales_order_tax_item`;
Go get the newest version of Magento and place it in your new location. Another word of caution, you may need to modify your local .hosts file to make your domain appear on the new server before DNS is truly propagated. If the URL is different than your old URL your admin panel will freak out and you’ll have to use firebug or the developer tools in chrome to fake the forms any time you want to save in the admin area. In other words, it’s a pain. ;)
Once you have the new files in place it’s a great idea to move the files you have on your old server to the new location in these directories: /app/etc/modules/ /app/code/community/ /media/
You may have to also move your template files, etc. It all depends on what you have. Most of your extensions you may need to reinstall again as some of them have lingering design files. I leave that adventure to you. ;)
Also be sure to move your your /app/etc/local.xml file to the new directory. Be sure to update your database information so Magento can connect to your database.
Run this command from your root Magento directory. It’s needed after the upgrade.
php shell/indexer.php reindexall
In the upgrade something gets messed and you end up not being able to edit the general tab in the admin area despite your products grabbing information properly on the front page or even in the admin products list. It’s quite annoying. Here’s the fix.
Open the table ‘eav_entity_type’ in your favorite MySQL editor (bless you PHPMyAdmin).
Find and edit entity_type_id 4. AKA catalog_product.
Add these values (they should be currently null for you):
additional_attribute_table = catalog/eav_attribute entity_attribute_collection = catalog/product_attribute_collection
There are a few small things that can really speed up your magento install. Here are just a couple really good ones.
In the Magento Admin Panel go to “System” > “Configuration”, from the left panel choose “Advanced” from the “Advanced” Panel at the bottom left. Look for the module “Mage_Log” and set it to ‘disable’ and save.
I hope this helps someone else. It was quite the journey to get here. ;) If you have any questions feel free to contact me at info (at) simplerain (DOT) com