---
title: "Export WordPress Posts to XML for Feeds and Partner Sites"
url: "https://wpimportexport.com/export-wordpress-posts-xml-feed-partners/"
description: "Export WordPress posts to an XML file with your own element names: pick fields, rename them for a partner, filter by category and pretty-print the result."
type: post
published: 2026-11-15T09:00:00+00:00
modified: 2026-11-14T10:44:53+00:00
categories: ["Export Guides", "Tutorials"]
tags: ["CSV Export", "Import Export by RockStarLab"]
docs_topics: ["Export guides"]
---

# Export WordPress Posts to XML for Feeds and Partner Sites

A partner site, a newsletter tool or a local events portal wants your latest posts, and they ask for XML with their own element names: `<title>`, `<summary>`, `<url>`, not WordPress’s `post_excerpt` or `permalink`. With [Import Export by RockStarLab](https://wordpress.org/plugins/import-export-by-rockstarlab/), you choose the posts and fields, rename each field to the element name the partner expects, and download a clean XML file. The example is a news feed for a coffee roastery’s partner café.

**Free:** XML export of posts and pages, filters, column renaming and Pretty Print. **PRO:** the same for custom post types and WooCommerce products.

## Short Answer

1. In **Export**, choose Posts and add a filter, for example **Taxonomy Filter** on `category`, so only the right posts go into the feed.
2. Add the fields the partner needs and rename each one with the pencil icon: the new name becomes the XML element name.
3. Choose **XML** as the format, tick **Pretty Print**, and download the file.

## Choose the posts

The café only wanted our announcements, which live in the category “Roastery News”. A **Taxonomy Filter** with the taxonomy `category`, the condition **Has Term(s) – IN** and the category slug narrows the export to those posts:

![Export filter: Taxonomy Filter, taxonomy category, condition Has Term(s) - IN, term roastery-news-xml; total items available 4](https://wpimportexport.com/wp-content/uploads/2026/11/01-filter-category.webp)

_A category filter limits the feed to the posts the partner should get._

Four posts matched. To send only recent posts, add a second filter on **Date**; filters combine with AND.

## Pick the fields and name them for the partner

The café’s developer sent a short list: an ID, a title, a publish date, a short summary, a link, an image and the category. We added the matching WordPress fields and renamed each column with the pencil icon:

- **ID** → `id`, so the partner can tell new items from ones they already have.
- **Title** → `title`.
- **Date** (`post_date`) → `published`.
- **Excerpt** → `summary`. Write a real excerpt for each post; it’s the text the partner shows.
- **Permalink** → `url`, the link back to the full post on your site.
- **Featured Image URL** → `image`.
- **Category Names** → `category`.

![Export File Structure with seven columns renamed: id (ID), title (post_title), published (post_date), summary (post_excerpt), url (permalink), image (featured_image_url), category (category_names)](https://wpimportexport.com/wp-content/uploads/2026/11/02-xml-columns-scaled.webp)

_Each column keeps its WordPress field and gets the element name the partner asked for._

Use names that are valid XML elements: letters, digits, hyphens and underscores, starting with a letter, no spaces.

## Export as XML

On the next step, choose **XML**, tick **Pretty Print** so the file is indented and easy to read, and give the file a name such as `roastery-news-feed`. Then start the export.

![Export Completed Successfully: 4 items exported, file size 1.52 KB, duration 2s](https://wpimportexport.com/wp-content/uploads/2026/11/03-export-complete-1.webp)

_Four posts, one 1.5 KB XML file._

Here is part of the file we downloaded:

```
<?xml version="1.0" encoding="UTF-8"?>
<items>
  <item>
    <id>2039</id>
    <title>Cupping Night: &quot;Sweet&quot; Naturals</title>
    <published>2026-11-03 09:00:00</published>
    <summary>Join us Thursday for four natural-process coffees.</summary>
    <url>https://www.example-roastery.com/2026/11/03/cupping-night-sweet-naturals/</url>
    <image></image>
    <category>Roastery News</category>
  </item>
  <item>
    <id>2038</id>
    <title>Holiday Hours &amp; Gift Cards</title>
    <published>2026-11-02 09:00:00</published>
    <summary>Open every day except 25 December; gift cards in store.</summary>
    <url>https://www.example-roastery.com/2026/11/02/holiday-hours-gift-cards/</url>
    <image>https://www.example-roastery.com/wp-content/uploads/2026/11/logo-mug.jpg</image>
    <category>Roastery News</category>
  </item>
  <!-- … 2 more items … -->
</items>
```

What to check before you send it:

- Every post is one `<item>` inside a single `<items>` root, with the element names from the column names.
- Special characters are escaped: the `&` in “Holiday Hours & Gift Cards” and the quotation marks in “Cupping Night” came out as `&amp;` and `&quot;`, so the file stays valid XML.
- Posts without a featured image get an empty `<image></image>`. Tell the partner to expect it, or set an image on every post in the feed.
- The date uses WordPress’s format, `2026-11-03 09:00:00`, in your site’s time zone.

## Getting the file to the partner

Export files are stored privately on your site and have no public URL (see [where export files are stored](https://wpimportexport.com/wordpress-export-files-location-download-cleanup/)), so download the file and send it, or upload it where the partner picks it up. For a fresh file every week, run the same export again or set up a [scheduled export](https://wpimportexport.com/how-to-schedule-repeated-exports-in-wordpress/) and download the newest file.

If the partner only needs your latest posts in a standard format, WordPress already publishes an RSS feed at `/feed/`. A custom XML export is for partners who need their own element names, a filtered set of posts or fields that RSS doesn’t carry.

## Before you send it

An export doesn’t change anything on your site, but a feed shows content to people outside it. Filter out drafts and private posts if your filter could include them, check the excerpts, and keep a copy of every file you send. Before you run bulk changes to prepare the posts, such as adding excerpts by import, [back up the site](https://wpimportexport.com/how-to-create-a-wordpress-website-backup-and-restore-it/).

## With an AI agent

An AI agent connected through the WordPress MCP Adapter (see [connecting Claude Code to WordPress](https://wpimportexport.com/connect-claude-code-to-wordpress-mcp/)) can produce the same file on request:

```
Export the posts in Roastery News to XML for our partner, with the elements id, title, published, summary, url, image and category. Pretty-print it and name the file partner-feed.
```

In our run, the agent called `rsl-ie/export-start` with the format `xml`, the category filter, the seven fields renamed through `column_headers`, Pretty Print turned on and the file name `partner-feed`. When the job finished, it called `rsl-ie/file-get` with the job ID and got `partner-feed.xml`, 1,554 bytes, with the same four items and element names as the file from the wizard.

## FAQ

### Can I change the root and item element names?

No. The file always uses `<items>` as the root and `<item>` for each post. You choose the names of the elements inside each item.

### Can I export custom fields to the XML?

Yes. Add them from **Custom Fields** or **ACF Fields** in the field list and rename them like any other column.

### Is this a replacement for the RSS feed?

No. RSS is a live feed that readers poll. This export is a file you create when you need it, with the fields and names a partner asks for.

### Can I export pages or products the same way?

Pages, yes, in the free plugin. WooCommerce products and custom post types need PRO.

### Can I import this XML into another WordPress site?

Yes. In Import, choose Posts, upload the XML and map the elements to fields, for example `summary` to Excerpt. The steps are the same as in [importing a supplier XML feed](https://wpimportexport.com/import-woocommerce-products-xml-supplier-feed/), which shows them for products.

## Related Guides

- [Where Export Files Are Stored, How to Download Them Again and Clean Up](https://wpimportexport.com/wordpress-export-files-location-download-cleanup/)
- [How to Export WordPress to Excel: Built-In Export vs a Plugin](https://wpimportexport.com/export-wordpress-to-excel/)
- [How to Export WordPress Content to JSON for AI and LLMs](https://wpimportexport.com/export-wordpress-content-json-for-ai/)
- [Compare Two WordPress Exports to See What Changed: An Excel Workflow](https://wpimportexport.com/compare-two-wordpress-exports-excel/)

Get the free plugin on [WordPress.org](https://wordpress.org/plugins/import-export-by-rockstarlab/).
