Import WordPress website
Import WordPress website to the specified domain.
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:
u123456789domainstringRequiredExample:
Domain name
mydomain.tldBody
archive_pathstringRequiredExample:
Path to the WordPress archive file (relative to website root)
backup.zipsql_pathstringRequiredExample:
Path to the database SQL file (relative to website root)
database.sqlResponses
200
Success response
application/json
messagestringOptionalExample:
Request accepted401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
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?