For the complete documentation index, see llms.txt. This page is also available as Markdown.

Import WordPress website

Import WordPress website to the specified domain.

Import WordPress website

post

Import WordPress website to the specified domain.

WARNING: this overwrites the website's existing contents and cannot be undone — verify this is intended before calling this endpoint.

This endpoint allows you to import a WordPress website from archive and database files that have been uploaded to the website's directory.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
usernamestringRequiredExample: u123456789
domainstringRequired

Domain name

Example: mydomain.tld
Body
archive_pathstringRequired

Path to the WordPress archive file (relative to website root)

Example: backup.zip
sql_pathstringRequired

Path to the database SQL file (relative to website root)

Example: database.sql
Responses
200

Success response

application/json
messagestringOptionalExample: Request accepted
post/api/hosting/v1/accounts/{username}/websites/{domain}/wordpress/import
POST /api/hosting/v1/accounts/{username}/websites/{domain}/wordpress/import HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "archive_path": "backup.zip",
  "sql_path": "database.sql"
}
{
  "message": "Request accepted"
}

Last updated

Was this helpful?