Import WordPress WXR – Category IDs changed
I used the export/import options under Tools to generate, export, and import a WXR file from one WP install (my staging server version) to another (my client’s server version).
Seemingly randomly, a few categories were given new IDs. For example, the “Videos” category was ID=6 on my local DB, and on the new site (after importing the XML) it has ID=7.
The problem here is I am using IDs hard-coded in my template files for various purposes, such as navigation, conditional functions, etc.
Now I know that I can either edit the templates (and thus have two different versions of the theme which I’d have to then keep track of for future updates) OR correct the IDs directly in the MySQL DB (a PITA and risky as I’m not so comfortable messing directly with the DB).
But does anybody have any ideas WHY the import would change the IDs for just a few (apparently random) categories? What sort of reasons might there be for that?
Basically, I am hoping to avoid this issue entirely in the future.
Thanks in advance for any suggestions!
NOTE: This is a nearly identical issue to one I reported earlier, the difference being the earlier issue dealt with Page IDs and it was WordPress version 2.9.2 – http://wordpress.org/support/topic/400705?replies=1
This issue is with categories and version 3.0 – so I hope mods won’t consider this duplicate posting, as I suspect those differences may matter.
- The topic ‘Import WordPress WXR – Category IDs changed’ is closed to new replies.