XF 1.2 How to deal with IDs when importing


Well-known member
When importing and keeping the IDs the same, does it matter what is initial username/email when installing a fresh install? If username ID1 is different from username ID1 in the imported content, how would that work?

Let's say I install a fresh 1.2 with a username ID1 as XFadmin. In my vB board, user ID 1 is Admin. Would Admin be user id number 1 after the import is complete? What would happen to XFadmin?

I just did a test import and made sure that the first admin account created for xenForo did not have the same username or email as user ID 1 in my old forum. It still merged the two accounts, I'm assuming because the user ID number was the same. Is there a way around this? I would like the original account I create for the xenForo install to remain, untied to any of the imported data.


Well-known member
If you're importing from vB3 you can use this query to check for duplicate emails.

SELECT username, email
FROM user
WHERE email IN (SELECT email FROM user GROUP BY email HAVING ( COUNT( email ) > 1 ))
ORDER BY username ASC
Thanks for the quick reply. I am importing into a new database. But you have to create an admin account when you do the xenForo install, right? So that admin user account is there and that user ID number is 1. When you import an existing vB4 database, there is already a user with ID number 1 in that database, so it merges the two accounts. Am I missing something here?

Jake Bunce

XenForo moderator
Staff member
Correct. If you enable the option to preserve the source ids during the import then it will merge userid 1 from both forums.

I wouldn't call this a problem. Just edit that user after the import to rename it. It will be like the original account was replaced with the imported one. And a new admin account can be created if needed.

Or you can disable the option to preserve the source ids when running the import. Then it will create new userids for all imported users.


Well-known member
As Jake said, all sounds correct. Note it's much better to preserve IDs so be sure to select that option.


Active member
Note it's much better to preserve IDs so be sure to select that option.
Why is it better to preserve the userID's when importing, is it for SEO purposes?

I'm about to import a vb4 DB, it is a forum I have taken over from someone else, their userid is 1, whereas on the new xf my userid is 1, but I do not want to merge the two accounts as it will mess up our posts, I think. How do I import the vb4 database but make sure I remain as Super Admin?