This does partially depend on what authority you have in both places. Life will be much easier if you can use tools like phpMyAdmin and ssh to move things.
If you are able to mimic the folder structure on the second server you should be fine simply ftp
ing the files from one to the other. If you don't (say, for some reason, you have a custom directory and aren't using /var/www/
as your root, then you should at a minimum test to see if the directory is hard coded somewhere (find /your/dir/ -exec grep /your/dir {} \; -print
should do it)). But you also need to make sure that you've chmod
'd the files appropriately (a sane default is often chmod -R 644 /path/to/dir
(it gives everyone read access while keeping read-write for the file owner), though you might want to use 666 (read-write))
You will need to check to see if your conf files contain anything which is not default. They are in /etc/apache2
by default in Ubuntu. (As per the comment, make sure you copy your php.ini over, and while you're at it, make sure that you have all of the extensions available for PHP and Apache (Apache should raise a red flag if there are extensions missing, with PHP make sure that the outputs of phpinfo() are reasonably comparable))
I, personally, make sure that I've not only copied the data from the database (using mysqldump or the phpMyAdmin export tool), but I make sure that I have the same usernames and passwords (including the apropriate permissions) — sometimes frameworks will hide this information in not-so-obvious places, reproduction of the original environment makes life more tolerable.
If you have mail set up on these servers, that is a whole 'nother can of worms. You'll need to make sure you update your MX records at a minimum.
The best advice I can give, however, is DON'T PULL THE FINAL SWITCH UNTIL YOU HAVE CONFIRMED THAT EVERYTHING WORKS. I recently (accidentally) did not perform a thorough test of my email system and it almost cost me thousands of dollars in lost revenue.
As a side note: often hosting companies will help you transfer data from one domain to another. If this is an option, you may wat to consider it.