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

Moving XenForo

Discussion in 'Installation, Upgrade, and Import Support' started by HoddzDJ, Jul 13, 2011.

  1. HoddzDJ

    HoddzDJ Active Member

    Okay guys, it's been a while since I have posted on here and I am well and truly out of touch with what has been going on with XenForo over the past couple months. But I am back now and I am planning on moving my forums to my main site. I will try and explain everything as clearly and as detailed as I can.

    • I have two cPanel Hosting Accounts, both on the same server.
    • One is my main site, and the other is my forums.
    • Both have different domain names.

    I want to move my forums to my main site under the ./forum/ directory. Would I be correct in saying I can backup my database on my forum hosting account and import it into my main hosting account and then I'm pretty much done, obviously with a few tweaks to the config file? Or would it be better for me to install a fresh XenForo on my main site account and then somehow move it over?

    Thanks in advance =]
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You don't need a fresh install. Rather you need to copy over the existing database and files to the main site and then update the library/config.php file. And since the URL will be different you also need to update this setting once the move is complete:

    Admin CP -> Home -> Options -> Basic Board Information -> Board URL

    Basically it's a backup + restore to a different site. This thread has detailed information. CPanel also has its own database backup/restore feature which works well for smaller databases.
  3. HoddzDJ

    HoddzDJ Active Member

    Awesome, thanks for the quick reply Jake. The only thing that could mess me up is the fact that the databases will be named differently. Like with cPanel it's "*username*_database-name" so the two databases will be different names. I haven't looked into the config.php file yet but I'm guessing it would be there anyway?
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes the CPanel prefix for the database names will be different. You will need to change the name in the library/config.php file. That is the only place.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    I wish more people would read the FAQs :(


    How can I move my installation to a different directory?
    Update the Board URL in the ACP -> Options -> Basic Board Information and move the files to the new directory. You may need to restart the server for the change to take effect.

    How can I move my installation to a different host?
    Backup the existing database and server files. Copy them to the new server and update the library/config.php file with the new database details. Lastly, update the Board URL in the ACP -> Options -> Basic Board Information, if it has changed.
    Note that if you are moving to a different type of web server and have Friendly URLs enabled, you will need to make the appropriate changes. Refer to the Friendly URLs section of the XenForo Help Manual for more details.
    Saeed likes this.
  6. HoddzDJ

    HoddzDJ Active Member

    Cheers for the replies guys, and yes I really should read the FAQs but I thought you'd want to add another post to your count Brogan! If people read them all the time then there would be no need for the forums half the time! But next time I will make sure I check it first before I post!

    Again, thanks and I am gonna sort it all tonight.

    One thing that I have just thout of... I am going from version 1.0.0 to 1.0.4. Is it best for me to update to .4 on the old host and then backup the database or can I just upload .4 files and run on the .0 database?
  7. EQnoble

    EQnoble Well-Known Member

    When you upgrade it's wise to backup your site...xf has been the most stable installing and upgrading software I have used on my server..but it is a computer and things happen. Better to be safe, back up everything first...and then experiment with it. You gain knowledge and experience with no risk :)

    * make sure to select partial and then individually grab your home dir your dbs then your mail stuff.

    Unless you have whm..a full backup is useless for you other than for archiving.
  8. HoddzDJ

    HoddzDJ Active Member

    So I back up version 1.0.0, then upload files for 1.0.4 to the new hosting account and then restore to the 1.0.0 backup?
  9. Brogan

    Brogan XenForo Moderator Staff Member

    You could upload the 1.0.4 files to new location, import the backup of the DB, then run the upgrade.

    However, before you perform the upgrade you will also need to copy across your .htaccess, /library/config.php, /data and /internal_data directories.
    Plus any add-on specific files.
  10. HoddzDJ

    HoddzDJ Active Member

    So I would be better off upgrading before the move, to make things so much easier?
  11. Kier

    Kier XenForo Developer Staff Member

    I would suggest upgrading on the new server - you can just upload the new files from the upgrade to the new server and next time you access that site the upgrade will be available to run.
  12. HoddzDJ

    HoddzDJ Active Member

    Sorted! I shall do that then and if all goes Pete Tong then I can just upgrade on the old one and move it across! Again, cheers for all the help folks!
  13. HoddzDJ

    HoddzDJ Active Member

    Okay so I have managed to move it over to the new site and I'm still running on version 1.0.0. Now, I'd like to pretty much just keep the posts, users, forums etc... well everything other than all of the addons that I have installed. Can I just disable/uninstall them and will that be good enough for it?
  14. Brogan

    Brogan XenForo Moderator Staff Member

    That should do it.

    Depending on the add-ons, you may need to revert any manual template edits.
    EQnoble likes this.
  15. HoddzDJ

    HoddzDJ Active Member

    Ah I didn't think of that! I will have to go through and see what I did then, and like you say revert it. Brogan, you da man.
    EQnoble likes this.
  16. EQnoble

    EQnoble Well-Known Member

    Two things I often say either here or to myself.
  17. Renegade

    Renegade Well-Known Member

    I need to test an add-on upgrade for my forum. So I wanted to create a copy of the production site.
    1. I copied all the home folder files to the new location.
    2. I took a cpanel backup of the database and restored it to a fresh database through phpmyadmin.
    3. I changed the config file
    4. I changed the board URL
    When I go to the home page of the test site everything is showing as it should. However when I click on any of the links it is throwing up the following error. What am I missing?

    Edit: figured it out. URL rewrite was the issue so I just disabled user friendly URL. Will try deleting the htaccess contents and enabling the friendly URL again if needed.

    Vincent likes this.

Share This Page