hostinger-api-mcp 2.4.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/audit-hosting/SKILL.md +83 -0
- package/skills/connect-domain/SKILL.md +69 -0
- package/skills/deploy-to-hosting/SKILL.md +115 -0
- package/skills/headless/references/DATABASE.md +1 -1
- package/skills/headless/references/DEPLOYMENT.md +2 -0
- package/skills/headless/references/SETUP.md +3 -2
- package/skills/maintain-wordpress/SKILL.md +74 -0
- package/skills/migrate-to-hosting/SKILL.md +80 -0
- package/skills/troubleshoot-website/SKILL.md +104 -0
- package/src/core/instructions.js +1 -1
- package/src/core/instructions.ts +1 -1
- package/src/core/skills.js +105 -9
- package/src/core/skills.ts +105 -9
- package/src/servers/agency-hosting.js +1 -1
- package/src/servers/agency-hosting.ts +1 -1
- package/src/servers/all.js +1 -1
- package/src/servers/all.ts +1 -1
- package/src/servers/billing.js +1 -1
- package/src/servers/billing.ts +1 -1
- package/src/servers/dns.js +1 -1
- package/src/servers/dns.ts +1 -1
- package/src/servers/domains.js +1 -1
- package/src/servers/domains.ts +1 -1
- package/src/servers/ecommerce.js +1 -1
- package/src/servers/ecommerce.ts +1 -1
- package/src/servers/horizons.js +1 -1
- package/src/servers/horizons.ts +1 -1
- package/src/servers/hosting.js +1 -1
- package/src/servers/hosting.ts +1 -1
- package/src/servers/mail.js +1 -1
- package/src/servers/mail.ts +1 -1
- package/src/servers/reach.js +1 -1
- package/src/servers/reach.ts +1 -1
- package/src/servers/vps.js +1 -1
- package/src/servers/vps.ts +1 -1
- package/src/servers/wordpress.js +1 -1
- package/src/servers/wordpress.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ Generated at release time from the diff between the previous and current
|
|
|
4
4
|
build. Tool changes are listed individually; everything else is summarised
|
|
5
5
|
by area.
|
|
6
6
|
|
|
7
|
+
## v2.5.1 — 2026-09-30
|
|
8
|
+
|
|
9
|
+
### Also in this release
|
|
10
|
+
|
|
11
|
+
- Bundled agent skills: 5 files
|
|
12
|
+
- Server instructions: `src/core/instructions.js`, `src/core/instructions.ts`
|
|
13
|
+
- Other files: `src/core/skills.js`, `src/core/skills.ts`
|
|
14
|
+
|
|
15
|
+
## v2.5.0 — 2026-09-30
|
|
16
|
+
|
|
17
|
+
### Also in this release
|
|
18
|
+
|
|
19
|
+
- Dependencies: `package-lock.json`
|
|
20
|
+
- Other files: `src/core/skills.js`, `src/core/skills.ts`
|
|
21
|
+
- Bundled agent skills: 6 files
|
|
22
|
+
|
|
7
23
|
## v2.4.0 — 2026-09-29
|
|
8
24
|
|
|
9
25
|
### Operations
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/hostinger/api-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.5.1",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@hostinger/mcp",
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.5.1",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-hosting
|
|
3
|
+
description: "Audit a Hostinger web hosting account (Shared, Cloud and Agency plans) and report what needs attention: every plan and website, SSL problems, broken or vulnerable WordPress installs, failed Node.js builds and vulnerable npm packages, databases and Agency Plan orders near their limits, and hosting plans about to lapse. Read-only; produces a prioritised to-do list and names the skill that fixes each item. Triggers: what do I have on Hostinger, audit my hosting, check all my websites, what needs attention, health check my sites, are any of my sites broken, which of my sites are insecure."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Audit hosting
|
|
7
|
+
|
|
8
|
+
Read-only from start to finish. The output is a report; every fix is a separate, confirmed step through another skill.
|
|
9
|
+
|
|
10
|
+
## Calling the operations
|
|
11
|
+
|
|
12
|
+
- Read the `inputSchema` that `search` returns before the first call of each operation. If a name below is rejected as unknown, `search` for what the step does (e.g. "ssl status").
|
|
13
|
+
- Batch reads with `multi-execute`, up to 20 steps a batch. Batches chain operations from one server only — the Hostinger Connector runs `hosting`, `wordpress`, `agency-hosting` and `billing` as separate servers. When a product group is switched off, skip its checks and say which were skipped.
|
|
14
|
+
- Page every list until `meta.total` is covered.
|
|
15
|
+
- Leave `hosting_php_get` out — it is large and says nothing about account health.
|
|
16
|
+
|
|
17
|
+
## 1. Inventory
|
|
18
|
+
|
|
19
|
+
One batch per server:
|
|
20
|
+
|
|
21
|
+
- `hosting_orders_list` with `statuses: ["active", "suspended"]`. `cloud_*` plan names are Cloud; the rest (`hostinger_premium_*`, `hostinger_business_*`, …) are Shared.
|
|
22
|
+
- `hosting_websites_list` — every Shared and Cloud website with `website_type`, `username`, `order_id` and `is_enabled` (false means suspended).
|
|
23
|
+
- `wordpress_installations_list` with `ownership: "all"` — `id`, `is_valid`, `validation_error`.
|
|
24
|
+
- `agency-hosting_orders_list` and `agency-hosting_websites_list-plan` — Agency orders and sites (`details.uid`, `details.type`, `details.domains`, `details.state`).
|
|
25
|
+
|
|
26
|
+
Tell the user the size (plans, websites, WordPress installs) before the checks. For large accounts offer to scope the audit to one order or domain.
|
|
27
|
+
|
|
28
|
+
## 2. Checks
|
|
29
|
+
|
|
30
|
+
Per Shared and Cloud website (skip `builder` and `horizons`):
|
|
31
|
+
|
|
32
|
+
- `hosting_ssl_status` — flag `failed` (with `last_error`), `expired`, `not_installed` on a custom domain, `is_https_redirect_enabled: false`, and `expires_at` within 30 days when `is_lifetime` is false. Lifetime certificates renew on their own.
|
|
33
|
+
- Node.js sites: `hosting_nodejs_list-builds` with `per_page: 1` (latest build failed?) and `hosting_nodejs_list-vulnerabilities` with `severities: ["critical", "high"]`.
|
|
34
|
+
|
|
35
|
+
Per hosting account (`username`): `hosting_databases_list` — flag `disk_usage_mb` above 80% of `max_size_mb`.
|
|
36
|
+
|
|
37
|
+
Per WordPress install: `wordpress_installations_show-core-version` (core vulnerabilities) and `wordpress_plugins_list-installed` (vulnerable plugins and pending updates).
|
|
38
|
+
|
|
39
|
+
Per Agency order: `agency-hosting_metrics_list-order-resource-usage` with `time_frame_hours: 168` and `agency-hosting_metrics_list-plan-order-disk-usage` with `time_frame_days: 7` — flag usage above 80% of the plan quota and name the heaviest websites.
|
|
40
|
+
|
|
41
|
+
Per Agency site: `agency-hosting_ssl_website-status` for each custom domain in `details.domains`; flag `details.state` other than `active`.
|
|
42
|
+
|
|
43
|
+
Plans about to lapse (billing product): `billing_subscriptions_list`, joined to hosting orders on `subscription_id` — flag `not_renewing`, or `is_auto_renewed: false` with `expires_at` within 30 days. Every site on that plan goes down with it.
|
|
44
|
+
|
|
45
|
+
From outside, for each custom domain:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
curl -sS -o /dev/null -w "%{http_code}\n" --max-time 15 https://DOMAIN/
|
|
49
|
+
curl -sSI --max-time 15 https://DOMAIN/ | grep -i "^platform"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
No `platform: hostinger` header means the domain does not reach this hosting.
|
|
53
|
+
|
|
54
|
+
## 3. Report
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
# Hosting audit
|
|
58
|
+
3 plans (2 Shared, 1 Cloud) + 1 Agency · 14 websites (6 WordPress, 3 Node.js, 5 other) · 4 Agency sites
|
|
59
|
+
|
|
60
|
+
## Fix now
|
|
61
|
+
- shop.example.com — latest Node.js build failed 2 days ago → troubleshoot-website
|
|
62
|
+
- blog.example.com — contact-form-x 5.2 has a known vulnerability, fixed in 5.3 → maintain-wordpress
|
|
63
|
+
|
|
64
|
+
## Soon
|
|
65
|
+
- example.org — Business plan expires in 12 days, auto-renew off → renew in hPanel
|
|
66
|
+
- Agency order 1000000001 — 86% of disk quota, mostly client-a.com
|
|
67
|
+
|
|
68
|
+
## Worth knowing
|
|
69
|
+
- 4 WordPress installs have pending plugin updates → maintain-wordpress
|
|
70
|
+
|
|
71
|
+
## Healthy
|
|
72
|
+
docs.example.com, portfolio.example.com, …
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
- **Fix now:** site down or not reaching Hostinger, failed latest build, invalid WordPress install, SSL `failed` or `expired`, critical vulnerabilities, suspended website.
|
|
76
|
+
- **Soon:** high vulnerabilities, a plan lapsing within 30 days, usage above 80% of a quota, HTTPS redirect off, non-lifetime certificates expiring.
|
|
77
|
+
- **Worth knowing:** pending updates, inactive plugins with vulnerabilities.
|
|
78
|
+
|
|
79
|
+
Each item names the evidence and the skill that fixes it: `troubleshoot-website`, `maintain-wordpress`, `connect-domain` or `deploy-to-hosting`. Patchable npm vulnerabilities on GitHub-deployed sites can be fixed with `hosting_nodejs_patch-vulnerabilities`, which opens a pull request — offer it, do not run it as part of the audit.
|
|
80
|
+
|
|
81
|
+
## Not available through the API
|
|
82
|
+
|
|
83
|
+
CPU and memory usage for Shared and Cloud plans, website backup status, and PHP error logs. Mention them once at the end so the user knows what the audit could not see.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: connect-domain
|
|
3
|
+
description: "Connect a custom domain to a website on Hostinger web hosting (Shared, Cloud or Agency plans) end to end: attach the domain to the site, point DNS at Hostinger without breaking existing email or verification records, install SSL, turn on the HTTPS redirect, and verify it resolves. Handles domains registered at Hostinger or elsewhere, moving a site off its free *.hostingersite.com subdomain, subdomains and aliases. Triggers: connect my domain, point my domain to my site, use my own domain, move off the free subdomain, add a subdomain, park a domain, add a domain alias, my domain is not working."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Connect a domain
|
|
7
|
+
|
|
8
|
+
Get a domain serving a Hostinger website over HTTPS. The one rule that matters most: records that already work — email (`MX`), SPF, DKIM and verification `TXT` records — must survive every DNS change.
|
|
9
|
+
|
|
10
|
+
## Calling the operations
|
|
11
|
+
|
|
12
|
+
- Read the `inputSchema` that `search` returns before the first call of each operation. If a name below is rejected as unknown, `search` for what the step does (e.g. "dns records").
|
|
13
|
+
- Batch reads with `multi-execute`; values pass between steps as `$steps.<i>.<path>`. Batches chain operations from one server only — the Hostinger Connector runs `hosting`, `agency-hosting`, `domains` and `dns` as separate servers. When `search` cannot find an operation, ask the user to enable that product group in the Connector.
|
|
14
|
+
- Every write here changes what the public sees. State the change and get a yes before each one.
|
|
15
|
+
|
|
16
|
+
## 1. Gather the facts (read-only)
|
|
17
|
+
|
|
18
|
+
- **Website.** `hosting_websites_list` with `domain` (Shared and Cloud; substring match, so take the exact entry) and `agency-hosting_websites_list-plan` with `domain` (Agency). Keep `username` and `order_id`, or `details.uid` and `details.ipv4`. When the domain has no website yet, find the site the user means — often a `*.hostingersite.com` one — or the order to create it on (`hosting_orders_list`, `agency-hosting_orders_list`).
|
|
19
|
+
- **Registration.** `domains_portfolio_get` succeeds only for domains registered at Hostinger; its `name_servers` show who runs DNS. Hostinger's own nameservers end in `dns-parking.com`.
|
|
20
|
+
- **Live DNS**, to know what must be kept:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
dig +short NS DOMAIN; dig +short A DOMAIN; dig +short CNAME www.DOMAIN
|
|
24
|
+
dig +short MX DOMAIN; dig +short TXT DOMAIN; dig +short CAA DOMAIN
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 2. Attach the domain to hosting
|
|
28
|
+
|
|
29
|
+
Shared and Cloud:
|
|
30
|
+
|
|
31
|
+
- **New website on the domain.** For a domain outside this account run `hosting_domains_verify-ownership` first. When `is_accessible` is false, give the user the `TXT` record it returns to add next to the existing ones, then verify again (propagation takes up to ~10 minutes). Create with `hosting_websites_create` (`domain` without `www.`, `order_id`), then poll `hosting_websites_list-setups` with `domain` every 10–15 s until `status: completed`.
|
|
32
|
+
- **Moving a site off its free subdomain.** Shared and Cloud websites cannot be renamed through the API. Either create a website on the real domain and redeploy the project there (the `deploy-to-hosting` skill) — required for WordPress, which keeps its URL in the database — or, for static sites, park the domain on the existing site with `hosting_domains_create-website-parked`.
|
|
33
|
+
- **Alias** (a second domain showing the same site): `hosting_domains_create-website-parked`.
|
|
34
|
+
- **Subdomain** (`shop.example.com`): `hosting_domains_create-website-subdomain`. `www` belongs to the main domain — do not create it as a subdomain.
|
|
35
|
+
|
|
36
|
+
Agency Plan:
|
|
37
|
+
|
|
38
|
+
- `agency-hosting_domains_link-to-website` adds a domain to the site.
|
|
39
|
+
- `agency-hosting_domains_change-website` replaces the primary domain, for example the free subdomain. The old name stops serving at once — confirm first.
|
|
40
|
+
|
|
41
|
+
## 3. Point DNS at Hostinger
|
|
42
|
+
|
|
43
|
+
**DNS already at Hostinger** (nameservers end in `dns-parking.com`): creating the website normally writes the records. Read the zone with `dns_records_list`; when `@` and `www` already point at the site, change nothing. Before any edit, note the newest `dns_snapshots_list` entry — `dns_snapshots_restore` rolls back to it.
|
|
44
|
+
|
|
45
|
+
`dns_records_update` defaults to `overwrite: true`, which deletes every existing record with the same name and type. Adding a `TXT` at `@` that way wipes SPF and verification records. Send `overwrite: false` when adding; use `true` only to replace one record set on purpose, and run `dns_records_validate` on the same payload first.
|
|
46
|
+
|
|
47
|
+
**DNS elsewhere** (registered at Hostinger with other nameservers, or registered elsewhere). Two options — let the user choose:
|
|
48
|
+
|
|
49
|
+
- **Switch nameservers to Hostinger.** Hostinger then manages every record. First copy each record the current DNS serves beyond the website — `MX`, `TXT`, service `CNAME`s — into the Hostinger zone with `dns_records_update` (`overwrite: false`); otherwise email breaks when the nameservers flip. Hostinger's nameserver pairs differ between domains (`ns1`/`ns2.dns-parking.com`, `solar`/`lunar.dns-parking.com` and others), so use the pair hPanel shows for this domain, never a guessed one. For Hostinger-registered domains apply it with `domains_portfolio_update-nameservers`; otherwise the user changes it at their registrar.
|
|
50
|
+
- **Keep the current DNS provider** and change only the web records: `A` for `@` and `CNAME` (or `A`) for `www`. Agency sites point at `details.ipv4`. Shared and Cloud sites point at the targets in the Hostinger zone for the domain (`dns_records_list`) or, when that zone does not exist, the IP hPanel shows for the website. The user makes this change at their DNS provider.
|
|
51
|
+
|
|
52
|
+
## 4. SSL and HTTPS
|
|
53
|
+
|
|
54
|
+
Start only once `dig` shows the domain resolving to Hostinger — the certificate authority checks the domain against the server.
|
|
55
|
+
|
|
56
|
+
- Shared and Cloud: `hosting_ssl_status`. When it is not `active`, call `hosting_ssl_install` and poll the status until `active` (or `failed` with `last_error`), then `hosting_ssl_toggle-https-redirect` with `is_enabled: true` (it returns 422 until a certificate exists).
|
|
57
|
+
- Agency: `agency-hosting_ssl_install-website` for each domain, then poll `agency-hosting_ssl_website-status`. A domain allows three setups per seven days and one request a minute — install once DNS is right and never loop.
|
|
58
|
+
- A `CAA` record at the apex that does not allow `letsencrypt.org` blocks issuance; the user adds `0 issue "letsencrypt.org"` beside the existing ones.
|
|
59
|
+
|
|
60
|
+
## 5. Verify
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
dig +short A DOMAIN; dig +short A www.DOMAIN
|
|
64
|
+
curl -sSI https://DOMAIN/ | grep -i -E "^(HTTP|platform|location)"
|
|
65
|
+
curl -sSI http://DOMAIN/ | grep -i -E "^(HTTP|location)"
|
|
66
|
+
dig +short MX DOMAIN
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Done when both names resolve to Hostinger, HTTPS answers with `platform: hostinger`, HTTP redirects to HTTPS, and `MX` still matches step 1. Nameserver changes can take up to 24–48 hours to reach every resolver; when records are still old, report what is pending and the command to re-check instead of polling for hours.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-to-hosting
|
|
3
|
+
description: "Deploy an existing project to a website on Hostinger web hosting (Shared, Cloud or Agency plans) and keep it deployed: picks the right deploy for static sites, Node.js apps (Next.js, Nuxt, Express, Vite and similar), PHP apps and WordPress plugins or themes, sets up auto-deploy from GitHub or GitLab, manages Node.js environment variables and MySQL databases, and verifies the live site. Triggers: deploy this project, deploy to Hostinger, push my app live, redeploy, set up auto-deploy, connect my GitHub repo, add environment variables, my app needs a database, deploy my WordPress plugin or theme."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deploy to hosting
|
|
7
|
+
|
|
8
|
+
Ship a project that already exists — on disk or in a Git repository — to a Hostinger website. Building a new site from a prompt (design, store, blog) is the `hostinger-headless` skill; this one takes code as it is.
|
|
9
|
+
|
|
10
|
+
## Calling the operations
|
|
11
|
+
|
|
12
|
+
- Read the `inputSchema` that `search` returns before the first call of each operation. If a name below is rejected as unknown, `search` for what the step does (e.g. "deploy static").
|
|
13
|
+
- Batch reads with `multi-execute`; values pass between steps as `$steps.<i>.<path>`. Batches chain operations from one server only — the Hostinger Connector runs `hosting`, `wordpress` and `agency-hosting` as separate servers.
|
|
14
|
+
- Every deploy overwrites the website's current contents. Confirm the target domain with the user before the first deploy to a site that already has content.
|
|
15
|
+
|
|
16
|
+
## 1. Pick the target website
|
|
17
|
+
|
|
18
|
+
- `.hostinger/site.json` in the project: reuse its `domain` and `username` (or `website_uid`).
|
|
19
|
+
- Otherwise look the domain up with `hosting_websites_list` (Shared and Cloud; substring match — take the exact entry) and `agency-hosting_websites_list-plan` (Agency; keep `details.uid`).
|
|
20
|
+
- No website yet:
|
|
21
|
+
- Shared and Cloud: take a domain (the user's own, or `hosting_domains_generate-free-subdomain`) and an `order_id` from `hosting_orders_list`, then `hosting_websites_create`. `datacenter_code` is needed only for the first website on a new plan (first entry of `hosting_datacenters_list`). Poll `hosting_websites_list-setups` with `domain` every 10–15 s until `status: completed` — uploads and deploys return 404 or 409 before that.
|
|
22
|
+
- Agency: `agency-hosting_website-setups_create` with `flavor: "php-fpm"` (plus `type: "node-static"` for built frontends), `settings.php.version` from `agency-hosting_php_list-versions-for-order` and `datacenter_code` from `agency-hosting_datacenters_list`. Poll `agency-hosting_website-setups_status` until `completed`; it returns the `website_uid`.
|
|
23
|
+
- Node.js apps run on Business and Cloud plans (`hostinger_business_*`, `cloud_*` in `hosting_orders_list`). On other plans, build locally and deploy the output as a static site.
|
|
24
|
+
|
|
25
|
+
## 2. Choose the deploy
|
|
26
|
+
|
|
27
|
+
Wrong method is the most common failure. Decide from the project on disk:
|
|
28
|
+
|
|
29
|
+
| Project | Shared / Cloud |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Plain HTML/CSS/JS, or a framework's static build output | `hosting_deploy-static-website` |
|
|
32
|
+
| `package.json` with a build or a server (Next.js, Nuxt, Express, Vite…) | `hosting_deploy-js-application` |
|
|
33
|
+
| PHP code, no build step | `hosting_deploy-static-website` (extracts the archive as-is) |
|
|
34
|
+
| WordPress plugin or theme folder | `hosting_deploy-wordpress-plugin` / `hosting_deploy-wordpress-theme` (`activate` optional) |
|
|
35
|
+
| A whole WordPress site from elsewhere | the `migrate-to-hosting` skill |
|
|
36
|
+
|
|
37
|
+
On Agency the website's type decides (`agency-hosting_websites_get`): sites created as `node-static` take `agency-hosting_deploy-node-static-website`, which runs the build when the project has one; every other site takes `agency-hosting_deploy-php-application`, which extracts the archive as-is. WordPress plugins and themes on Agency sites are installed from wp-admin.
|
|
38
|
+
|
|
39
|
+
Archive rules (name archives `name_YYYYMMDD_HHMMSS.zip`):
|
|
40
|
+
|
|
41
|
+
- **Static:** build locally first. `index.html` must be at the archive root, not inside a folder: `cd dist && zip -r ../site_20260101_120000.zip .`
|
|
42
|
+
- **Node.js source:** no `node_modules/`, no build output (`dist/`, `.next/`, `build/`), no `.env*`, nothing matched by `.gitignore`; 50 MB at most. `git archive --format=zip -o app_20260101_120000.zip HEAD` produces exactly the committed files — mention that uncommitted changes are left out.
|
|
43
|
+
- Agency deploys are synchronous: the site is live when the call returns.
|
|
44
|
+
|
|
45
|
+
The operations in the table read the archive from this machine, so only the local `hostinger-api-mcp` server has them. On the hosted server (`mcp.hostinger.com`) `search` does not find them — upload the files yourself as below.
|
|
46
|
+
|
|
47
|
+
### Without the local deploy operations
|
|
48
|
+
|
|
49
|
+
1. Get upload credentials: `hosting_files_generate-upload-url` (`username`, `domain`); Agency: `agency-hosting_files_generate-upload-url` (`website_uid`). Both return `url`, `auth_key` and `rest_auth_key`, which authenticate the upload instead of the API token.
|
|
50
|
+
2. Upload each file with TUS, where `DEST` is its path in the website's storage:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
SIZE=$(wc -c < "$FILE" | tr -d ' ')
|
|
54
|
+
curl -sS -X POST "$URL/$DEST?override=true" -H "X-Auth: $AUTH_KEY" -H "X-Auth-Rest: $REST_AUTH_KEY" -H "Tus-Resumable: 1.0.0" -H "Upload-Length: $SIZE" -H "Upload-Offset: 0"
|
|
55
|
+
curl -sS -X PATCH "$URL/$DEST?override=true" -H "X-Auth: $AUTH_KEY" -H "X-Auth-Rest: $REST_AUTH_KEY" -H "Tus-Resumable: 1.0.0" -H "Content-Type: application/offset+octet-stream" -H "Upload-Offset: 0" --data-binary "@$FILE"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The first call returns `201`, the second `204` with an `Upload-Offset` header equal to the file size. `override=true` makes a retry safe.
|
|
59
|
+
3. Deploy from the uploaded files (`RANDOM8` is any fresh 8-character string, e.g. `$(LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom | head -c 8)`):
|
|
60
|
+
|
|
61
|
+
| Project | `DEST` | Then |
|
|
62
|
+
| --- | --- | --- |
|
|
63
|
+
| Static or PHP | `site.zip` | `hosting_websites_deploy-static-site-archive` with `archive_path: "site.zip"` |
|
|
64
|
+
| Node.js | `app.zip` | `hosting_nodejs_build-settings-from-archive` with `archive_path: "app.zip"`, then `hosting_nodejs_start-build` with those settings, `source_type: "archive"` and `source_options.archive_path: "app.zip"` |
|
|
65
|
+
| WordPress plugin | every file, as `wp-content/plugins/SLUG-RANDOM8/<path in the plugin>` | `wordpress_plugins_deploy` with `slug` and `plugin_path: "SLUG-RANDOM8"` |
|
|
66
|
+
| WordPress theme | every file, as `wp-content/themes/SLUG-RANDOM8/<path in the theme>` | `wordpress_themes_deploy` with `slug`, `theme_path: "SLUG-RANDOM8"` and optional `is_activated` |
|
|
67
|
+
| Agency, extracted as-is | `.h5g/site.zip` | `agency-hosting_files_import-website-from-archive` with `archive_name: "site.zip"` |
|
|
68
|
+
| Agency `node-static` | `.h5g/RANDOM8/app.zip` | `agency-hosting_websites_build-nodejs-assets` with `archive_path: ".h5g/RANDOM8"` — the directory, not the file |
|
|
69
|
+
|
|
70
|
+
## 3. Node.js builds
|
|
71
|
+
|
|
72
|
+
`hosting_deploy-js-application` uploads the archive to the document root, detects settings from `package.json` and starts a build. Track it with `hosting_nodejs_list-builds` and `hosting_nodejs_build` (by `uuid`), polling every 10–20 s — builds take minutes.
|
|
73
|
+
|
|
74
|
+
- Failed build: `hosting_nodejs_analyse-failed-build` once per build (5 calls a minute), then `hosting_nodejs_build-logs` if the analysis is empty.
|
|
75
|
+
- Wrong detection (framework, `output_directory`, or a missing `entry_file` for express, fastify, nest, nuxt and hono): run `hosting_nodejs_start-build` with explicit values, `source_type: "archive"` and `source_options.archive_path` set to the archive's file name in the document root (check it is there with `hosting_files_list-website-and-directories`). Store the same values with `hosting_nodejs_update-build-settings`.
|
|
76
|
+
- To review detected settings before any build: upload the archive with `hosting_files_generate-upload-url` (the TUS steps are in its description), then `hosting_nodejs_build-settings-from-archive`.
|
|
77
|
+
|
|
78
|
+
## 4. Auto-deploy from Git
|
|
79
|
+
|
|
80
|
+
1. `hosting_git_list-installations`. With no `active` installation (check `status: "pending"` and `"suspended"` too), the user connects GitHub or GitLab once in hPanel under Websites → Manage → Advanced → Git; there is no API for that step.
|
|
81
|
+
2. `hosting_git_list-installation-repositories` with the installation `uuid` gives `owner`, `name` and `default_branch` (10 calls a minute).
|
|
82
|
+
3. `hosting_git_update-auto-deployment-settings` with `installation_uuid`, `owner`, `repository`, `branch` and optional `directory`.
|
|
83
|
+
- PHP and static sites deploy the branch immediately and again on every push.
|
|
84
|
+
- Node.js sites clone nothing on save: start the first build with `hosting_nodejs_start-build`, `source_type: "git"` and the same `source_options`. Later pushes build with the stored settings, so keep `hosting_nodejs_update-build-settings` correct.
|
|
85
|
+
4. Confirm with `hosting_git_auto-deployment-settings`.
|
|
86
|
+
|
|
87
|
+
Agency Plan sites have no Git operations; deploy archives.
|
|
88
|
+
|
|
89
|
+
## 5. Environment variables (Node.js)
|
|
90
|
+
|
|
91
|
+
`hosting_nodejs_replace-environment-variables` replaces the whole set — anything not sent is deleted.
|
|
92
|
+
|
|
93
|
+
1. `hosting_nodejs_list-environment-variables` for the current keys. Values come back as `********`; never send those back.
|
|
94
|
+
2. Build the full set: every current key plus the new ones, with real values from the project's `.env` or the user. When the real value of an existing key is unknown, ask — do not drop it.
|
|
95
|
+
3. Send it once; the app restarts. Values baked in at build time (Next.js `NEXT_PUBLIC_*`, Vite `VITE_*`) need a new `hosting_nodejs_start-build`.
|
|
96
|
+
|
|
97
|
+
Keys use uppercase letters, digits and underscores. Never commit `.env` files or repeat secret values back to the user.
|
|
98
|
+
|
|
99
|
+
## 6. Database
|
|
100
|
+
|
|
101
|
+
- **Node.js:** `hosting_databases_setup-website` creates a MySQL database and writes `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER`, `DB_PASSWORD` and `DATABASE_URL` into the environment, then restarts the app. The password is generated and never returned. It fails with 422 when any of those keys exists — remove them first with the step 5 replace.
|
|
102
|
+
- **PHP:** `hosting_databases_create` with `name`, `user`, a strong generated `password` and `website_domain`; read the prefixed full name back from `hosting_databases_list`. The app reads credentials from a config file on the server that stays out of Git, and connects to `localhost` or `127.0.0.1`.
|
|
103
|
+
- **Agency:** `agency-hosting_databases_create-website`; the app connects to `localhost`.
|
|
104
|
+
- The `srvNNNN.hstgr.io` host from `hosting_databases_list` is only for connections from outside Hostinger — never put it in the deployed app.
|
|
105
|
+
|
|
106
|
+
## 7. Verify and record
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
curl -s -o /dev/null -w "%{http_code}\n" https://DOMAIN/
|
|
110
|
+
curl -s https://DOMAIN/ | grep -o "TEXT THE PROJECT RENDERS"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
A `200` alone can be a placeholder page; match real copy. A new site may serve a default page briefly — clear it with `hosting_cache_clear-website` and retry before calling the deploy failed.
|
|
114
|
+
|
|
115
|
+
Write `.hostinger/site.json` in the project so later runs reuse the target: `{ "domain", "username" or "website_uid", "type": "static" | "nodejs" | "php" }`, keeping any fields already there.
|
|
@@ -28,7 +28,7 @@ Do not put the remote `host` into the deployed app — it has no grant for conne
|
|
|
28
28
|
|
|
29
29
|
| You called | Poll this until | Typical wait |
|
|
30
30
|
| --- | --- | --- |
|
|
31
|
-
| `hosting_websites_create` | `hosting_websites_list`
|
|
31
|
+
| `hosting_websites_create` | `hosting_websites_list-setups` with the domain reports `status: completed` | up to a few minutes |
|
|
32
32
|
| `hosting_deploy-js-application` | `hosting_list-js-deployments` shows the build finished | minutes |
|
|
33
33
|
| `hosting_nodejs_start-build` | `hosting_nodejs_build` state is `completed` or `failed` | minutes |
|
|
34
34
|
| `wordpress_installations_install`, plugin/theme/core jobs | `wordpress_installations_list` lists the install | 1–2 minutes |
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Match the deploy method to what the project actually is — this is the single most common failure point.
|
|
4
4
|
|
|
5
|
+
The deploy operations below read the archive from this machine, so only the local `hostinger-api-mcp` server has them. On the hosted server (`mcp.hostinger.com`) `search` does not find them: upload the files and deploy from the upload as described in the `deploy-to-hosting` skill ("Without the local deploy operations"). Agency Plan sites deploy through the Agency operations listed there as well.
|
|
6
|
+
|
|
5
7
|
## Static site → `hosting_deploy-static-website`
|
|
6
8
|
|
|
7
9
|
For pre-built files only: plain HTML/CSS/JS, or the **build output** of a framework (run the build locally first).
|
|
@@ -8,7 +8,8 @@ A website can only be created on an active hosting plan.
|
|
|
8
8
|
|
|
9
9
|
1. `hosting_websites_list` — if it returns websites, the account has a working plan; note any existing `order_id` and `username` for step 2.
|
|
10
10
|
2. Otherwise `hosting_orders_list` — look for an order in a usable state. A fresh order that has never hosted a website still works; note its `order_id`.
|
|
11
|
-
3.
|
|
11
|
+
3. Agency Plan orders are not in that list: check `agency-hosting_orders_list` too. An active Agency order is a usable plan — create the website with `agency-hosting_website-setups_create` and poll `agency-hosting_website-setups_status` until `completed` (it returns the `website_uid`), then deploy with the Agency operations in the `deploy-to-hosting` skill.
|
|
12
|
+
4. If there is no usable order: **stop and tell the user** that an active Hostinger hosting plan is required to deploy, link https://www.hostinger.com/web-hosting, and offer to continue building the site locally in the meantime. When they confirm the purchase, re-run this check.
|
|
12
13
|
|
|
13
14
|
Never purchase a plan, domain, or any paid item without the user explicitly approving that specific purchase.
|
|
14
15
|
|
|
@@ -23,7 +24,7 @@ Never purchase a plan, domain, or any paid item without the user explicitly appr
|
|
|
23
24
|
Generating a subdomain does **not** create a website — deploying straight to it fails with `No website found for domain`. The working sequence:
|
|
24
25
|
|
|
25
26
|
1. `hosting_websites_create { domain, order_id }` — `datacenter_code` is required only for the first website on a brand-new plan (pick the first entry from `hosting_datacenters_list`).
|
|
26
|
-
2. **Poll** `hosting_websites_list` filtered by the domain until
|
|
27
|
+
2. **Poll** `hosting_websites_list-setups` filtered by the domain every 10–15 s until `status` is `completed`. The site shows up in `hosting_websites_list` before its setup finishes, and uploads, deploys and database calls return 404 or 409 until then. Creation takes up to a few minutes — don't fail fast.
|
|
27
28
|
3. Note the site's `username` — deployment and database operations are keyed on it.
|
|
28
29
|
|
|
29
30
|
If the domain already has a website (an `iterate` run, or the user pointed at an existing site), skip creation entirely.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maintain-wordpress
|
|
3
|
+
description: "Keep WordPress sites on Hostinger web hosting updated and secure: checks core, plugin and theme versions, known vulnerabilities and install health on one site or every site in the account, reports what needs doing, applies updates in a safe order, and confirms each site still loads. Also covers cache purges, the Memcached object cache, maintenance mode and one-click wp-admin login links. Triggers: update my WordPress, update plugins, are my WordPress sites secure, WordPress vulnerabilities, outdated plugins or themes, WordPress maintenance, speed up WordPress, log me into wp-admin."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Maintain WordPress
|
|
7
|
+
|
|
8
|
+
Check first, report, then update only what the user approves — one site at a time, proving each still loads before moving to the next.
|
|
9
|
+
|
|
10
|
+
## Calling the operations
|
|
11
|
+
|
|
12
|
+
- Read the `inputSchema` that `search` returns before the first call of each operation. If a name below is rejected as unknown, `search` for what the step does (e.g. "wordpress plugins update").
|
|
13
|
+
- Batch reads with `multi-execute` (up to 20 steps a batch). Batches chain operations from one server only — the Hostinger Connector runs `wordpress`, `hosting` and `agency-hosting` as separate servers.
|
|
14
|
+
- Updates, activations, uninstalls and core changes are queued jobs: a success response means "queued". Poll the matching read operation every 10–20 s until the change shows; never re-send the write.
|
|
15
|
+
|
|
16
|
+
## 1. Find the installs
|
|
17
|
+
|
|
18
|
+
- One site: `wordpress_installations_list` with `domain` (substring match — take the exact entry). Every site: `wordpress_installations_list` without filters, adding `ownership: "all"` to include sites the user manages for others.
|
|
19
|
+
- Keep `id` (the `software` parameter of every `wordpress_*` call), `username`, `domain`, `directory`, `is_valid` and `validation_error`.
|
|
20
|
+
- Agency Plan WordPress sites come from `agency-hosting_websites_list-plan` with `website_types: ["wordpress"]`. When `wordpress_installations_list` does not include them, only `agency-hosting_wordpress_settings` and core version changes (`agency-hosting_wordpress_list-versions`, `agency-hosting_wordpress_change-version`) are available; plugins and themes are updated from wp-admin.
|
|
21
|
+
|
|
22
|
+
## 2. Check (read-only)
|
|
23
|
+
|
|
24
|
+
Per install:
|
|
25
|
+
|
|
26
|
+
- `wordpress_installations_show-core-version` — core version and the known vulnerabilities that affect it.
|
|
27
|
+
- `wordpress_installations_list-core-updates` — available core versions.
|
|
28
|
+
- `wordpress_plugins_list-installed` — `status`, `update` (the newer version, when there is one) and `vulnerabilities[]` with `fixed_in`.
|
|
29
|
+
- `wordpress_themes_list-installed` — the same for themes.
|
|
30
|
+
|
|
31
|
+
Four steps per install fit five installs in one batch. For an install with `is_valid: false`, run `wordpress_installations_check-if-are-valid` with `force: true` for a fresh reason and leave it out of updates — a broken install is the `troubleshoot-website` skill's job.
|
|
32
|
+
|
|
33
|
+
## 3. Report before changing anything
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
## example.com (WordPress 6.8.1)
|
|
37
|
+
Vulnerable: contact-form-x 5.2 → fixed in 5.3 (update available)
|
|
38
|
+
Vulnerable, inactive: old-slider 1.0 — no fix; uninstall recommended
|
|
39
|
+
Updates: core 6.8.1 → 6.8.3 (minor), 4 plugins, 1 theme
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Vulnerable items come first. A vulnerable plugin without a fix, or an inactive one, is better removed with `wordpress_plugins_uninstall` than left installed — inactive code on disk can still be reached. Ask which updates to apply.
|
|
43
|
+
|
|
44
|
+
## 4. Back up first
|
|
45
|
+
|
|
46
|
+
The API has no backup operation. Before updating, ask the user to create a backup in hPanel or confirm the latest automatic one is recent enough. Say it plainly; the user may choose to go ahead without one.
|
|
47
|
+
|
|
48
|
+
## 5. Update, one site at a time
|
|
49
|
+
|
|
50
|
+
1. Plugins that fix a vulnerability — `wordpress_plugins_update` with their slugs.
|
|
51
|
+
2. The remaining approved plugins, then themes with `wordpress_themes_update`.
|
|
52
|
+
3. Core with `wordpress_installations_update-core`: `minor: true` for patch releases; a major `version` only when the user asks for it.
|
|
53
|
+
|
|
54
|
+
For a busy site the user may want `wordpress_maintenance_toggle` with `enabled: true` during the run — and it is always turned off again afterwards, even when something failed.
|
|
55
|
+
|
|
56
|
+
After each site:
|
|
57
|
+
|
|
58
|
+
1. `wordpress_litespeed-cache_purge-lite-speed`.
|
|
59
|
+
2. `curl -s -o /dev/null -w "%{http_code}\n" https://DOMAIN/` and the same for `https://DOMAIN/wp-login.php` — both should be `200` with no PHP error in the body.
|
|
60
|
+
3. `wordpress_installations_check-if-are-valid` with `force: true`.
|
|
61
|
+
|
|
62
|
+
When a site breaks: stop the run, deactivate the plugin updated last with `wordpress_plugins_deactivate`, check again, and report which update caused it before touching any other site.
|
|
63
|
+
|
|
64
|
+
## 6. Performance and access
|
|
65
|
+
|
|
66
|
+
- Page cache: `wordpress_litespeed-cache_show-lite-speed-status`; purge after design or content changes.
|
|
67
|
+
- Object cache: `wordpress_object-cache_show-memcached-status`, then `wordpress_object-cache_toggle-memcached` with `enabled: true` — the usual quick speed-up.
|
|
68
|
+
- PHP version: `hosting_php_get` is large (around 25 KB), so read it only when the user asks about PHP. PHP 8.x is markedly faster than 7.x; confirm plugin compatibility before `hosting_php_update-version`.
|
|
69
|
+
- wp-admin: `wordpress_login_create-links` returns temporary one-click login links. Give them to the user only; never store or reuse them.
|
|
70
|
+
- Hostinger's own plugins update with `wordpress_plugins_update-hostinger` (`slug`).
|
|
71
|
+
|
|
72
|
+
## Many sites
|
|
73
|
+
|
|
74
|
+
Tell the user how many installs there are before starting. Check in batches, keep one running report, and update site by site so a failure stops the run with the rest untouched.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate-to-hosting
|
|
3
|
+
description: "Move an existing website from another host to Hostinger web hosting (Shared, Cloud or Agency plans) without downtime: WordPress sites from a files archive and SQL dump, static and PHP sites from an archive, Node.js apps from source. Creates the website on the real domain, imports files and database, tests the copy before any DNS change, then switches the domain and SSL. Triggers: migrate my site to Hostinger, move my website from another host, transfer my WordPress site, import my website, switch hosting to Hostinger."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Migrate to hosting
|
|
7
|
+
|
|
8
|
+
The old host keeps serving the site until the copy on Hostinger is proven to work. DNS moves last.
|
|
9
|
+
|
|
10
|
+
## Calling the operations
|
|
11
|
+
|
|
12
|
+
- Read the `inputSchema` that `search` returns before the first call of each operation. If a name below is rejected as unknown, `search` for what the step does (e.g. "import wordpress").
|
|
13
|
+
- Batch reads with `multi-execute`. Batches chain operations from one server only — the Hostinger Connector runs `hosting`, `wordpress`, `agency-hosting`, `domains` and `dns` as separate servers.
|
|
14
|
+
- Imports and deploys overwrite the target website's contents; confirm the target before each one.
|
|
15
|
+
|
|
16
|
+
## 1. What is being moved
|
|
17
|
+
|
|
18
|
+
Establish, asking only for what cannot be inferred:
|
|
19
|
+
|
|
20
|
+
- **Site type:** WordPress, static, PHP (with or without MySQL), or Node.js.
|
|
21
|
+
- **The export:**
|
|
22
|
+
- WordPress — an archive of the whole WordPress root (including `wp-content` and `wp-config.php`) and a `.sql` dump.
|
|
23
|
+
- PHP — a files archive, plus a `.sql` dump when the app has a database.
|
|
24
|
+
- Static — the files. Node.js — the source or its Git repository.
|
|
25
|
+
- Without one, the user exports it from the old host's panel, or over SSH: `tar -czf site.tar.gz -C /path/to/site .` and `mysqldump --single-transaction -u USER -p DBNAME > db.sql`.
|
|
26
|
+
- **The exact home URL** (`https`, with or without `www`) — WordPress keeps it in the database, so the new site must answer on the same one.
|
|
27
|
+
- **Current DNS**, to preserve what already works:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
dig +short NS DOMAIN; dig +short A DOMAIN; dig +short MX DOMAIN; dig +short TXT DOMAIN
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- **Cron jobs** on the old host — they do not move with the files.
|
|
34
|
+
|
|
35
|
+
## 2. Create the website on the real domain
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
- Shared and Cloud: `hosting_domains_verify-ownership` first. When `is_accessible` is false, the user adds the returned `TXT` record at their current DNS provider, next to the existing ones, and verification is repeated. Then `hosting_websites_create` with `domain` and `order_id` (from `hosting_orders_list`), and poll `hosting_websites_list-setups` with `domain` every 10–15 s until `status: completed`.
|
|
40
|
+
- Agency: `agency-hosting_website-setups_create` with the `domain`, `flavor: "php-fpm"`, a `settings.php.version` matching the old host (options in `agency-hosting_php_list-versions-for-order`) and `datacenter_code` from `agency-hosting_datacenters_list`. Poll `agency-hosting_website-setups_status` until `completed` for the `website_uid`.
|
|
41
|
+
|
|
42
|
+
## 3. Import
|
|
43
|
+
|
|
44
|
+
`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.
|
|
45
|
+
|
|
46
|
+
**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`.
|
|
47
|
+
|
|
48
|
+
**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`].
|
|
49
|
+
|
|
50
|
+
**PHP with a database, Shared and Cloud:**
|
|
51
|
+
|
|
52
|
+
1. `hosting_databases_create` with a strong generated password; read the full name, user and `host` back from `hosting_databases_list`.
|
|
53
|
+
2. Import the dump from this machine: allow only its public IP (`curl -s https://api.ipify.org`) with `hosting_databases_create-remote-connection`, run `mysql -h HOST -u USER -p NAME < db.sql`, then remove the rule with `hosting_databases_delete-remote-connection`. Without a MySQL client, use `hosting_databases_phpmyadmin-link` and import there.
|
|
54
|
+
3. Put the new name, user and password into the app's config file, with host `localhost`, before archiving; then deploy as above. Never ship the `srvNNNN.hstgr.io` host inside the app.
|
|
55
|
+
|
|
56
|
+
**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.
|
|
57
|
+
|
|
58
|
+
**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.
|
|
59
|
+
|
|
60
|
+
## 4. Test before DNS moves
|
|
61
|
+
|
|
62
|
+
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:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
curl -sSk --resolve DOMAIN:443:IP -o /dev/null -w "%{http_code}\n" https://DOMAIN/
|
|
66
|
+
curl -sSk --resolve DOMAIN:443:IP https://DOMAIN/ | grep -o "TEXT FROM THE LIVE SITE"
|
|
67
|
+
curl -sSk --resolve DOMAIN:443:IP -o /dev/null -w "%{http_code}\n" https://DOMAIN/wp-login.php
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`-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.
|
|
71
|
+
|
|
72
|
+
## 5. Switch DNS and SSL
|
|
73
|
+
|
|
74
|
+
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.
|
|
75
|
+
|
|
76
|
+
## 6. After the switch
|
|
77
|
+
|
|
78
|
+
- Verify without `--resolve`: `curl -sSI https://DOMAIN/` shows `platform: hostinger`.
|
|
79
|
+
- Recreate the old host's cron jobs with `hosting_cron-jobs_create` (Agency: `agency-hosting_cron-jobs_create-website`).
|
|
80
|
+
- Keep the old hosting running for a few days — some resolvers still cache the old address, and email hosted there must be moved separately.
|