Moving a site by hand: files by FTP and the database

Moving a site by hand is two copies and one connection: the files, the database, and the line of configuration that tells the application where the new database is. You do it with the old site still running, and change the DNS only at the end. If you would rather not do it yourself, see our migration page.

On the old side

1 Files. Download the site folder by FTP or SFTP, or compress it in the old panel and download a single file, which is usually much faster. Switch on the view of hidden files, or the .htaccess gets left behind. See day to day in FileZilla.
2 Database. Export it as SQL with the old site’s phpMyAdmin: exporting a database with phpMyAdmin. Export with the original’s character set, so question marks do not show up in the text: character sets and utf8mb4.
3 Write down what the site used: the PHP version, the extensions, the scheduled tasks, and the database connection details, which each application keeps in a configuration file (where each application keeps them).

On the new side

1 Set PHP as it was. In Select PHP Version, the same version and the same extensions for the site’s folder. See which PHP version to use.
2 Create the database and the user under MySQL Databases and give the user privileges on the database. The names carry the account name in front, so they are not the same as on the old side. See creating the user and the privileges.
3 Import the SQL. Through phpMyAdmin, if the file fits its limit (importing with phpMyAdmin and the size limit); if not, from the command line (importing a large database over SSH).
4 Upload the files to the domain’s folder and extract them, if you sent them compressed.
5 Edit the configuration file with the new database name, user and password. It is the step most often forgotten, and the site answers “Error establishing a database connection” until it is done.
6 Test before changing the DNS, in your computer’s hosts file: testing a migrated site before you change the DNS.
7 Change the DNS only when the test passes: pointing your domain to us. Keep the old site on until the new one answers everywhere (how long DNS changes take to propagate).

What travels and what stays behind

Item Does it come with the files and the database?
Pages, images, code Yes, with the files.
Texts, users, settings Yes, with the database.
E-mail accounts and messages No. See bringing your mailboxes from another provider.
DNS records No. Recreate them, or take the nameservers.
Scheduled tasks (cron) No. Create them again.
SSL certificate No. It is issued again once the domain points to the new account.
On the day of the move, freeze changes. If the old site keeps receiving orders, comments or sign-ups while you copy the database, whatever comes in after the export is lost. Do the move at a quiet hour, put the old site in maintenance, export the database a second time, import it, and only then change the DNS.
With WordPress, do not change the address with “find and replace” in a text editor. The database holds serialized data and that corrupts it. If the domain changes, see moving WordPress to a new domain.
Lower the TTL beforehand. A day or more before the move, reduce the TTL of the domain’s records (DNS records explained): the DNS change then takes effect sooner. There is more on moving without stopping the site in migrating a site without downtime.

Copied everything and the new site shows an error? Send us the text of the error and the domain.

Open a support ticket

SEE ALSO

Testing a migrated site before you change the DNS (the hosts file)

How to migrate a site without downtime

Moving your site to us: what comes across, and how long you are offline

Hosting migration

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from 5.940,00 Kz/mo (3-year plan, with coupon)

See plans
  • 0 Users Found This Useful
Was this answer helpful?