If you control the hosting for both accounts, here is my suggestion.
1. Notify the client that you will be moving the site to the main domain on a certain day and time. Best day and time would be their lowest weekly traffic time.
2. Set up the main domain for the site with the hosting company a few days in advance but don't change the DNS yet. You are going to create the files and database on the new site so that it is ready for the DNS change.
3. Upgrade your site to the latest version of CMS Made Simple and all modules.
4. If you have SSH access then zip or gzip the entire site and copy the zip file to the new site using WGET or FTP.
If you do not have SSH access, then use the tool provided in the control panel to zip it.
If you do not have SSH or a zip tool in the control panel, then use FTP to download the uploads directory and the modules directory, and then upload these to the new site. (This takes forever, so you only need the modules and uploads directories for the method suggested here. If you have your template images in the images dir, then you will need that as well.)
Problem: How do you upload files to a site that you haven't pointed the DNS at yet?
ANSWER: You can use the IP address instead of ftp.domain.com and as long as you have the right username and password the files will go to the correct site, even if it is a shared hosting account.
5. On the control panel of your old site, go to the PHP MY ADMIN for you database. Click the database name in the left panel. In the right panel click "Export". Click the "select all" to select all tables. Then check the box to export as a file. It doesn't matter if it is gzipped or not. Then click "Go" and save the file somewhere on your local machine.
6. On the control panel for your new site, go to databases, and create a database with the same name, username, and password as the old site. After it has been created, go to PHP MY ADMIN and click the database name in the left panel. In the right panel, click "Import". Select the database file from your local machine and click Go. It will tell you if the import was successful or unsuccessful.
7. Open your config.php in your file editor. We are going to do find and replace.
First look at the old path. It will look like this on Plesk:
/var/www/vhosts/olddomain.com/httpdocs
or this if you're on Cpanel
/home/oldomain.com/public_html/
You want to do a find/replace operation where you replace
the path up to olddomain.com to replace it with newdomain.com
8. Now you also need to change the URL:
Find the line:
$config['root_url'] = '
http://www.olddomain.com';
change it to '
http://www.newdomain.com';
9. If your new database has the exact same dbname and username as the old one, then you need not change anything else. However, if you are on the same shared host, you probably had to change the database name and username. If that is the case find these two lines in config.php and change them to the new db username and password:
$config['db_username'] = 'oldname';
$config['db_password'] = 'oldpassword';
$config['db_name'] = 'oldname';
10. On your new site hosting account, use wget or ftp to download the same version of CMS Made Simple that the old site is on. Untar or unzip this file. If you have SSH access the command is tar -zxf filename.tar.gz . Then recursively change the permissions of tmp, uploads and modules to 775. For explicit details see this:
http://wiki.cmsmadesimple.org/index.php/User_Handbook/Installation/Shell_Install
NOW your site has the correct files, and the correct database. Double check to make sure that your .htaccess file was copied over and change any domain specific strings to the new domain.
11. In your new site, test the site using the site preview. This won't work for clicking links but if you can see the main page ok, then you're probably golden.
12. If you can edit the DNS zone for the old site, change the A and MX records so the site points at the IP address of the new site. This will ensure the old site forwards to the new one.
13. Now prepare to change the DNS on the nameservers to point at your new site. If you are hosting email on this domain you may want to make some changes so that the email will not be interrupted during the switch. Main things to make sure are that the SPF includes the ip address of the new site, and that the old nameserver directs mail to the ip address of the new site. (Let me know if you need more details on that.) If you've made your preparations, you can switch the DNS and let it pop over to the new site.
CAVEATS:
If you are using a live ordering system then the best thing is to make the old and new site have "site down" until the DNS propagation has completed. This will prevent and order being made on the old system that doesn't get carried over to the new one.