Migrating your local site to the web

You installed Drupal on your computer, made a website locally and added some content. Now you want to show it to the world.

In order to publicise a website, you need a provider. Make sure that this provider fulfills the technical requirements.

To upload files from your computer to the web, you need a FTP-client. I use FileZilla, a program that works pretty much like a Windows-Explorer: after logging into the website, you can drag and drop files from one window to another.

There are several ways to migrate your local site to the web, I use a technique that involves the backup and migrate-module (B&A). Make sure you have that module installed.

Preparation of the local site

  • Control that the version of Drupal you are running, is the latest 6.x-version. If not, you have to upgrade your installation first.
  • Log in as 1st-user
  • Make a backup of your database with B&A, and save it in the Manual Backup Directory
  • Delete most of the automatic backups that were made to save time during the upload of the files. Leave a couple inside the folder, you never know.
  • If using a custom or contributed theme, switch to a core theme, such as Garland
  • Disable all custom and contributed modules. Not the core-modules.

Preparation of the site on the web

Install Drupal on the web, like it's explained in the Installation of Drupal, until you reach the Welcome-screen. You have a Drupal-site on the web now, but it doesn't contain the themes and folders you added on your local site yet. We do that by migrating the directory 'sites'

Migration of the Drupal-folders

Copy the root-directory 'sites' from your local site over 'sites' on your website. When you're asked if you want to overwrite files, say 'no, only if the source is newer'.

In this way you avoid that the settings.php-file that you just installed in your directories on the web, and that contains the connection between files and database, is overwritten. The process can take time, depending of how many modules, pictures, etc. you need to upload.

Importing of the database

Enable the Backup an Migrate-module in your site on the web.

In the settings of Backup and Migrate, choose Restore and look for the file under the Manual Backup Directory.

Configuration of the site on the web

  • Enable custom and contributed modules
  • run update.php by visiting "http://www.my_website.com/update.php" (replace "www.my_website.com" with your website)
  • Enable the theme you want.

 Congratulations, you migrated your local site, and your website should be up and running now.

Share/Save