This article tells how to migrate TYPO3 installation to another server. It assumes that you are in charge of the server. If you use shared hosting, it may be harder to migrate because you do not have anough control. In short migration consists from the following parts:
- Migrating files
- Transferring the database
- Recreating directory structure
- Updating the installation
Let's see these sections in details.
Migrating files
To migrate files, archive the following directories:
- fileadmin
- uploads
- typo3conf
The rest will be recreated on the target server.
Transferring the database
Your source and target web servers should have the same character set and collation settings. You can view them using mysql command line utility:
show variables like 'character_set_%';
show variables like 'collation_%';
If these settings do not match, my.cnf settings on destination server should be adjusted. If changing my.cnf settings is not possible, you can put adjustments into setDBInit in Install tool. For example, to convert server fully to UTF8 for the current session, do:
SET NAMES utf8
SET SESSION character_set_server=utf8
The first command changes all settings except character_set_server. The second one changes settings for server. If that stays latin1 (not UTF8), most likely you will get weird errors (like "Field was not properly updated in the database") when saving records with non-English characters.
To backup database use the following command:
msqldump -u user -p --create-options --default-character-set=utf8 -K -e --opt -q database > database.sql
Options in italics are depended on your system.
When importing database on the target server use mysql utility with the same --default-character-set option:
/var/www $ mysql -u user -p --default-character-set=utf8
mysql> source database.sql
Recreating directory structure
Create directory structure as described in "Installing TYPO3 with upgrades in mind". Additionally create the typo3temp/ directory and any subdirectory in it that you had on the original server. There is no need to copy files from typo3temp/ to the new server. Unarchive files from the old server receating directory structure.
Change directory permissions on target server. Assuming that Apache group is apache, do the following:
sudo chgrp -R apache fileadmin typo3temp typo3conf uploads
sudo chmod -R g+wX fileadmin typo3temp typo3conf uploads
Notice the large "X". It means that permission is applied only to directories, not ordinary files.
Updating installation
Change database settings in typo3conf/localconf.php. Login to TYPO3. Go to Install tool and review basic settings. Set up ImageMagick directory and sendmail path if necessary. Check database using Database analyzer's COMPARE function.
Clear frontend cache. This is necessary because all images from typo3temp should be regenerated on the new host.
Verify that site works properly.
You are done with moving!

Thanks for the article.
http://www.fi-ausbilden.de/blog/2007/06/24/typo3-package-selber-bauen/
(sorry, it´s in german...)
Thanks
Also how do I empty the cache tables?
THanks,
Asfahaan
asfahaan@gmail.com