Skip to content

nikolareljin/nr-post-exporter

Repository files navigation

NR Post Exporter

Export and import individual WordPress posts (with meta, terms, and revisions).

See readme.txt for WordPress.org metadata and screenshots.

Features

  • Export a single post to JSON from the Posts/Pages list table.
  • Import a JSON export from Tools → Post Import.
  • Works with all public post types.
  • Preserves custom fields, taxonomy terms, and revision history.
  • Normalizes UTF-8 content to avoid double-encoding.

Requirements

  • WordPress 5.8+
  • PHP 7.4+
  • Export requires the export capability.
  • Import requires the edit_posts capability.

Installation

  1. Upload the plugin to /wp-content/plugins/nr-post-exporter or install via the Plugins screen.
  2. Activate the plugin.

Usage

Export

  1. Go to Posts → All Posts (or Pages).
  2. Hover a row and click Export.
Posts list row with Export action highlighted Step 2: Click Export from the row actions for the post you want to transfer.
  1. Save the JSON file locally.
Save dialog showing a JSON export file Step 3: Save the downloaded JSON file so it can be imported on another site.

Import

  1. Go to Tools → Post Import.
  2. Choose a previously exported JSON file.
  3. Click Import Post.
Post Import screen showing file upload and import button Import screen: upload the exported JSON and run the import.

What the JSON contains

  • Post fields (title, content, status, dates, slug, etc.).
  • Post meta (custom fields).
  • Taxonomy terms (by slug).
  • Revisions (when present).

Import behavior and limits

  • The current user becomes the author on import.
  • Imported titles are prefixed with Imported:.
  • Terms are created by slug if they do not exist.
  • The upload size limit is ~1MB.
  • Media files are not transferred; attachment references remain in content/meta.

Development

  • Install tooling: composer install
  • Linting: composer run lint and composer run lint:fix
  • Build zip: bash bin/build-zip.sh
  • Test environment: see test/README.md

About

Export and Import Wordpress posts

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published