1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Merging two Xenforo Databases together

Discussion in 'Troubleshooting and Problems' started by Joykiller, Jun 30, 2014.

  1. Joykiller

    Joykiller Member

    Is there a way to merge two Xenforo Forum databases together when the following persists - Or at least merging the forum posts and moving them to the directed end locations?

    • Both forum structure "NodeID's" are different?
    • versions a slightly different say (1.1.4 to 1.2.5)
    As I have tried and it does not merge over threads / posts if the structure is different. So any one have a solution? It moves over all users, profiles, profile posts, private messages, but not forum posts.
    Last edited: Jun 30, 2014
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    There is a XF -> XF importer built-in. The import will create new forums after which you can manually move threads to consolidate your forums if you wish.
  3. Joykiller

    Joykiller Member

    Yeah I used it but it stated only 1.2 does that means the old database which has the 1.1.4 needs to be upgraded to 1.2 before it can be merged? because It merged over users, profile posts, pms and other things such as message counts etc but not threads.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I don't think I like the word "merged." It's an import. Data is copied from one database to another.

    The word "merge" can apply to user accounts though, because the import has an option to automatically merge source and destination users if their email or name matches. But everything else is just copied and is not merged with any destination content. Example... if both forums have a node of the same name then you will end up with two nodes with that name (they don't automatically combine or merge). Users are the exception as there is an explicit merge option for them.

    The importer might work with XF 1.1, but upgrading to XF 1.2 is the safe bet.
  5. Joykiller

    Joykiller Member

    • Please enter a valid value.
    • Please enter a valid value.
    • Please enter a valid value.
    Came up when i tried running again, under "import nodes"
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This requires debugging. But first I recommend upgrading the source forum to XF 1.2
    Joykiller likes this.
  7. Joykiller

    Joykiller Member

    I Upgraded to 1.2, valid value came up again. How to enable debug on that? Cant import posts without importing the nodes as they cannot be clicked.

    --Nm going to test removing all unneded addons first.
    Last edited: Jun 30, 2014
  8. petertdavis

    petertdavis Well-Known Member

    FWIW, I tried importing a XF 1.1 database recently and it didn't work too well (I had to upgrade the old database then start over).
  9. Joykiller

    Joykiller Member

    I got it working just had issues with addons. thx for all help guys.
  10. Dynamic

    Dynamic Well-Known Member

    How does this importer work?

    Forum A - 10,000 threads | 50,000 posts | 5,000 members
    Forum B - 5,000 threads | 20,000 posts | 1,000 members

    Say I would like to move all posts and members from Forum A into Forum B. What happens with the conflict of the post and thread ID numbers?

    Another question. We have forumA.com and forumB.com and we import A into B. So now only forumB.com exists. How do we get the traffic from Google links pointing to forumA.com to go to forumB.com if thread ID's have changed (which is what I am guessing happens).

  11. Brogan

    Brogan XenForo Moderator Staff Member

    You won't be able to retain IDs when importing into a forum with existing content.

    The imported content will be allocated new IDs.

    You would then have to set up redirects to ensure traffic from the old URLs is redirected to the new URLs.
  12. Dynamic

    Dynamic Well-Known Member

    Is that even possible for 600,000 threads? I know you can get .htaccess to redirect from one domain to another, so for example

    forumA.com/threads/something.222 to redirect to

    However, if the thread ID's have changed, what is the solution to get the redirect for say 600,000 topics to go from

    forumA.com/threads/something.222 to

  13. Slavik

    Slavik XenForo Moderator Staff Member

    It would require a custom script to read the import log table.
  14. Dynamic

    Dynamic Well-Known Member

    And I am guessing a really large .htaccess file?
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can use these scripts:


    You probably need a few lines of .htaccess to extract the ids from your old URLs and pass them to the redirect scripts which do the id mapping by consulting the import log in the database.

    If you want exact instructions then I need an example old and new thread URL.

Share This Page