• Resolved dimitrow

    (@dimitrow)


    Hello,

    I exported categories from my old site and want to import to my new site but what is extremely important in this case is that the categories in the two sites (new and old) should be the same, except by name, and by id. How do I achieve this with your plugin? Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @dimitrow,

    but what is extremely important in this case is that the categories in the two sites (new and old) should be the same, except by name, and by id. How do I achieve this with your plugin?

    In your export, you should select the “Migrate” button. Then, import the “Bundle” zip file on the new site, and the categories should be imported in the same structure from the export site.

    That said, keeping their old IDs isn’t supported out of the box because the imported terms are technically newly added terms, so WordPress will generate unique IDs for them. The only guaranteed way to keep old IDs is to do a complete database migration.

    You can try keeping the old IDs with custom code and our API (for example: https://www.wpallimport.com/documentation/code-snippets/#keep-old-ids-when-migrating-categories-and-other-taxonomy-terms), but it’s not guaranteed to work.

    Thread Starter dimitrow

    (@dimitrow)

    Thanks for the reply and guidance!

    In order to use the features you mentioned I had to purchase your PRO versions – no problem. Despite following the instructions (using migration on export and adding a custom php script to the plugin) – I still get the ids in sequential order (1,2,3 … and so on). I even manually deleted all the terms from the database and reset the incremental counters on the tables, but still no result. Ask for assistance!

    Plugin Author WP All Import

    (@wpallimport)

    Hi @dimitrow,

    Please double check to make sure you’ve updated the code as instructed by the comments in the code, especially this line:

    // Only run for import 1 and only run when the term is first created.
    	if ( $import_id == '1' && !$is_update) {

    And this line:

    		// ID to set for term, change 'termid' to your real file element name.
    		$requested_id = $record['termid'];

    If that doesn’t help, replicate the issue on a sandbox site at https://www.wpallimport.com/debug/ and then send us a support request here for further assistance (include the sandbox site URL): https://www.wpallimport.com/support/. Please note that we can’t help modify custom code, but we can check to make sure everything is set up correctly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Import categories from old to new site withe same ID’ is closed to new replies.