24-10-2010, 04:04 AM
How to backup and move a MyBB forum
In this tutorial i am going to show you how to correctly backup and transfer / move an entire MyBB forum, including databases over to a new web host. This tutorial has been written from my personal experience.
It is very important that you follow all of the steps correctly otherwise you could end up losing your forum or corrupting something.
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.
Extras:
The original post can be found here on my forum: http://mcompute.co.uk/showthread.php?tid=479
Please do not copy this tutorial without asking me first. The link must be left intact.