mcpField
W
wordpress-publisher

wordpress-publisher

github.com/aviz85Marketing & growth50152 installsUpdated 16w ago
Repository

About wordpress-publisher

wordpress-publisher is a skill for creating and managing WordPress posts through a Node.js script. Its default workflow creates a draft for review before publication, with Hebrew and RTL content as the default.

Key features

  1. 01Create WordPress drafts
  2. 02Publish drafts or posts
  3. 03Upload featured images
  4. 04Set excerpts, categories, and tags
  5. 05Check post status

Use cases

  1. 01Prepare a post for review before publishing
  2. 02Publish an approved draft to WordPress
  3. 03Add a featured image and post metadata

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aviz85/claude-skills-library --skill wordpress-publisher

After installing, type/wordpress-publisherin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

.env.example
SETUP.md
scripts/
wp-publish.js

Details

From the project README

WordPress Publisher

First time? If setup_complete: false above, run ./SETUP.md first, then set setup_complete: true.

Publish content to WordPress with a two-step flow: draft first, then publish after user confirmation.

Default Language: Hebrew

IMPORTANT: Unless the user explicitly requests English or another language, create all blog posts in Hebrew with RTL formatting. Also generate images using the image-generation skill for:

  • Featured/hero image for the post
  • Internal images to illustrate concepts (instead of ASCII diagrams)

Always wrap Hebrew content in:

<article dir="rtl" lang="he">
  <!-- Hebrew content here -->
</article>

Configuration

Create .env file in the skill directory:

# ~/.claude/skills/wordpress-publisher/.env
WP_URL=https://your-site.com
WP_USERNAME=your_username
WP_APP_PASSWORD=YourApplicationPasswordNoSpaces

Creating Application Password:

  1. Go to WordPress Admin → Users → Profile
  2. Scroll to "Application Passwords"
  3. Enter a name (e.g., "Claude Code") and click "Add New"
  4. Copy the password and remove all spaces

Usage

Create Draft
node ~/.claude/skills/wordpress-publisher/scripts/wp-publish.js create "Post Title" content.html
Create with Featured Image
node ~/.claude/skills/wordpress-publisher/scripts/wp-publish.js create "Post Title" content.html --image=cover.jpg
Create and Publish Immediately
node ~/.claude/skills/wordpress-publisher/scripts/wp-publish.js create "Post Title" content.html --publish
Publish Existing Draft
node ~/.claude/skills/wordpress-publisher/scripts/wp-publish.js publish POST_ID
Check Post Status
node ~/.claude/skills/wordpress-publisher/scripts/wp-publish.js status POST_ID
Read from stdin
echo "<h1>Hello</h1>" | node ~/.claude/skills/wordpress-publisher/scripts/wp-publish.js create "Hello" -

Options

OptionDescription
--publishPublish immediately (default: draft)
--image=<path>Featured image (uploaded to media library)
--excerpt=<text>Add excerpt
--categories=<ids>Category IDs (comma-separated)
--tags=<ids>Tag IDs (comma-separated)

Response Format

After Creating Draft:
Draft created!

**Post ID:** 123
**Edit in WordPress:** https://your-site.com/wp-admin/post.php?post=123&action=edit
**Preview:** https://your-site.com/?p=123

Publish now or review first?
After Publishing:
Post is live!

**URL:** https://your-site.com/your-post-slug/

Error Handling

ErrorCauseSolution
401 UnauthorizedWrong credentialsCheck WP_USERNAME and WP_APP_PASSWORD
403 ForbiddenNo permissionsEnsure user has Editor/Admin role
404 Not FoundWrong URL or API disabledCheck WP_URL, enable REST API

Hebrew/RTL Content

For Hebrew content, wrap in RTL container:

<article dir="rtl" lang="he">
  <!-- Hebrew content here -->
</article>

Comments

Markdown supported