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

Anyway to change an installations database?

Discussion in 'Installation, Upgrade, and Import Support' started by Brian Chapman, Dec 7, 2011.

  1. Brian Chapman

    Brian Chapman New Member

    So, I recently had to completely reinstall Xenforo. I got rid of my forum directory then got a fresh installation uploaded to the FTP. Then naturally when you visit the site it prompts you to go through the installation process.

    The problem is I have my old DB already existing and it is populated with all of my users/posts/etc. - so when I try to install it, it naturally denies it because it already houses the stuff its trying to install.

    So, I went ahead and created a new database and installed it into it, hoping there was an easy way to simply change the database that it reads from. I couldn't find a simple option in the ACP, so I was hoping you guys might have something for me?

    Side note: I wouldn't mind doing the installation process all over again if there is a way to install using the old DB from the get-go.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    What is it you're trying to do exactly?

    Everything except avatars and attachments are stored in the database, so you can't just import user and post related content.

    By replacing the server files you have lost all attachments and avatars.
  3. Brian Chapman

    Brian Chapman New Member

    No, everything a database stores - I want back! Sorry, I was just using those as a narrative example, lol.

    And I didn't override the old database, it still exists in its previous form. I created a brand new fresh database for the purpose of installing so I wouldn't lose the old in the process in case I could figure out a way to use it on the fresh install. Which is what I'm asking - how can I accomplish that?

    I'm not sure if this was any less convoluted than the first post...
  4. SchmitzIT

    SchmitzIT Well-Known Member

    Wouldn't it just be a matter of editing the config file in /library and pointing it to the old database?
  5. Brogan

    Brogan XenForo Moderator Staff Member


    Still not sure what you mean, but just edit the config.php file to point to the old database.

    Then copy the avatars and attachments directories across, plus any custom style directories and add-ons you had insalled.
  6. Brian Chapman

    Brian Chapman New Member

    Yes, this is exactly. Thanks you two.

    So, I've changed over the name in the config file accordingly and now I get the "The board is currently being upgraded. Please check back later." message when visiting the site. I figure it might simply be rebuilding the site accordingly with the new database propagating and so forth. But it's been about 20 minutes. Is it just a matter of waiting this process out or could it be stalled for one reason or another?
  7. Brian Chapman

    Brian Chapman New Member

    Nevermind! I manually browsed to the admin.php ACP and now it's upgrading and rebuilding. Thanks again.

Share This Page