Export to JSON POSTS
Export WordPress posts and pages to JSON via REST API
by paisionut · github.com/paisionut/posts-json-exporter · 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/paisionut/posts-json-exporter/archive/refs/heads/main.zipExport WordPress posts and pages to JSON via REST API with full configuration options.
Description
This WordPress plugin provides two REST API endpoints to export posts and pages to JSON format. Features include configurable post types, statuses, category exclusion, pagination, and flexible filtering.
Features
Two REST API Endpoints
- Public endpoint:
/wp-json/etjp/v1/export(no authentication required) - Admin endpoint:
/wp-json/etjp/v1/posts(requires administrator or editor role)
Admin Settings Page
- Configure default posts per page
- Select default post types (post, page, custom)
- Select default post statuses (admin endpoint only)
- Exclude specific categories from export
API Parameters
page- Page numberitems- Items per pageorder- Order direction (DESC/ASC)orderby- Order by field (ID, date, title, modified)status- Override post statustype- Override post typeexclude_cat- Exclude categories (comma-separated IDs)search- Search posts by title/contentauthor- Filter by author IDyear- Filter by yearmonthnum- Filter by monthdebug- Return debug info (public endpoint)
JSON Output Includes
- id, slug, title, content, excerpt
- guid, permalink, featured_img
- post_date, post_modified, post_date_gmt, post_modified_gmt
- status, type, author, author_id
- tags, categories, comment_count
Installation
- Upload the plugin directory to
/wp-content/plugins/ - Activate through WordPress plugins menu
- Configure settings in WordPress admin under "Export to JSON"
API Usage
Public Endpoint (no auth)
/wp-json/etjp/v1/export
Admin Endpoint (requires admin/editor)
/wp-json/etjp/v1/posts
Example Requests
/wp-json/etjp/v1/export?items=50&order=ASC
/wp-json/etjp/v1/export?type=post,page&exclude_cat=1,2
/wp-json/etjp/v1/posts?status=publish,private&author=1
Changelog
2.0
- Complete plugin rewrite with admin settings page
- Configurable post types, statuses, and category exclusion
- Extended API parameters for filtering
- Modern admin UI with sidebar
1.5
- Added public export endpoint
1.4
- Initial release improvements
License
GPL v2 or later - see LICENSE.txt
Releases
1 release.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.