This writeup is somewhat dated. The main migration information is located around here. The Migrate module handles sophisticated transitions. The Backup & Migrate module can help perform basic site moves with optimized database dumps.
For older Drupal sites start with Moving entire Drupal site with databases.
This might help too: Backing Up Your Database
One approach for moving a Drupal 5.x site
I know the "official" process is to load the "tar" file to the host and unpack it. As an alternative, one can copy the code directly from your test site on your PC. I've tried uploading code from my machine twice with disastrous effects. (Okay, so I was born blonde!) So, I've worked out my own process that works. [By the way, this also reduces the bandwidth usage for those who might be running short on that.]
What has always worked for me is to install Drupal with cPanel/Fantastico (I know there are some people out here who will speak ill of Fantastico, but it has always done me right). Now, to be fair, one needs to understand what Fantastico can and cannot do.
Fantastico only supports core functions. It does not support custom themes, contributed modules, or custom code (outside of content). Fantastico does not use "update.php" (as a matter of fact, doesn't even load it), so it is not a good idea to use it to upgrade your installation. As long as you understand this, you're much less likely to have problems.
Make sure that the correct versions of modules and themes are working on your test site.
Here's my process: (by the way, this should pretty much work for changing hosts as well)
- Keep a pencil and paper handy to write down what changes you have to make. You can use this if you need to restart, or to think about changes to your site that slow down moving to new releases.
- Use phpMyAdmin (on some hosts, it's hidden under MySql) to back up your live database. If you have a site that is actively receiving new content, you may have to put the site into maintenance mode to prevent losing new content.
- It would also be a good idea to back up your test database, just in case...
- Import the database into your test site.
- Download any pictures you've uploaded and any folders that are created by the modules you have installed.
- If your live site and test site are not at the same version, you will need to run "update.php."
- Open your browser to your test site. Don't panic if everything looks strange, or even blank.
- In the URL bar, append "update.php" and press Enter. If it says you don't have the access rights, don't worry.
- Using Notepad or similar text editor, open "update.php".
- Near the top, you will see:
// Enforce access checking?
$access_check = TRUE;
- Change it to
FALSEand save it.
- Try "update.php" again.
- If you have any errors listed, search the Drupal site for fixes. There's a good chance that someone else has had the problem. If it appears to be a new error, post a request for help. Take your site out of maintenance mode and plan to start over when it's fixed.
$access_checkback to TRUE.
- If you had a custom theme, you probably need to re-enable it for the site to look right.
- Now check out all your module settings. They'll probably be okay.
- Look through your content, especially the front page. Make sure your menus are correct.
- Check out any content that uses custom code, especially if you are changing Drupal versions.
- Does everything check out? Good, you've done all the real work. Now the easy(er) part.
Administer>>Site Configuration>>Themesand enable it. [Hint: Do not panic if your site looks weird at first. Remember you can always login with
http://www.mywebsite.com/?q=user(yes, "user," not your ID.]
update.phpscript to your server. I don't know why they leave it out, other than they don't use it. You may need it later.