Knowledge Base

Moving Your phpBB3 Forum To A New Host Using phpMyAdmin.
Article ID: 405
Written By: FLA3H
Written On: Mon May 19, 2008 1:54 pm
Description: This guide will tell you how to move your forums plus all components to a new server using phpMyAdmin. Goes into great detail.
Link to this article: Select All
[url=http://www.phpbb.com/kb/article/moving-your-phpbb3-forum-to-a-new-host-using-phpmyadmin/]Knowledge Base - Moving Your phpBB3 Forum To A New Host Using phpMyAdmin.[/url]

Method - phpMyAdmin:
1) AdminCP.
1.a. Open your adminCP. ("http://(Your Domain)/(Directory, If Applicable)/adm/")
1.b. Click The Tab "General".
1.c. Under "Server Configuration" Click, "Server Settings".
1.d. Navigate to "Server URL Settings"
1.e. Change server protocol, if applicable.
1.f. Change the domain, if applicable.
1.g. Change the port, if applicable.
1.h. Change Script Path, if applicable.
10.i. Click Submit.
1.j. Proceed to Step 2

2) Exporting Database.
2.a. Load into phpMyAdmin.
2.b. Select your database.
2.c. Click the tab "export".
2.d. Once on the "export page", you will see numerous options in different boxes. Make sure that:
- All the tables are selected if not, click "Select All"
- Make sure the output is SQL, if not click the radio button SQL
- In the "Structure" box, check the box next to "Add DROP TABLE"
### Now you have the option to download the database output, or view it and copy it###
Download:
- Check the box "Save as file"
- Choose your compression, none, zipped, gzipped.
- Click Go.
- You will get a download file, save to your desktop (Or chosen destination)
- Extract the file from the .zip to your desktop.
- Proceed to Step 3.

View The Database:
- Make sure the box "Save as file" is UN-CHECKED.
- Click Go.
- You will be taken to a page displaying your SQL database.
- Click within the text area and press CTRL+A
- Then press CTRL+C (Or Right Click, Copy)
- You can either keep this in your clipboard, not recomended!, or save into a simple .txt file, recomended!.
- Open notepad.
- Press CTRL+V, (Or Right Click, Paste)
- Save as, SQL.txt on your desktop.
- Proceed to Step 3.

3) Exporting Forums.
3.a.
### Now you have the option to use FTP, or use Cpanel File Manager###
FTP:
- Open Your FTP Client
- Navigate to forum directory.
- Create New folder on your desktop, name it "Forums"
- In your FTP client, Highlight ALL the files, drag and drop them into the "Forum" folder on your desktop.
- This is a lengthy process.
- Proceed to Step 4.


Filemanager:
- Open Cpanel, enter your admin login details.
- Navigate to "File Manager".
- Click on that, a pop up should display.
- Select these options:
Document Root
Display dot files
- Click OK
- Navigate to forum directory.
- Select all files.
- Click Compress.
- Once compressed locate the .zip
- Double click the ZIP icon.
- Download will start, download to your desktop.
- Proceed to Step 4.


4) Creating DataBase, on the new host.
4.a. Create the database.
4.b. For this guide I will be using the vaules:
Database Name: fla3h_guide
Username: fla3h_guideuser
Password: guide (Make much more complex, with symbols, numbers, and letters in)

Asign the user to the database, with Full Privlages.
4.c. Proceed To Step 5.

5) Editing "config.php"
5.a. In your forum dump, navigate to "config.php"
5.b. Open in your favourite code editor, preferably with syntax highlighting. (Makes the job easier to understand)
5.c.
Code: Select all
<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysqli';
$dbhost = '';
$dbport = '';
$dbname = 'fla3h_guide'; //Database Name
$dbuser = 'fla3h_guideuser'; //Database User
$dbpasswd = 'guide'; //Database Password
$table_prefix = 'phpbb_'; //Database Table Prefix
$acm_type = 'file';
$load_extensions = '';

@define('PHPBB_INSTALLED', true);
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
?>

5.d. Save file.
5.e. Proceed to Step 6.

6) Transerfing Files To New Server.
6.a.
### Now you have the option to use FTP, or use Cpanel File Manager###
FTP:
- Open folder "Forums" on your desktop.
- Open your FTP client.
- Press CTRL+A within the folder ("Forums")
- Navigate to the file where your forums will be hosted.
- Drag 'n' Drop the forum dump into the directory.
- Proceed to Step 7


File Manager:
- Open Cpanel, enter your admin login details.
- Navigate to "File Manager".
- Click on that, a pop up should display.
- Select these options:
Document Root
Display dot files
- Click OK
- Navigate to the directory in which you want your forum to be placed.
- Click Upload.
- Select the zip file you downloaded from the old host.
- Once uploaded select the zip.
- Click un-compress.
- Click Ok to the message.
- Proceed to Step 7


7) Uploading the Database backup.
7.a. Load into phpMyAdmin.
7.b. Select your database.
7.c. Click the tab "Import".
7.d. Click Browse.
7.d. Click the database which you downloaded from the old host ("Step 1"(Should be on your desktop))
7.e. Click GO.
7.f. This can take about ~6 minutes to import the new database.
7.g. Proceed to Step 8.

8) Looking for errors.
If you have correctly followed this guide you should not need do this step.
8.a. Navigate around your forums, pick threads/topics at random.
8.b. Click Post, type "TEST" then click post.
8.c. Delete that post.
8.d. Test if you can post topics.
8.e. Proceed to step 9.

9) Notify Members.
9.a. In the correct forum, post a topic telling them you have changed hosts and migrated databases.
9.b. In topic state; " If anyone has problems logging in, notify me: (Email Adress [at] here [dot] com)
9.c. Make sure the permissions are set so Guests can see that forum.
9.d. Proceed to Step 10.

10) Altering Cookie Settings.
10.a. Login to ACP, ("http://(Your Domain)/(Directory, If Applicable)/adm/").
10.b. Click The General Tab.
10.c. Under "Server Configuration" Click, "Cookie Settings".
10.d.
- Cookie Domain, enter your domain ie: "forums.newgenhacks.co.cc"
- Cookie Name, phpbb3_g2myy (This can be any string of letters or numbers)
- Cookie Path, /
10.e.Click Submit.
10.f. Complete (: