Magento: The Best Solution to Ugrade Magento from 1.5.x.x – 1.7.x.x

Magento: The Best Solution to Ugrade Magento from 1.5.x.x – 1.7.x.x

Magento: The Best Solution to Ugrade Magento from 1.5.x.x – 1.7.x.x

I had the same issue and RESOLVED IT by the following
1. Move live site to test/production server

2. UPDATE the following in core_config_data:

3. Modify magento/app/etc/local.xml to point to your database

4. Delete * var/cache and var/session

5. Delete the following from the following tables which is what causes the conflict (contain non essential statistical data):
tables: report_compared_product_index & report_viewed_product_index

6. Run the following commands
chmod 755 mage
rm -rf var/cache/* downloader/pearlib/cache/* downloader/pearlib/download/*
./mage mage-setup .
./mage sync –force
./mage config-set preferred_state stable
./mage list-upgrades
./mage install Mage_All_Latest –force
rm -rf var/cache/* downloader/pearlib/cache/* downloader/pearlib/download/*
chmod 755 mage

7. run this command:
php shell/indexer.php reindexall

This step causes an error but this is normal and only happens on the product price this will be fixed further on. There error you will see is:
Product Prices index process unknown error:
exception ‘PDOException’ with message ‘SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘website_date’ in ‘field list’’ in /home/erjpub/documents/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/erjpub/documents/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/erjpub/documents/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/erjpub/documents/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/erjpub/documents/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/erjpub/documents/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’INSERT INTO `ca…’, Array)
#5 /home/erjpub/documents/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO `ca…’, Array)
#6 /home/erjpub/documents/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(1974): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO `ca…’, Array)
#7 /home/erjpub/documents/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(1947): Varien_Db_Adapter_Pdo_Mysql->insertArray(’catalog_product…’, Array, Array)
#8 /home/erjpub/documents/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(599): Varien_Db_Adapter_Pdo_Mysql->insertMultiple(’catalog_product…’, Array)
#9 /home/erjpub/documents/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(378): Mage_Catalog_Model_Resource_Product_Indexer_Price->_prepareWebsiteDateTable()
#10 /home/erjpub/documents/public_html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll()
#11 /home/erjpub/documents/public_html/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#12 /home/erjpub/documents/public_html/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#13 /home/erjpub/documents/public_html/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#14 /home/erjpub/documents/public_html/shell/indexer.php(198): Mage_Shell_Compiler->run()
#15 {main}

8. Continue with the update by running the following commands:
./mage upgrade-all –force
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
chmod 750 mage
chmod o+w var var/.htaccess app/etc
chmod -R o+w media
chmod -R 777 var/package var/locks var/report var/export downloader

9. Enter the url for your site for the update. It will take a while (long while….BE PATIENT) depending on the size of your site.

Spend 3 days trying to get this working and this is the only thing that worked for me.


Unable to reindex Product Flat Data – Stuck on Processing. ‘SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row

The catalog_product_flat_# table is a flat table containing data from EAV product catalog tables.
If you have problem with reindexing the catalog, truncate (drop the content) that table and reindex your data.

It seems that Magento doesn’t clean that table when you delete some information.

In my case, that table was full of old deleted products.

  • Lee Devlin

    I did this update from 1.5 to 1.7 and got the error about the price index just like shown in your article. However, it didn’t go away as was implied by the article. I’ve searched around quite a bit and it still is unable to reindex Product Prices. Do you have any suggestions?

    • PHPMySQLTalk

      Are you using “Simple Configurable Products” extension?

      • Lee Devlin

        I did look for that extension, but we don’t have it installed. I also found that several of the new tables for 1.7 were not added and so I had to create some of them manually with SQL commands. The other problems seem to originate from tables that have had extra columns added from 1.5 to 1.7. Shouldn’t there be some SQL file to run to get the new db to have all these things updated? Or is there some other step that I may have missed that does that takes care of db differences?

  • P Vohra

    The article is good
    to read and worth sharing for more knowledge-

  • Alberto Braschi

    Column not found: 1054 Unknown column ‘website_date’ in ‘field list’

    DROP TABLE `catalog_product_index_website`;

    CREATE TABLE `catalog_product_index_website` (

    `website_id` smallint(5) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘Website ID’,

    `website_date` date DEFAULT NULL COMMENT ‘Website Date’,

    `rate` float DEFAULT ‘1’ COMMENT ‘Rate’,

    PRIMARY KEY (`website_id`),



    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=’Catalog Product Website Index Table';

    • Alex

      Hey there,

      got the same problem while upgrading my Magento store never came up with a solution. I had an urgent situation so I couldn’t wait to long for looking this error fix or someone who could do it for me. Instead I tried Cart2cart ( I just installed fresh Magento 1.7 version and migrated my entire database for about 3 hours. Had to configure template and install some modules but it took a few more hours to finish it. Finally I got all my products and other stuff at new Magento version with new responsive template with all my ids and links saved in only one day. Great result as for me and no headache about bugs and errors. Really recommend.

  • web design orlando

    Keep sharing such
    nice blogs. It really shares good knowledge. Thanks. For More

    web design orlando

Pin It on Pinterest

Share This