MyBB Community Forums

Full Version: Move a forum from one domain to another
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Basically, I want to set up a forum over the next couple of days under a domain I already own, then when it's ready, register another domain (with different hosting) and move the forum over to there.

I know this has probably been asked a lot, and I'm sorry for adding another topic - but could someone point me in the direction of a tutorial please?

Thanks all! Smile
Here is a very explanatory explanation
[]1) Download the entire public_html folder to your hard drive, off the server. (via FTP)
2) Log into the ACP on your MyBB forum and create a new database back up. (ACP > Tools & Maintenance > Database backups)
3) Log in to your sites cpanel and go to PhpMyAdmin, from here export a copy of your database(s).

It's always good to have two copies, right?

4) Change the name servers for your domain name, so that they're pointing to the new host's name servers.

5) Log in to your new host's cpanel.
6) Create a new MySQL database
7) Create a new database user, grant all permissions, then add it to the database.

* I recommend naming the database and the database user the same as they were previously.

8) Select the database table that you've just created and import the MySQL database that you backed up from your old forum.
9) Upload the entire public_html folder that you backed up before onto the new host.

Now when you visit your site, you're thinking what?! An error? This is because you need to go in and edit the following file;

Code:
inc/config.php

The bit that you're interested in is:

Code:
$config['database']['database'] = 'a216715_tablename';
$config['database']['table_prefix'] = 'tablename_';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'a216715_tablename';
$config['database']['password'] = 'p4a55w0rd';

* a216715 being your cpanel username.

It'll have the configuration of your old host, simply add the new info and then re-upload in to inc/, replacing the old copy.

Now, refresh your website and you should be good to go.

If it still doesn't work you may need to change the board URL and cookie path which can be found in "inc/settings.php" then re-upload it once you've made the necessary changes.

I think that just about covers it.

If you have any problems, post or PM me.[/]
Actually, a better way to do this would be to delete config.php and instead edit the config table in the DB after restoring the backup. MyBB will automagically generate a fresh config.php containing what's in that table in PHP form after you navigate to your forum.
(2012-10-29, 01:23 AM)StingReay Wrote: [ -> ]Actually, a better way to do this would be to delete config.php and instead edit the config table in the DB after restoring the backup. MyBB will automagically generate a fresh config.php containing what's in that table in PHP form after you navigate to your forum.

No. config.php is needed to connect to the database. You're thinking of settings.php. Do not mix these two up.
Hi guys

Thanks for the post. I have it hosted on domain.co.uk/forumname/index.php, but want it moved to domainname.co.uk (examples). Is the process the same?