MyBB Community Forums

Full Version: Changing hosts, moving my data?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Whats the best method for transferring my forums/data when moving hosts? Can I just C+P the directory files or will I need to do installation and import data somehow?

Thanks

crazz
You will need to do these steps, primarily:

1. Copy the files onto your new server. Make sure to copy everything that is in your web directory.

2. Export a copy of your current database. You can do this from ACP -> Tools & Maintenance -> Database export.

3. Go into phpmyadmin (if available) and create a new database on your new host. Import your database here.

4. Change your /inc/config.php file. There will be 6 lines specifically that have your database configuration in them. An example is as follows:

$config['database']['type'] = 'mysqli';
$config['database']['database'] = 'database name';
$config['database']['table_prefix'] = 'mybb_';

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

Make sure that these correspond to your new database. You should leave the table prefix and the "mysqli" database type unchanged. In most cases, you should only need to change the database name, password, and username unless your host has instructions for other specialized configurations.

Once this is done, you should have no issues. Let us know if you experience any problems. Smile

More information: https://docs.mybb.com/1.8/faq/moving-to-a-new-web-host/
(2020-05-04, 02:13 AM)crazzmc Wrote: [ -> ]Whats the best method for transferring my forums/data when moving hosts? Can I just C+P the directory files or will I need to do installation and import data somehow?

Thanks

crazz
If you are changing hosts, you can ask your new hosting company.
Sometimes hosts do the website transfer for free. Smile
To this excellent advice, I'd only add - watch out for web root relative path changes.  i.e. If your forum was in the web root before - less work to set it up the same way on the new host.  DNS changes also require more effort.

cheers...
(2020-05-04, 02:20 AM)Darth Apple Wrote: [ -> ]
$config['database']['type'] = 'mysqli';
$config['database']['database'] = 'database name';
$config['database']['table_prefix'] = 'mybb_';

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

Hey guys just got my hosting almost set up. I exported my database, uploaded all my files. Had one quick question as I was about to change my config.php. I noticed that before I was on a pgsql database and now im on mysql will there be any issues in terms of transferring it over? Unfortunately this new host doesn't support postgresql. I did export the .gz and also the sql formats from the backups.

Edit: Thanks everyone else for the answers. Appreciate all the help!
You can try and it should work fine. Just make sure mysqli is the database type on config.php
I haven't tried it myself.
If that doesn't work, you will have to convert your db from postgresql to mysql.
(2020-05-09, 12:43 PM)WallBB Wrote: [ -> ]You can try and it should work fine. Just make sure mysqli is the database type on config.php
I haven't tried it myself.
If that doesn't work, you will have to convert your db from postgresql to mysql.

Unfortunately myphpadmin wont even accept the format of the sql backup. So will have to figure out how to convert it.
MySQL Workbench is a desktop application that can convert these. Never used it personally, but it seems pretty promising.