Support >
  About cloud server >
  Data migration process for building a website using a cloud server
Data migration process for building a website using a cloud server
Time : 2026-04-20 14:32:57
Edit : Jtti

Website migration is a common task in operations and maintenance. Changing cloud servers, upgrading hosting configurations, or switching service providers all involve this hurdle. Data migration itself isn't complex, but a single oversight can lead to data loss, service interruption, or even a sharp drop in SEO rankings. Below is a sharing of the standard migration process.

Before officially starting, several preparatory tasks determine the success or failure of the migration.

Complete Backup and Verify Recoverability: This is the bottom line of the entire migration process. The backup must cover at least two parts: all website files (WordPress core, theme, uploaded images and attachments) and a complete exported database file (.sql format). Simply downloading the backup file is not enough; a recovery operation must be actually performed on another test server to confirm that the backup file is not corrupted and that no media files in the `/wp-content/uploads` directory are missing. If the backup is found to be unusable during the migration, all remedial measures will be too late.

Analyze Environment Dependencies and Align Configurations in Advance. A website's proper functioning relies on a complete environment: PHP version, MySQL version, Nginx or Apache, and installed PHP extensions (such as mysqli, curl, mbstring). Before migrating, be sure to record these key version numbers from the source server and pre-install the same or higher versions on the target server. Inconsistent environments are one of the most common reasons why a website becomes inaccessible after migration. Framework applications (such as Laravel and ThinkPHP) are particularly sensitive to version differences; even a minor version difference can result in a blank screen.

Collect all access credentials. During the migration process, you may need to log in to multiple backends. Prepare in advance: the website administrator account, the source server SSH or FTP account, database connection information (database name, username, password, host address), the domain DNS management backend, and console permissions for the CDN or WAF service.

File Transfer: Choosing the Right Tool Makes All the Difference

The efficiency of file transfer directly determines the migration time. Different data volumes require different tools.

For small to medium-sized websites under 50GB, the rsync command is the safest choice. It uses an incremental algorithm to transfer only the changed data blocks and supports resuming interrupted downloads—it can resume from the point of interruption after a network interruption without retransmitting the entire file. In actual testing, with only 15GB of incremental data in 1TB of data, rsync took only 2.5 hours, while scp took 12 hours. Common commands are as follows:

rsync -avz --progress /data/ root@targetIP:/backup/ --exclude='*.log'

This command synchronizes the entire website directory to the target server, excluding log files to reduce the transfer volume. If only a small number of files are being transferred, the scp command is more concise:

scp -r /path/to/local/files user@targetIP:/path/to/remote/

For extremely large data volumes exceeding 1TB, it is recommended to contact your service provider to mail the data via physical media, or use the service provider's dedicated migration channel to avoid public network bandwidth bottlenecks. Lightweight application server users can pay attention to the online migration function in the console; some service providers support one-click migration within the same platform.

Database Migration: Ensuring Data Consistency

The database is the heart of a website. During migration, it is recommended to use the mysqldump tool to export the SQL file:

mysqldump -h source_database_IP -u_username -p_database_name > backup.sql

To ensure that data is not written during the export, you can first execute `FLUSH TABLES WITH READ LOCK` to lock the tables during off-peak hours, and then export using the `--single-transaction` parameter. After transferring the generated SQL file to the target server, import it using the following command:

mysql -h target_database_IP -u_username -p target_database_name < backup.sql

Note that the character sets of the source and target databases should be consistent. If garbled characters appear after the migration, it is usually because the default character sets of the two sides are inconsistent. You can specify the encoding using the `--default-character-set=utf8mb4` parameter during export. In addition, ensure that the SQL file name does not contain sensitive strings such as "test", otherwise it may be blocked by the service provider's security policy.

DNS Switching and Final Verification

After the file and database migration is complete, the most critical cutover phase begins.

Reduce TTL to shorten the switchover window. 24 to 48 hours before planning to switch DNS, temporarily adjust the TTL value of the domain's A record from the default 600 seconds or longer to 300 seconds. This allows global recursive DNS servers to refresh the resolution record within as little as 5 minutes after the official switch, significantly shortening the coexistence window between the old and new servers.

Pre-test the new environment. Before modifying DNS, modify your local hosts file to point the domain to the new server's IP address and verify the following in your browser: Does the homepage load correctly? Is the login function available? Are images and attachments displayed completely? Are form submissions processed correctly? Only proceed with the DNS switch if all functions pass the test.

Continuously monitor after the switch. DNS changes are not instantaneous; users in some regions may still need several hours to access the new server. Monitor continuously for at least 24 hours after the switch, focusing on: whether the new server's access logs show a large number of 404 errors (indicating that old URLs were not redirected correctly), whether database connections are normal, and whether there are any indexing anomaly reports in Google Search Console.

Frequently Asked Questions and Precautions

Understanding these common pitfalls during the migration process can help you avoid unnecessary detours.

The website is inaccessible after migration. First, check if the Nginx or Apache service on the target server is running. Then, use the `netstat -tulnp` command to confirm if the web service port is listening correctly. Next, check if the `/etc/hosts` file contains a record pointing to the old server's internal IP address. Finally, don't forget to check if the firewall or security group rules allow ports 80 and 443.

Database connection failed. In WordPress's `wp-config.php` or Laravel's `.env` file, the database connection information still points to the old server. You must manually change it to the new database address, username, and password.

Rewrite rules not working. Users of the BT Panel need to pay special attention: the migration plugin does not automatically synchronize the Nginx rewrite configuration file. This file is located in the `/www/server/panel/vhost/rewrite/` directory and needs to be manually downloaded and uploaded to the corresponding location on the new server.

SSL certificate needs to be rebound. Even if the certificate file is migrated with the site, panels like BT Panel will not automatically associate it. After migration, you need to access the site's SSL settings interface, manually import the certificate file, and click "Deploy."

Leave room for SEO optimization. Before migrating, be sure to review all URL structures of the old site to ensure a one-to-one correspondence of 301 redirects between the old and new pages. After the migration is complete, submit the new sitemap to Google Search Console and Baidu Webmaster Tools, and verify both the old and new domains during the verification phase for future monitoring of indexing status.

Regarding costs. Website migration itself does not incur additional costs, but the target server will require a new purchase fee. For example, a basic 2-core, 2GB Jtti lightweight cloud server costs approximately $87 per year, which is sufficient to support a corporate website with tens of thousands of page views per day.

Pre-sales consultation
JTTI-Coco
JTTI-Defl
JTTI-Ellis
JTTI-Amano
JTTI-Eom
JTTI-Jean
JTTI-Selina
Technical Support
JTTI-Noc
Title
Email Address
Type
Sales Issues
Sales Issues
System Problems
After-sales problems
Complaints and Suggestions
Marketing Cooperation
Information
Code
Submit