# Test a WordPress WXR draft import before migration

**Use case:** 

Generate three original sample posts as a WordPress WXR file. Test the draft-only import workflow before exporting a site you own or are authorised to migrate. This example does not contact a website or perform a full-site migration.

## Input

```json
{
  "mode": "example",
  "maxPosts": 3,
  "rightsAcknowledged": false
}
```

## Output

```json
{
  "status": {
    "label": "Result",
    "format": "text"
  },
  "sourceURL": {
    "label": "Source",
    "format": "link"
  },
  "exportedPosts": {
    "label": "Posts",
    "format": "number"
  },
  "attachmentCount": {
    "label": "Featured images",
    "format": "number"
  },
  "warningCount": {
    "label": "Warnings",
    "format": "number"
  },
  "sourceComplete": {
    "label": "Entire source included",
    "format": "boolean"
  },
  "truncated": {
    "label": "Post limit reached",
    "format": "boolean"
  },
  "importStatus": {
    "label": "Import as",
    "format": "text"
  },
  "observedAt": {
    "label": "Observed at",
    "format": "date"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The WordPress Posts to WXR Export - Draft Import File Actor is ready to run with the inputs already set for "Test a WordPress WXR draft import before migration". [Sign up or log in](https://console.apify.com/create-task-from-example/65Kd2og5ia9zPIEaM) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Test a WordPress WXR draft import before migration" task

The WordPress Posts to WXR Export - Draft Import File Actor will start running based on the input automatically. You can also change all the input fields, like what would you like to export?, maximum posts, and more, to match your specific use case.

### 3. Receive the "Test a WordPress WXR draft import before migration" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as result, source, posts, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Test a WordPress WXR draft import before migration" task via API](https://apify.com/bigjgpt/wordpress-posts-to-wxr.md).

## FAQ

### Does this example export my website?

No. It creates three original sample posts without contacting a website. To export your authorised self-hosted WordPress blog, open the Actor and choose Export my blog posts.

### How much does the example cost?

The example has a $0.02 run-start event and no export event. A nonempty real export adds $0.20. Free-plan activity earns the creator no revenue. No external paid service is used.

### Will imported posts be published?

The file marks every post as a draft. Import it on a staging site with the standard WordPress Importer, then review before publishing. It is not a full-site backup and does not include themes or plugins.

## About this Actor

This example demonstrates how to use [WordPress Posts to WXR Export - Draft Import File](https://apify.com/bigjgpt/wordpress-posts-to-wxr.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/bigjgpt/wordpress-posts-to-wxr.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/bigjgpt/wordpress-posts-to-wxr.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
