স্কিপ করে মূল কন্টেন্ট এ যান

ImportWxrStep <ResourceType>

Imports a WXR file into WordPress.

@example
<code>
{
"step": "importWxr",
"file": {
"resource": "url",
"url": "https://your-site.com/starter-content.wxr"
}
}
</code>

Index

Properties

optionalauthorsMap

authorsMap?: Record<string, string>

Remote WXR author usernames keyed to existing local usernames.

optionalauthorsMode

authorsMode?: create | default-author | map = create | default-author | map

How to assign imported WXR authors to local WordPress users.

optionaldefaultAuthorUsername

defaultAuthorUsername?: string = ```ts "admin" ```

The fallback local user for imported authors that cannot be mapped.

optionalfetchAttachments

fetchAttachments?: boolean = ```ts true ```

Whether to fetch and import attachment files referenced by the WXR file.

file

file: ResourceType

The file to import

optionalimportComments

importComments?: boolean = ```ts true ```

Whether to import comments from the WXR file.

optionalimportUsers

importUsers?: boolean = ```ts false ```

Whether to create local users for imported WXR authors.

optionalimporter

importer?: default | data-liberation

The importer to use. Possible values:

This option is deprecated. The syntax will not be removed, but once the Data Liberation importer matures, it will become the only supported importer and the importer option will be ignored.

@deprecated

optionalrewriteUrls

rewriteUrls?: boolean = ```ts true ```

Whether to rewrite imported URLs to the current site URL.

step

step: importWxr

optionalurlMapping

urlMapping?: Record<string, string>

Explicit URL replacements to apply when URL rewriting is enabled.