Move your Drupal site to a different host or web server

Both hosts are standard LAMP servers.

Drupal version 6 is used for these steps

I am using Ronan's excellent module, Backup and Migrate found at http://drupal.org/project/backup_migrate

The terms folder and directory are the same
Change theme to Garland at admin/build/themes
Administer>> Site building>> Themes

Log in as the first user, user/1 the user who originally created the site and put your site in maintenance mode
Administer>> Site configuration>> Site maintenance

clear cache
Administer>> Site configuration>> Performance

Using FTP to download html files from your old site, These are the actual web pages

Use Backup and Migrate module to back up MySQL tables

Read http://drupal.org/requirements

Set up a MySQL database on new website
http://www.hostgator.com/tutorials.shtml#phpmyadmin

Download the same Drupal version from http://drupal.org

Set up FTP site for new site (you can use FileZilla for this)
http://dashaver.net/how-download-and-install-filezilla-ftp-software

Decompress and upload fresh new Drupal install to the new website (you can use 7-Zip for this)
http://dashaver.net/7-zip-great-free-utility

Upload and install Drupal on new site connect to the new database
Download default.settings.php from /public_html/sites/default and rename to
settings.php and upload to the same place leaving both old and new files there
Insure that php.ini contains these settings
register_globals="0"
memory_limit = 64M
http://drupal.org/node/207036

You can put these on a text file and upload as php.ini to the public_html directory
connect to MySQL database
http://drupal.org/node/333675

Finish installing Drupal by filling in site information

Create folders modules and themes inside the all folder at /public_html/sites/all

Download and install Backup and Migrate module be sure to use the same version as your website get your version at admin/reports/status For these directions I am using 7-Zip and downloading the tar.gz Backup and Migrate module from the Drupal site.

Extract files using 7-Zip First decompress the the downloaded file, this will create a folder, open this folder and decompress the file inside it. This will create an another folder, this is the backup_migrate module you need to upload.

Upload Backup and Migrate module to /public_html/sites/all/modules

Visit admin/build/modules and enable Backup and Migrate
Administer>> Site building>> Modules

Check size of allowed uploads in php.ini you may need to increase upload_max_filesize to restore your MySQL data if it has grown large
Increase upload size in your php.ini-> http://drupal.org/node/97193
upload_max_filesize = 10M
post_max_size = 10M
On shared hosting you should be able use this php.ini on VPS or private server you may need to use the entire default php.ini and add or edit these lines

Visit admin/content/backup_migrate and restore your save MySQL data, browse to your your MySQL back up you made in step one
Administer>> Content management>> Backup and Migrate

Upload html (your old website files) saved in step one using FTP

Download settings.php from public_html/sites/default
Find the following line
$db_url = 'mysql://username:password@localhost/databasename';
on the line with old site information
Put new path, password and username on settings.php and upload it back to the default folder
If you find Notepad will not work you may have to use Wordpad or an html editor to view and edit downloaded text files. Add new username, password and databasename localhost should remain the same
You may have to chmod file permissions to 755 using FTP before you can upload your changed settings.php

If you are unable to access update.php do the following:

Open settings.php with a text editor.

Find the line that says:
$update_free_access = FALSE;

Change it into:
$update_free_access = TRUE;

Once the upgrade is done, $update_free_access must be reverted to FALSE.

To chmod file permissions using FileZilla right click a file or folder on the server side and find permissions at the bottom of the menu.
After uploading your changed settings.php check that default directory and settings.php is not writable, chmod file permissions to 0444 for the entire default folder after you have made changes and uploaded the changed file, you use FTP to set file permissions, but you must insure settings.php is not publicly accessible either for reading or writing.

Run http://yourdomain.com/update.php

If you need to log in you can log in at http://yourdomain.com/user if you need to you can also log in to your cPanel and use PHP MyAdmin to change the password and username for user/1

http://drupal.org/node/776864
http://drupal.org/node/22281
http://support.hostgator.com/articles/hosting-guide/publish-your-site/ho...
http://drupal.org/node/46389

http://dashaver.net/how-download-and-install-drupal

Leave questions below as a comment

restoring your mysql

when restoring your mysql make sure everything is in the same state as the site that was backed up ie all of the same modules are enabled or disabled and whether or not is in maintenance mode, it should be

Reply to comment | D. A. Shaver Web Design

Good information. Lucky me I came across your site by
chance (stumbleupon). I have book-marked it for later!

This is a very well written article

Hello There. I found your blog using msn. This is a very well written article.
I'll be sure to bookmark iit and return to read more of your useful info.
Thanks for thee post. I'll certainly return.

bookmarked!!, I really like

bookmarked!!, I really like your site!

 

 

  • 10:37 PM 27 July 2014
  • dashaver.net