Transfer a website

This article explains how move a website in another alwaysdata account. You need to have appropriate permissions on original et destination accounts to proceed the transfer.

To do it, we will use the SSH access rather than FTP which requires to locally repatriate the files to then transfer them to the destination account.
In our example, we consider following information:

  • Original account name: foo
  • Destination account name: bar
  • Original database name: foo_base
  • Destination database name: bar_base
  • The website is located in the ~/www/ directory.
  • We use SSH and databases default users. Those created at the account creation (for example, foo for the foo account and bar for the bar account).

Files copy

We use the scp command after log in SSH on the destination account.

bar@ssh:~$ scp -r* ~/www/

Database import

This stage is only required if your website is connected to a database.
Beforehand you need to have created the database on the destination account.

For MySQL:

bar@ssh:~$ mysqldump -u foo -p -h foo_base > foo_base.sql
bar@ssh:~$ mysql -h -u bar -p bar_base < foo_base.sql
bar@ssh:~$ rm foo_base.sql

For PostgreSQL:

bar@ssh:~$ pg_dump -U foo -W -h foo_base > foo_base.sql
bar@ssh:~$ psql -h -U bar -W -d bar_base < foo_base.sql
bar@ssh:~$ rm foo_base.sql

Previously modify the configuration file of the copied website to point on the newly imported database.

Addresses relocation

It only remains to move addresses that join the website and their autogenerated certificate.
Go on the Web > Sites section of the original account, choose the Transfer to another account action and follow steps.

Domain and mailboxes transfer

It is also possible to transfer the domain and its associated mailboxes. In order to, you have to use the Domain transfer fonction. Go on the Domains section of the original account, choose the Transfer to another account action and follow steps.

Only the account owner can initiate the transfer but, unlike the website transfer, it does not need permissions on the destination account. The destination profile will just need to accept it in the Transfers section and wait the mailboxes copy on its account. As this action depends on the mailboxes size it can take time.

Last updated: 23 Jan. 2019 at 16:12