Export Single Post
WordPress plugin to allow export of a single post in WXR format
by Alley Interactive · github.com/alleyinteractive/wp-export-single-post · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/alleyinteractive/wp-export-single-post/archive/refs/heads/develop.zipReadme
Export Single Post
Contributors: alleyinteractive
Tags: alleyinteractive, wp-export-single-post
Stable tag: 0.1.0
Requires at least: 6.3
Tested up to: 6.9
Requires PHP: 8.2
License: GPL v2 or later
Exports single posts in WordPress WXR format.
Installation
You can install the package via Composer:
composer require alleyinteractive/export-single-post
Usage
Once activated, an Export link appears in the row actions for each post and page in the WordPress admin list view. Clicking it downloads a WXR XML file containing that post and all of its attachments. The link is only shown to users with the export capability.
Filters
wp_export_single_post_post_types — Override the full list of post types that display the Export link. Receives an array of post type slugs (defaults to all post types with can_export set).
add_filter( 'wp_export_single_post_post_types', function ( array $post_types ): array {
return [ 'post', 'page' ];
} );
wp_export_single_post_should_include_post_type — Allow or block a specific post type. Receives a boolean and the post type slug.
add_filter( 'wp_export_single_post_should_include_post_type', function ( bool $include, string $post_type ): bool {
return $post_type !== 'my_private_type';
}, 10, 2 );
Testing
Run composer test to run tests against PHPUnit and the PHP code in the plugin.
Unit testing code is written in PSR-4 format and can be found in the tests
directory.
Releasing the Plugin
The plugin uses
action-release via a
built release workflow to compile and
tag releases. Whenever a new version is detected in the root plugin's headers in
the wp-export-single-post.php file or in the composer.json file, the workflow will
automatically build the plugin and tag it with a new version.
When you are ready to release a new version of the plugin, you can run
composer release to start the process of setting up a new release. If you
want to do this manually you can follow these steps:
-
Change the
Versionin thewp-export-single-post.phpfile to a new higher-level version.- * Version: 0.0.0 + * Version: 0.0.1✨
composer releasewill do this for you automatically. -
Commit your changes and push to the repository.
-
Check the actions tab in the repository to see the progress of the release. The action will automatically create a new tag and release for the plugin. You are done!
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
This project is actively maintained by Alley Interactive. Like what you see? Come work with us.
License
The GNU General Public License (GPL) license. Please see License File for more information.
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| v0.1.0 | Apr 20, 2026 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.