Magento - Update admin IDs after DB Transfer


/ Published in: SQL
Save to your folder(s)

After transferring a magento databse or restoring one, you'll most likely have to run this code to correct a few IDs that change automaticly.


Copy this code and paste it in your HTML
  1. SET FOREIGN_KEY_CHECKS = 0;
  2. UPDATE `core_store` SET `store_id` = 0 WHERE `code` LIKE 'admin';
  3. UPDATE `core_website` SET `website_id` = 0 WHERE `code` LIKE 'admin';
  4. UPDATE `customer_group` SET `customer_group_id` = 0 WHERE `customer_group_code` LIKE 'NOT LOGGED IN';
  5. SET FOREIGN_KEY_CHECKS = 1;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.