IT/Procedures/Website Moving

From msgwiki
< IT‎ | Procedures
Revision as of 11:02, 24 September 2021 by Walttheboss (talk | contribs)
Jump to navigation Jump to search

Moving a website from one server to another takes several steps which are listed here.

Zoneedit

Since the website will be moved from one server to another and these two servers do not have the same IP address, one has to change the IP address to which the domain name points to.

In Zoneedit this is done as follows:

  1. Go to Domains.
  2. Look for the websites domain in the list and click on 'dns'.
  3. Look for A Records and click 'edit'.
  4. Add the websites (sub)domain and/or point it to the IP address of the new server.
  5. Click 'next'.
  6. The changes will be shown. Click 'confirm'.
  7. Click done.

Database

In order for the website to run it needs its database. To move the database from the old server to the new one, use the following command on the old server (O:old server; N:new server):

mysqldump -v -uDBUSERO -pDBPASSWORDO DATABASENAMEO | ssh USERN@ADDRESSN mysql -uDBUSERN -pDBPASSWORDN DATABASENAMEN

Files

The files for the website have to be moved as well, which takes several steps. First of all, one has to create a new directory into which the files will be moved. This directory should normally be in /var/www/html/. To create this new directory use the command:

sudo mkdir FOLDERNAME

To avoid