Overall Approach For Importing
I recommend doing a test import first so you can work out any problems before going live. Once you are satisfied with the results then install another copy of xenForo and run the import again from scratch. Use the test forum as a point of reference when doing your final import, as opposed to building onto your test forum and taking it live. If you have done any custom development on the test forum (e.g. custom styles and addons) then you need to apply those changes to the "from scratch" copy of xenForo when doing the final import.
It is better to do the final import from scratch. The test forum won't contain new content that was added to your live forum since you ran the initial import, and there is no option to pull in only the new content. So you would have to run the entire import again and deal with duplicate content from the initial import.
Running The Import
First you need to install xenForo in a separate location from your vB forum. Use a separate database.
Once xenForo is installed then login to the Admin CP and access the importer:
Once you have selected the source system then click Configure Importer. Fill in the mysql connect info for the vB database and click Validate Configuration. You will find this information in vB's includes/config.php file:
Then you will be taken to the list of import modules. Run each module in order:
Most of them run without requiring any input from you, except for the Import Users module which has merge options to resolve username and email conflicts:
If you opt not to automatically merge users then you will be allowed to manually deal with conflicts at the end of the user import:
It is important to note that xenForo requires a unique email address for each user. If your source forum allows duplicate emails (as vB does) then conflicts will be reported for those users. The importer will require you to either merge those users or change one of the emails. You may wish to deal with those conflicts in vB before running the import.
When you have finished running all of the modules then the importer will do some cleanup and present you with this page:
You should do as it says and check the forum permissions and rebuild the search index:
Rebuilding the search index can take a long time on large forums, so plan accordingly. You may wish to run the rebuild overnight when traffic is low.
Some people have requested queries to mass mark all PMs as read following an import. See this post:
I came up with these queries for you. You can run these queries on your database to mark all PMs as read:
(added semicolons per DSF's post):
I tested this and it works. But you should backup first to be safe.
(added semicolons per DSF's post):
UPDATE xf_conversation_recipient SET last_read_date = UNIX_TIMESTAMP(); UPDATE xf_conversation_user SET is_unread = 0; UPDATE xf_user SET conversations_unread = 0;
Don't forget the xf_moderation_queue records. You would need to run these two queries to approve all moderated posts (borrowing Mikey's query):
And here are the queries to approve all moderated threads (per this post):
You also need to run this query to reset the count in the moderator bar (per this post):
DELETE FROM xf_moderation_queue WHERE content_type = 'post'; UPDATE xf_post SET message_state = 'visible' WHERE message_state = 'moderated';
DELETE FROM xf_moderation_queue WHERE content_type = 'thread'; UPDATE xf_thread SET discussion_state = 'visible' WHERE discussion_state = 'moderated';
DELETE FROM xf_data_registry WHERE data_key = 'moderationCounts';