Move my PHPBB2 forum to other server

2008-04-29


I have a forum named www.sametopic.com/forums/ based on PHPBB 2. I have made many changes and improvement on the original PHPBB 2.0.20 code and added many MOD.

Now I would build another forum , and I don't want to modify a lot of things on PHPBB 2 code, so I want to duplicate my SameTopic.com forum to the new one, and I want to create the new forum just in the same Godaddy hosting accout as my SameTopic.com forum.

Fortunately, Godaddy provide up to 25 Mysql databases to the customers then I got to create a new database easily. the next, what I should do is 'Copy' the old datas to the new database and copy all php files from sametopic folder to the new folder for the new forum.

Please read my detail steps, my new forum works well at present:

1: login to OLD mysql database by your OLD database login info in phpMyAdmin 2.7.0-pl2

provided by godaddy

2: Click 'Databases' on the right frame (Don't select 'Export' directly), select database

name such as 'dbsametopic';

3: Click 'Check All' to select all tables;

4: Click 'Export' on the top ;

5: You will now get a screen with quite a few options. Select the options listed below for

the least amount of incompatibility:

Structure Add DROP TABLEAdd AUTO_INCREMENT value

Data Complete insertsExtended inserts Export Type: INSERT Save as file (with newer versions you can also choose a name, whatever you like).

Then create a SQL file on your computer as your specified folder;

6: Create a NEW mysql database on your Godaddy account;

7: Login to the NEW mysql database management (phpMyAdmin 2.7.0-pl2 ) ;

8: Click 'SQL' on the top in the right frame;

9: Open the previously mentioned SQL file by some text editor tool such as Notes or EmEditor

(if file is big);

10: Copy all the SQL scripts and paste to SQL query text area and click 'Go' button;

(If your SQL is small and not over the limited size, you can import it directly as the

following:

8: Click 'SQL' icon on the left frame, you will see a popup window;

9: Select 'Import files' if your SQL file is not over the size on the right of 'Browse'

button )

10: Since I just duplicate OLD database to a NEW database that exist in the same godaddy

account, and these two databases are PHPBB, and I just create two seperate sub folder for

OLD and NEW applications,so, for my case, I just modify 'script_path' to my new sub folder

in phpbb_config table of NEW database; _OR, if you have set others parameters such cookie_path, you can follow the fowllowing steps:

Your database is now imported successfully. But, we're not done with phpMyAdmin after that.

We still have to edit some things. Normally, after the import, you will come back to the

same window (SQL). There, put the following SQL queries in the textarea:

UPDATE phpbb_config SET config_value = 'domain_name_here' WHERE config_name =

'cookie_domain'; UPDATE phpbb_config SET config_value = 'domain_name_here' WHERE config_name = 'server_name'; UPDATE phpbb_config SET config_value = 'path_to_phpBB' WHERE config_name = 'cookie_path'; UPDATE phpbb_config SET config_value = 'domain_name_here' WHERE config_name = 'script_path'; Notes:

Just replace the blue text with the appropriate values. Watch out with the cookie domain and

server name. You cannot include http:// or it will not work.

If you have a different table prefix (the standard is 'phpbb_'), you may have to change that

in the commands above.

If you have verified that all info is filled in correctly, hit the "Go" button again. It

will update a few configuration settings. _

11: Database part done, now you just copy files of the OLD sub foler's to the NEW folder,

but, You have to change config.php file to your correct configration for NEW application, in

godaddy, different databases located different server, my sample is:

<?php

// phpBB 2.x auto-generated config file // Do not change anything in this file!

$dbms = 'mysql4';

$dbhost = 'mysqlXXX.secureserver.net'; $dbname = 'myNewdbName'; $dbuser = 'myNewdbUser'; $dbpasswd = '.....(MyPassword)';

$table_prefix = '(new table prefix)_';

define('PHPBB_INSTALLED', true);

?>

12: Now you can try to visit your new subfolder and see everything works, but only some data

s got strange show (very few, this because the bug of phpMyAdmin 2.7.0-pl2 and my forum is

UTF-8 encode,don't matter I don't care)


support content provided by other people:

That was it for phpMyAdmin. You can now consider your database ready to go. All you need to

do now, is upload your phpBB files to the new server. So, just download them to your

computer. When done, before uploading, you will have to do one little thing. Edit

config.php. This file contains information to connect to the database and since you're moving to another

server, you probably have new connection information. Open the file in a plain text editor and change the values $dbhost, $dbname, $dbuser,

$dbpasswd to the appropriate ones.

Now just upload everything to your new server. If you have installed hacks like File

Attachments, Photo Albums and so forth you may have to check some file permissions. Refer to

their installation guides if you are not sure what I'm talking about (look for 'chmod'). If

you allow avatar uploads, be sure to chmod the images/avatars directory to 777 as well. Read

the tutorials on CHMODing if you need to freshen your memory:

CHMOD File Permissions by Rapid Dr3am CHMOD 2: Number CHMODing by Jaeboy Windows Server File Permissions by Rapid Dr3am

Well, I guess that is that. Try accessing your forum on the new server. It should work.

Congratulations!