Skip to content

Instantly share code, notes, and snippets.

@miguelbalparda
Created January 2, 2014 18:30
Show Gist options
  • Save miguelbalparda/8224017 to your computer and use it in GitHub Desktop.
Save miguelbalparda/8224017 to your computer and use it in GitHub Desktop.
Magento rewrite vis mysql console
mysql> CREATE table temporary_table AS SELECT * FROM core_url_rewrite;
mysql> UPDATE temporary_table SET url_rewrite_id = NULL;
mysql> UPDATE temporary_table SET store_id = 4; //set the store_id you need to
mysql> UPDATE temporary_table SET id_path = UUID(); //create a unique id_path
mysql> insert ignore into core_url_rewrite select * from temporary_table; //insert the new records ignoring the ones with conflicts
@miguelbalparda
Copy link
Author

Copy rewrites in batch to make them work in a different store under the same Magento installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment