Every now and then a new “something” turns up in Magento that makes me bash my head against the wall
. Yesterday I had to scenraio where I moved one of my dev installations from one PC to another MAC computer. Anyhow… I kept getting this “duplicate key” errors thrown on Magento page. Although the database export was done properly (with disabled foreign key check and so on…) and my virtual hosts were setup exactly the same was still getting database related error. Here are few more important steps to take if you experience issues while moving Magetno across servers.
TRUNCATE `log_customer` ; TRUNCATE `log_quote` ; TRUNCATE `log_summary` ; TRUNCATE `log_summary_type` ; TRUNCATE `log_url` ; TRUNCATE `log_url_info` ; TRUNCATE `log_visitor` ; TRUNCATE `log_visitor_info` ; TRUNCATE `log_visitor_online` ;
These three little steps can save you some time if you experience issues when moving Magento across servers.