A WordPress export file (Tools → Export) holds everything: all posts, pages, drafts and their categories. When you only want part of it on another site, for example the recipes of an old food and travel blog, the standard WordPress importer brings in all of it, and you delete the rest by hand. With Import Export by RockStarLab, you set conditions and only the matching posts are imported.
Free: everything here is in the free plugin. Use version 2.2.1 or newer: 2.2.0 adds the row filter and 2.2.1 keeps the tags of WordPress export files apart from the categories.
The export file
Our file is the export of a food and travel blog: 12 items, 10 posts and 2 pages. Six posts are in the Recipes category (one of them also in Travel), one recipe is still a draft, and the others are travel stories and news. We want only the published recipes, with their categories and tags.
In such a file every post is an <item>. The plugin reads each item as a row and its fields as columns: title, content:encoded, wp:post_date, wp:status, wp:post_type, category (the categories) and tag (the tags).
Step 1: Upload and Auto Map
Open Import Export → Import, choose Posts, upload the XML file and continue to the mapping step. Click Auto Map. The columns of WordPress export files are recognized: title, content, excerpt, date, slug, status, author, categories and tags:

Step 2: Filter the rows
In step 5, Import Options, tick Filter Rows and add three conditions:

categorycontainsRecipes: the post is in the Recipes category, alone or with others.wp:statusequalspublish: leaves out drafts, pending and private posts.wp:post_typeequalspost: leaves out pages, menu items and attachments, which the same file can contain.
Rows must match: all conditions means a row needs all three. Text comparisons ignore letter case.
Step 3: Import
Click Start Import. Our import created 6 posts in a second:

The job log says 6 rows did not match the row filter and were not imported: the travel and news posts, the draft recipe and the two pages.
The result
The six recipes are on the new site with their original dates, categories and tags. Market Day in Lyon keeps both its categories, Recipes and Travel:

More filters
- Posts after a date:
wp:post_dategreater than / after2023-01-01. - One author:
dc:creatorequals the author’s login. - Several categories: set Rows must match to any condition and add one
categorycontains condition per category. - Leave out a category:
categorydoes not containNews. - Tags: the
tagcolumn works the same way, for exampletagcontainsbaking.
Contains also matches parts of a name: Recipes matches a category called Vegan Recipes too. Use is one of with the exact names when that matters.
The import adds posts to the site. Back up the site first, or ask your AI agent to start the backup.
With an AI agent
An AI agent connected to the site through the WordPress MCP Adapter (see connecting Claude Code to WordPress) can do the same:
Without the plugin, WordPress 7.1.5 gives a connected agent only three read-only abilities for site, user and environment information. The exports, imports and syncs in the requests below are abilities of Import Export by RockStarLab.
With Import Export by RockStarLab, import only the published recipe posts from old-blog.xml, with their categories and tags.
In our run, the agent loaded the file with rsl-ie/upload-from-url, read the columns from the answer, and called rsl-ie/import-start with the mapping and options.row_filters: category contains Recipes, wp:status equals publish and wp:post_type equals post. Job 99 finished with 6 posts, and the log said that 6 rows did not match.
FAQ
Are images in the posts imported too?
Images in the post content are downloaded into the Media Library when Automatically Import Media Files is on in step 5 (the default) and the old site is still online. The file itself has only links.
Can I import the comments of these posts?
Not in the same step. The comment columns of the file (wp:comment/…) are not mapped to post fields. Import comments separately, or move the posts and comments between two live sites with Content Sync.
What if I run the import twice?
Set Check for Existing Items by Field to the slug (post_name) and If Match Found to Skip or Update, so the posts are not created twice.
Does the filter work with CSV and Excel files?
Yes. The Filter Rows option works with every file format; the columns are the column headers of the file.
Related Guides
- Import WordPress and WordPress.com Export Files (What’s New in 2.1.52)
- Move WordPress Posts to a New Site and Keep Dates, Authors and Slugs
- Admin Colors, Row Filter and Day-First Dates (What’s New in 2.2.0)
Get the free plugin on WordPress.org.

Comments 0
Have a question or a tip to share? Leave it below.