Site migration: How to

  1. Create a new database on the server
  2. Take note of username and password
  3. Export local DB to .sql file
  4. Import .sgl file into new DB
  5. Create .zip file of everything in drupal
  6. Unzip to root folder on the server
  7. Edit setting.php like this:

Look for the DB string in settings.php, it will be in colour. All the other text is greyed out. It will look something like this:

$db_url = ‘mysql://username:password@localhost/databasename’;

Replace username and password
Depending on your server it could also be

$db_url = ‘mysqli: …

There is also the Backup and Migrate module doing it smartly.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.