Moving XenForo

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 =]
 
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.
 
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?
 
I wish more people would read the FAQs :(

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-180455

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.
 
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?
 
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.
cvbnjnhgnm.webp
 
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?
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.
 
So I would be better off upgrading before the move, to make things so much easier?
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.
 
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?
 
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.

Not Found
The requested URL /index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

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.
 
Top Bottom