joomla database backup and import
when you move site to a different joomla server you need backup your database.your web host should give you PhpMyAdmin access. If you're not sure, visit your web host and ask for help. If you're familiar with PhpMyAdmin, simply log in to your Joomla database and if necessary, select the database you want to backup from the drop down box top-left. Once your database is loaded into PhpMyAdmin, click the 'Export' tab at the top. A window will load - under 'Export' click 'Select All' to grab all the files, leave the other settings at default and click the 'Save as file' radio box - you can then give your backup a name in the 'File name template' field. Click 'Go' and your database backup will be created and downloaded to your PC. Once it is complete, you'll want to locate it on your PC and open it in Notepad or Dreamweaver - if it's big, this may take some time. Depending on your host, PhpMyAdmin will add information into the backup file relevant to your old hosts database server. Since we're moving it to a new host, we'll want to delete that data so we don't have any errors when we import to the new server. It will probably look like this:
-- phpMyAdmin SQL Dump
-- version 126.96.36.199
-- Host: sql.yourdomain.com
-- Generation Time: Jul 24, 2007 at 02:26 PM
-- Server version: 5.0.18
-- PHP Version: 4.4.7
-- Database: `joomla`
Once you delete those lines, save your database backup.
We now want to import this database backup to your new web host. Check with your host to determine how to login to PhpMyAdmin (you may need to create the new database for Joomla on the new host, if you haven't already) - login to the new host's PhpMyAdmin and select the 'Import' tab at the top. Using the browse button, locate your database backup and select it. Leave the default settings and hit 'Go' and your database will be imported - you'll get a notice if there are any errors or if the process is successful.
Our final step is to use notepad or Dreamweaver to open and edit the configuration.php file we backed up in our first step. We want to change the settings to match our new host:
$mosConfig_host = 'sql.newwebhost.com';
$mosConfig_user = 'username';
$mosConfig_password = 'password';
$mosConfig_db = 'joomla';
$mosConfig_dbprefix = 'jos_';
$mosConfig_absolute_path = '/home/username/yourpathtojoomla';
$mosConfig_live_site = 'http://www.yourdomain.com';
$mosConfig_cachepath = '/home/username/yourpathtojoomla/cache';
Save your configuration file - perhaps as configuration2.php so you can keep the old file and then upload to the new server with FTP - rename as configuration.php once it's on the server and you should be done! Don't forget to change the DNS settings on your domain name from your old host to the new web host for this to work properly - you may need to use an IP to check until the domain change propagates throughout the internet.