The old host keeps serving the site until the copy on Hostinger is proven to work. DNS moves last.
Calling the operations
- Read the
inputSchemathatsearchreturns before the first call of each operation. If a name below is rejected as unknown,searchfor what the step does (e.g. "import wordpress"). - Batch reads with
multi-execute. Batches chain operations from one server only — the Hostinger Connector runshosting,wordpress,agency-hosting,domainsanddnsas separate servers. - Imports and deploys overwrite the target website's contents; confirm the target before each one.
1. What is being moved
Establish, asking only for what cannot be inferred:
- Site type: WordPress, static, PHP (with or without MySQL), or Node.js.
- The export:
- WordPress — an archive of the whole WordPress root (including
wp-contentandwp-config.php) and a.sqldump. - PHP — a files archive, plus a
.sqldump when the app has a database. - Static — the files. Node.js — the source or its Git repository.
- Without one, the user exports it from the old host's panel, or over SSH:
tar -czf site.tar.gz -C /path/to/site .andmysqldump --single-transaction -u USER -p DBNAME > db.sql.
- WordPress — an archive of the whole WordPress root (including
- The exact home URL (
https, with or withoutwww) — WordPress keeps it in the database, so the new site must answer on the same one. - Current DNS, to preserve what already works:
dig +short NS DOMAIN; dig +short A DOMAIN; dig +short MX DOMAIN; dig +short TXT DOMAIN
- Cron jobs on the old host — they do not move with the files.
2. Create the website on the real domain
Create the Hostinger website on the domain being migrated, not on a free subdomain: step 4 tests it by pointing only this machine at Hostinger, so nothing changes for visitors yet.
- Shared and Cloud:
hosting_domains_verify-ownershipfirst. Whenis_accessibleis false, the user adds the returnedTXTrecord at their current DNS provider, next to the existing ones, and verification is repeated. Thenhosting_websites_createwithdomainandorder_id(fromhosting_orders_list), and pollhosting_websites_list-setupswithdomainevery 10–15 s untilstatus: completed. - Agency:
agency-hosting_website-setups_createwith thedomain,flavor: "php-fpm", asettings.php.versionmatching the old host (options inagency-hosting_php_list-versions-for-order) anddatacenter_codefromagency-hosting_datacenters_list. Pollagency-hosting_website-setups_statusuntilcompletedfor thewebsite_uid.
3. Import
hosting_import-wordpress-website, hosting_deploy-static-website and agency-hosting_deploy-php-application read files from this machine and exist only in the local hostinger-api-mcp server. On the hosted server (mcp.hostinger.com), upload the files first as described in the deploy-to-hosting skill ("Without the local deploy operations") and use the operation named in brackets below.
WordPress, Shared and Cloud: hosting_import-wordpress-website with domain, archivePath and databaseDump uploads both, extracts the files and imports the database; large sites take several minutes. [Upload site.zip and dump.sql, then wordpress_installations_import-website with archive_path and sql_path.] Then wordpress_installations_detect with username and poll wordpress_installations_list with domain until the install appears with is_valid: true.
Static, or PHP without a database: hosting_deploy-static-website [upload, then hosting_websites_deploy-static-site-archive]; Agency: agency-hosting_deploy-php-application [upload to .h5g/, then agency-hosting_files_import-website-from-archive].
PHP with a database, Shared and Cloud:
hosting_databases_createwith a strong generated password; read the full name, user andhostback fromhosting_databases_list.- Import the dump from this machine: allow only its public IP (
curl -s https://api.ipify.org) withhosting_databases_create-remote-connection, runmysql -h HOST -u USER -p NAME < db.sql, then remove the rule withhosting_databases_delete-remote-connection. Without a MySQL client, usehosting_databases_phpmyadmin-linkand import there. - Put the new name, user and password into the app's config file, with host
localhost, before archiving; then deploy as above. Never ship thesrvNNNN.hstgr.iohost inside the app.
Node.js: deploy with the deploy-to-hosting skill. When a dump must be imported, create the database with hosting_databases_create rather than hosting_databases_setup-website — the latter never reveals the password needed for the import — and pass the credentials through environment variables.
Agency: files with agency-hosting_deploy-php-application [or upload plus agency-hosting_files_import-website-from-archive]; the database with agency-hosting_databases_create-website, imported through phpMyAdmin in hPanel (no import operation exists). For WordPress, set the new credentials in wp-config.php before archiving.
4. Test before DNS moves
Find the server address: details.ipv4 for Agency; for Shared and Cloud, the A record for @ in the Hostinger zone (dns_records_list on the domain) or the IP hPanel shows for the website. Then point only this machine at it:
curl -sSk --resolve DOMAIN:443:IP -o /dev/null -w "%{http_code}\n" https://DOMAIN/
curl -sSk --resolve DOMAIN:443:IP https://DOMAIN/ | grep -o "TEXT FROM THE LIVE SITE"
curl -sSk --resolve DOMAIN:443:IP -o /dev/null -w "%{http_code}\n" https://DOMAIN/wp-login.php
-k is expected here: the certificate for the domain can only be issued after DNS moves. Check the home page, an inner page and, for WordPress, the login page. For a look in the browser, the user adds IP DOMAIN www.DOMAIN to their hosts file and removes it afterwards. Fix anything broken now, while visitors still see the old site.
5. Switch DNS and SSL
Follow the connect-domain skill from its DNS step: keep every MX and TXT record from step 1, then install SSL once the domain resolves to Hostinger. When the user controls the old DNS, lowering the TTL of the A records to 300 a day ahead shortens the switch.
6. After the switch
- Verify without
--resolve:curl -sSI https://DOMAIN/showsplatform: hostinger. - Recreate the old host's cron jobs with
hosting_cron-jobs_create(Agency:agency-hosting_cron-jobs_create-website). - Keep the old hosting running for a few days — some resolvers still cache the old address, and email hosted there must be moved separately.