This feature allows you to export only a specific subset of your WordPress content, filtered by category, tag, or post type. This is particularly useful when:
- You have a large WordPress site but only need to convert specific sections
- You want to migrate content by topic or category
- You need to export content incrementally
The easiest way to perform selective exports is via WP-CLI commands.
To export posts from a single category, use the category slug:
wp jekyll-export --category=technology > technology-export.zip
To export from multiple categories (OR logic - posts in any of these categories):
wp jekyll-export --category=tech,news,updates > export.zip
To export posts with a specific tag:
wp jekyll-export --tag=featured > featured-export.zip
To export posts with multiple tags (OR logic):
wp jekyll-export --tag=featured,popular > export.zip
To export only pages:
wp jekyll-export --post_type=page > pages-export.zip
To export only posts:
wp jekyll-export --post_type=post > posts-export.zip
To export custom post types:
wp jekyll-export --post_type=portfolio,testimonial > custom-export.zip
You can combine multiple filters. Posts must match ALL specified filters (AND logic):
# Export posts that are in "technology" category AND have "featured" tag
wp jekyll-export --category=technology --tag=featured --post_type=post > export.zip
For more programmatic control, you can use WordPress filters directly in your theme's functions.php or a custom plugin.
add_filter( 'jekyll_export_taxonomy_filters', function() {
return array(
'category' => array( 'technology', 'science' ),
);
} );
add_filter( 'jekyll_export_taxonomy_filters', function() {
return array(
'post_tag' => array( 'featured', 'popular' ),
);
} );
add_filter( 'jekyll_export_taxonomy_filters', function() {
return array(
'my_custom_taxonomy' => array( 'term-slug-1', 'term-slug-2' ),
);
} );
add_filter( 'jekyll_export_taxonomy_filters', function() {
return array(
'category' => array( 'technology' ),
'post_tag' => array( 'featured' ),
'custom_tax' => array( 'term-1' ),
);
} );
add_filter( 'jekyll_export_post_types', function() {
return array( 'post', 'page' ); // Only export posts and pages
} );
If you're not sure what slug to use:
- Go to Posts > Categories or Posts > Tags
- Hover over the category/tag name
- Look at the browser's status bar or the URL - you'll see something like
tag_ID=123&taxonomy=post_tag&term_slug=featured - The slug is the part after
term_slug=
List all categories with their slugs:
wp term list category --fields=name,slug
List all tags with their slugs:
wp term list post_tag --fields=name,slug
You have a WordPress site with multiple sections (Tech, Lifestyle, Travel) and want to move just the Tech section to a static site:
wp jekyll-export --category=tech > tech-blog-export.zip
You want to export only posts marked as "featured" for a special showcase site:
wp jekyll-export --tag=featured > featured-content.zip
If you've tagged posts by year, you can export by year:
wp jekyll-export --tag=2024 > 2024-posts.zip
Export different categories separately for incremental migration:
wp jekyll-export --category=tech > tech.zip
wp jekyll-export --category=news > news.zip
wp jekyll-export --category=reviews > reviews.zip
- Taxonomy Filtering: Uses WordPress term slugs (not names or IDs)
- Query Performance: Filtering is done at the database level for efficiency
- OR Logic Within Taxonomy: Multiple terms in the same taxonomy use OR logic (e.g., posts in category A OR B)
- AND Logic Across Taxonomies: Multiple taxonomies use AND logic (e.g., posts in category A AND having tag B)
- Post Type Filtering: Works independently of taxonomy filtering
- Revisions are excluded when using taxonomy filters (as they don't have taxonomy terms)
- Taxonomy filtering uses term slugs, not term IDs or names
- Empty taxonomy filters are ignored (no filtering applied)
If your export is empty:
- Check the slug: Make sure you're using the term slug, not the name
- Use
wp term list categoryto verify the exact slug
- Use
- Check post status: Only published, future, and draft posts are exported
- Verify taxonomy: Make sure you're using the correct taxonomy name (
category,post_tag, etc.)
If you're getting unexpected posts:
- Check term associations: Verify which posts have the category/tag assigned
- Review filter logic: Remember that multiple categories use OR logic
- Clear cache: If testing, use
wp cache flushbetween exports