Moving the second (part IV)

How to migrate a website called fredbloggs.com from a commercial host to your Synology Diskstation with no loss of uptime:

Before you start, you need:

  • a static IP address from your ISP
  • port forwarding configured on your router

You will also need:

  • a locally-saved backup of your current live database
  • a locally-saved backup of the current live content/files

 

Steps 1 – 4 are all Synology Diskstation tasks:

1. Control panel -> Web services -> Virtual host ->

  • subfolder name: (enter the website without the TLD suffix) fredbloggs
  • folder name: (enter the full address of the website) fredbloggs.com
  • click OK

 

2. Installed packages control panel -> DNS Server -> Zones -> Create Master Zone ->

  • Domain type: (select) Forward Zone
  • Domain name: (enter the full address of the website) fredbloggs.com
  • Master DNS server: (enter the static IP address)
  • click OK

 

3. Installed package control panel -> phpMyAdmin -> Databases ->

  • Create database fredbloggs / utf8_general_ci
  • go to database fredbloggs
  • Privileges -> New Add User ->
  • User name: fredbloggs
  • host: localhost
  • password: [whatever]
  • retype: [whatever]
  • Database for user: Grant all privileges on database “fredbloggs”
  • Global privileges: leave all unchecked
  • Resource limits: leave as default
  • Click Add User
  • Click Import
  • Click Choose file
  • Navigate to your locally-saved backup MySQL database
  • Click Open (the database will import)

 

4. Filestation -> navigate to your locally-saved copy of content/files

  • Copy all backed up, locally-saved content/files to the webfolder ‘fredbloggs’ in the Web directory of your NAS
  • (nb: you may need to change the DB Hostname in your config.php file, to point to ‘localhost’)

 

5. Log in to your Domain Registrar control panel -> Edit the zone file so the @ record points to your static IP address

6. Drink tea (it could take a few hours for the new server address to propagate around the internet, but while this is happening your website will not drop. nb: do not enter new content to the website until the change has been propagated)

 

Email accounts associated with that domain name are a kettle of different fish that I haven’t yet got my head around.

I’ll do that after more tea.

One thought on “Moving the second (part IV)

  1. When moving a site between servers, I like to make a minor change to the original *after* I’ve taken the backup that will be used to populate the new. Something like adding a full stop to a title of some sort. Then it’s dead easy to tell which server you’re seeing – and easier to ask others if they can see it.

Comments are closed.