Post Tags Export/Import

外掛說明

Do you need to back up your post tags, migrate them to another site, or perform a bulk update in a spreadsheet? Post Tags Export/Import is the perfect tool for the job.

This plugin provides a simple interface under “Tools” in your WordPress admin area to handle two key tasks:

  1. Export Posts to JSON: With a single click, you can download a clean JSON file containing the title, slug, and an array of tags for every post on your site.
  2. Import Tags from JSON: Upload a JSON file (in the same format as the one you exported) to bulk update tags. The plugin uses the post slug to identify which post to update and replaces its existing tags with the ones from the file.

This is incredibly useful for:
* Backing up and restoring tag structures.
* Editing tags offline in bulk using a text editor or script.
* Migrating tag information between staging and production environments.
* Quickly applying a new set of tags to hundreds of posts.

The plugin is designed to be lightweight, secure, and easy to use.

螢幕擷圖

  • The main admin page showing the Export and Import sections.

安裝方式

You can install the plugin in a few simple steps:

From your WordPress dashboard (easiest):
1. Navigate to ‘Plugins’ > ‘Add New’.
2. Search for ‘Post Tags Export/Import’.
3. Click ‘Install Now’ and then ‘Activate’.

Manual Installation:
1. Download the plugin zip file from the repository.
2. Unzip the file to get the post-tags-export-import directory.
3. Upload the post-tags-export-import directory to the /wp-content/plugins/ directory on your server.
4. Go to the ‘Plugins’ page in your WordPress admin and click ‘Activate’ for the “Post Tags Export/Import” plugin.

After Activation:
1. Navigate to ‘Tools’ > ‘Post Tags Export/Import’ to access the plugin’s page.

常見問題集

Where do I find the settings page?

You can find the plugin’s page in your WordPress admin dashboard under Tools -> Post Tags Export/Import.

What is the format of the JSON file?

The JSON file is an array of objects. Each object represents a post and must contain a slug (string) and tags (array of strings). The title is included for reference in the export but is not used during the import.

Example:
[
{
“title”: “My First Blog Post”,
“slug”: “my-first-blog-post”,
“tags”: [“news”, “updates”]
},
{
“title”: “A Guide to WordPress”,
“slug”: “a-guide-to-wordpress”,
“tags”: [“wordpress”, “guide”, “tutorial”]
}
]

What happens if a slug in my import file doesn’t exist on my site?

The plugin will simply skip that entry. The success message after the import will tell you how many posts were updated and how many were skipped.

Does the import add to existing tags or replace them?

The import process replaces all existing tags on a post with the tags provided in the JSON file for that post’s slug. If the “tags” array for a post is empty in the file, it will remove all tags from that post.

Will this plugin work with Custom Post Types?

Currently, the plugin is designed to work only with the default ‘post’ post type.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Post Tags Export/Import〉的開發相關工作。

參與者

將〈Post Tags Export/Import〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.4.2

  • Sanitize early, Escape Late, Always Validate

1.4.1

  • Update readme.txt and readme.md for clarity.
  • Verified compatibility up to WordPress 6.8.

1.4.0

  • Security Enhancement: Refactored all function names with the PTIMPEX_ prefix to prevent conflicts.
  • Added Requires at least and Requires PHP headers for better dependency management.
  • Minor code cleanup and comment improvements.

1.0.0

  • Initial release.
  • Functionality to export all posts to JSON.
  • Functionality to import tags from JSON, replacing existing tags.