Move board to new location/server/website

Support for ANY phpBB3 related issue.
- MOD Support requests should be asked in the specific MOD topic -
Any version of phpBB3 is supported.
Forum rules
READ: StarTrekGuide.com Board Rules

Users are requested to fill out the Support Request Template and include it in every support request.

As a general rule, Support for a Specific MOD should be requested in the specific MOD topic, as it would alert the MOD Author of the support request.
Please specify if you have any MODs installed on your board when asking for support.

phpBB support requests allowed
MOD Requests and Generic discussions not allowed

Move board to new location/server/website

Postby ..::Frans::.. » 10 Jan 2008, 08:40

Since this is a question that's been asked lots of times, let's make a little step-by-step tutorial for it.

We have the next OLD situation:

The url is http://www.oldsite.com/board/
Database = old_db
Database_user = old_db_user
Database_password = old123

You want to move this board completely to a new location.
The url will become http://www.newsite.org/forum/
Database = new_db
Database_user = new_db_user
Database_password = new456

The examples i will give are based on the phpbb prefix. Of course, you can have another table prefix, so remember to adjust these when i mention an example.

This information is needed when moving to the new location.
If you don't have all this information, you have to contact your hosting company or webmaster to provide you with this information.


Step-by-step
  1. DISABLE your old board in acp->Board configuration (That way, no new posts will be added)
  2. Make a copy of the files OLD to the desktop of your PC (let's say we call this copy OLD) with any decent FTP Program (there are lots of very nice FTP-clients out there...)
  3. Make a copy of your database.
    • Log into a mysql manager (phpmyadmin will do), select old_db at the left side (IMPORTANT) and choose EXPORT at the top tab.
    • Now you are getting a screen with lots of options. Few are very important:
      • CHECK Structure
      • Inside structure CHECK: Add AUTO_INCREMENT value
      • Inside structure CHECK: Enclose table and field names with backquotes
      • CHECK Data
      • Inside Data CHECK: Complete Inserts
      • Inside Data UNCHECK: Extended inserts
      • Make sure the other checkboxes inside are UNCHECKED and that the EXPORT TYPE is set to INSERT
      • 1 box below that one, CHECK Save as File, leave the File name template (1): field as it is (__DB__)
      • Set Compression to 'NONE' and press start.
      • After a little while a save dialog will pop up, save the file with the default name to your desktop also and wait till downloading has finished.
  4. Now that you have a complete backup of the complete board on your desktop you can open the new location in your FTP Program.
  5. Upload all files to the appropriate directory (in our example it is the directory called 'Forum')
  6. When uploading is finished open up a webbrowser and browse to the new location. You should see a phpbb error stating it can't connect to the database. This is NORMAL for the situation we are currently in.
  7. OPEN the new database (select it in the list at the left side) in a mysql manager (phpmyadmin will do)
  8. Press the IMPORT tab
  9. At the top you will see a box named 'File to import'
  10. In the file selection box, select the file on your desktop that has the name of your OLD database and the extension .sql
  11. Leave the rest of the options "as is" and press go. BEWARE: If you use this method, only files smaller dan 2 MB (=2024Kb) can be uploaded!!!!!! At the bottom of this little titorial i will give you a hint of how to import bigger files.
  12. When the import has finished most of the work has been done. The only thing we need to do is make the files connect with your data again.


To get your board running and functioning correctly again, some minor adjustments to data and config file are needed.
  1. Open the phpbb_config table in phpmyadmin.
  2. Look for the next fields: script_path, server_name and server_protocol. These field together form the url of your (now OLD) installation and should reflect the information of your NEW installation, so you have to change them manually.
    • Set server_protocol to 'http://' (if it wasn't already) or use 'https' if you are connecting to a secured url.
    • Set server_name to (our example!!) 'www.newsite.org'
    • Set script_path to (our example!!) 'forum'
  3. At this stage your database is in installed and working properly. The last thing we need to do is the to let the files connect to this database.
  4. At the root of your installation (in our example: http://www.newsite.org/forum/) is a file called config.php. Download it (or open the copy on your desktop in the directory you had, called 'OLD') and open it in a text-editor.
  5. The config file has about 10 short lines, but before we continue, DO NOT CHANGE OTHERS than needed and explained here in this tutorial !!!!
    The (example) lines:
    Code: Select all
    $dbname = 'old_db';
    $dbuser = 'old_db_user';
    $dbpasswd = 'old123';

    are the ones we need to change to reflect the information from the new database. So change them to:
    Code: Select all
    $dbname = 'new_db';
    $dbuser = 'new_db_user';
    $dbpasswd = 'new456';

    MAKE SURE YOU LEAVE EVERYTHING ELSE ALONE, SO KEEP THE ' AND THE ; IN PLACE, JUST CHANGE THE TEXT!!!
  6. Save and upload the config.php file, overwriting the old one and browse (again) to http://www.newsite.org/forum/. You should now have a (disabled) board running at the new location. You can login now, got to the acp and enable the board again to let your users post again.
  7. Good luck ! :good:




Notes:
If you want to learn how to use phpmyadmin, please check their website at http://www.phpmyadmin.net/home_page/index.php and look for the many tutorials on using phpmyadmin.

If you want to import larger databases (files) than the 2MB limit phpmyadmin is having than you need to get a copy of the (perfectly working) bigdump.php. Checkout the latest version and/or download the latest version at their site: http://www.ozerov.de/bigdump.php.

Problems:
If you get logged out of the NEW board after each and every page, then it's most likely a cookie problem. You can either click the "Delete all board cookies" on the index page, OR remove the cookies stored in your browser manually. (See the manual for your particular browser howto use this function)

If you still get the error: Cannot connect to database then the changes you've made to the config file arent correct. Please check if these settings are all correct.
ping...
User avatar
..::Frans::..
STG Development
STG Development
 
Posts: 1608
Joined: 28 Mar 2007, 15:37
Location: Netherlands
Favorite Team: RKC
Gender: Male
phpBB Knowledge: 9




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: Move board to new location/server/website

Postby CityState » 26 Jan 2008, 23:54

Hey Frans!

That's the whole lot! Nice! Will definitely keep this handy.

This could also be used for reference for inquires regarding backing up their databases for noobs like myself. :grin:

Thanks for this complete list.
CityState
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Re: Move board to new location/server/website

Postby lostcs » 31 Jan 2008, 22:33

Unfortunately I find it doesn't work. It comes unstuck

# When uploading is finished open up a webbrowser and browse to the new location. You should see a phpbb error stating it can't connect to the database. This is NORMAL for the situation we are currently in.
# OPEN the new database (select it in the list at the left side) in a mysql manager (phpmyadmin will do)


There is no new database on the left... there is no new database having followed the previous steps.

Not being a tech wizard I don't see how there could be a database there has been nothing to hook it into the mysql section to cause it to recognise that as a database.

Am I missing something?

Thanks
Alex
lostcs    
Crewman
Crewman
 
Posts: 4
Joined: 31 Jan 2008, 22:27
Gender: Female

Re: Move board to new location/server/website

Postby ..::Frans::.. » 01 Feb 2008, 01:27

Yes, you are missing the phpmyadmin part of the new location.

Please, take the time to read each and every sentence thouroughly. If you have any questions after that, i will answer them but you didn't get the basics i guess.....
ping...
User avatar
..::Frans::..
STG Development
STG Development
 
Posts: 1608
Joined: 28 Mar 2007, 15:37
Location: Netherlands
Favorite Team: RKC
Gender: Male
phpBB Knowledge: 9

Re: Move board to new location/server/website

Postby lostcs » 01 Feb 2008, 02:11

Thanks but I won't be bothering again.

when I'm in phpmyadmin there is no database in the left.

When I installed phpbb I had a database on the left in phpmyadmin. But that's useless because I don't want to start the forum over I want to move one in it's entirety.

Not only did I read every step I read and followed every step as I was attempting this three times.
lostcs    
Crewman
Crewman
 
Posts: 4
Joined: 31 Jan 2008, 22:27
Gender: Female

Re: Move board to new location/server/website

Postby ..::Frans::.. » 01 Feb 2008, 02:23

It wasn't my intention to be rude so please, gon't be aggitated.

This tutorial will help you move your board in it entirety, and it works flawless. The only thing i can think of is that you have a limited (by your provider) version of phpmyadmin where you have only 1 database. Can you make a screenshot or explain a little in detail what you are exactly missing ??
ping...
User avatar
..::Frans::..
STG Development
STG Development
 
Posts: 1608
Joined: 28 Mar 2007, 15:37
Location: Netherlands
Favorite Team: RKC
Gender: Male
phpBB Knowledge: 9

Re: Move board to new location/server/website

Postby ChriZathens » 01 Feb 2008, 03:40

I didn't know I could use bigbump... :)
I did not think it had to do with phpbb version (AFAIK it is independent ) but I haven't really attempted to use it in version 3 of phpbb..
In my phpbb2 board I'm using Vic D'Efant's sql backup mod, which has a very special and very useful feature: Creates separate sql files for each table..
So, in my case where my db is about 200MB, the largest sql file was no more than 15mb, which was really easy for bigdump to import..

Do you think that it will work correctly with a backup that I have now on a local phpbb3 board (approx 145MB)?
Thanks for the info.. :good:
My mods
User avatar
ChriZathens    
MOD Author
MOD Author
 
Posts: 244
Joined: 19 Feb 2007, 10:50
Location: Greece
Gender: Male

Re: Move board to new location/server/website

Postby ..::Frans::.. » 01 Feb 2008, 04:00

I have a larger .sql file (450 MB) and it works fine with bigdump, no problem. Yes, it takes a while to run, but then again, it's always faster than doing it manually table by table.....
ping...
User avatar
..::Frans::..
STG Development
STG Development
 
Posts: 1608
Joined: 28 Mar 2007, 15:37
Location: Netherlands
Favorite Team: RKC
Gender: Male
phpBB Knowledge: 9

Re: Move board to new location/server/website

Postby ChriZathens » 01 Feb 2008, 12:54

Well, yes :)
I tried it, too (sql file 147mb) and had no prob...
My mods
User avatar
ChriZathens    
MOD Author
MOD Author
 
Posts: 244
Joined: 19 Feb 2007, 10:50
Location: Greece
Gender: Male

Re: Move board to new location/server/website

Postby Highway of Life » 01 Feb 2008, 13:16

If you have Navicat, it makes it even easier. ;)
I?ve disabled the use of phpMyAdmin on all of my servers for security reasons. -- I don?t want to keep that software patched up with Security Updates, and Navicat is a much more secure and efficient means when used with a Tunnel. :good:
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Next

Return to phpBB3 Support

Who is online

Users browsing this forum: No registered users and 13 guests