Insights:Website Migration and Switching Hosts: Clarify These 6 Concepts First
Concept 1: DNS and Resolution
DNS determines which server a domain points to. Migration is essentially about changing a single DNS record.
- First confirm the DNS record type (A, CNAME, MX).
- Lower the record’s TTL in advance (e.g., 300 seconds) to shorten propagation time.
- Handle the email MX record separately from the website DNS record—don’t change them together.
Concept 2: ICP Filing and Qualifications
- Domestic servers require ICP filing; switching providers may involve updating the filing with the new provider.
- The filing entity must match the domain owner.
- A non-filed domain pointing to a domestic server will be blocked.
Before switching, confirm whether the new provider can take over the ICP filing.
Concept 3: Data and Files
Migration requires moving four types of content:
| Type | Content | Notes |
|---|---|---|
| Database | Table structure and data | Ensure matching character set and version |
| Program Files | Code, templates, configuration | Paths and permissions |
| Upload Resources | Images, attachments, certificates | Large volume — upload first, then cut over |
| Environment Configuration | Scheduled tasks, pseudo-static rules, SSL | Easy to overlook |
The items most easily missed are scheduled tasks and pseudo-static rules.
Concept 4: Environment Consistency
- Are the PHP / runtime version and extensions consistent?
- Are the database version and character set consistent?
- Are the time zone, encoding, and upload size limit consistent?
Version mismatches can cause 'the code hasn't changed but the page still throws an error'.
Concept 5: Window Switching
- Pick a low-traffic period (e.g., late night or weekend).
- Run through the core workflow completely on the new server first.
- After switching, immediately check the homepage, category pages, detail pages, and forms.
Concept 6: Rollback
- Keep the old server for at least 7 days.
- Retain old DNS records so you can switch back quickly.
- If database writes occur after the switch, assess potential data loss before rolling back.
A migration without a rollback plan is not migration—it’s gambling.
Standard Migration Sequence
- Back up the entire site (code + database + uploads).
- Set up the environment on the new server and import data.
- Verify core functionality using a test domain.
- Lower TTL, then transfer static assets.
- Switch DNS and monitor for 1–2 hours.
- Once confirmed error-free, decommission the old server and old DNS records.
Boundaries
Migration addresses “moving location,” not “changing architecture.” If you also want to change the tech stack, split it into two phases; otherwise issues become impossible to attribute.
Related reading: