| name | wp-manager |
| description | WordPress site manager via REST API. WordPress博客管理、WordPress网站管理、WP建站、文章发布、页面管理、博客发布、媒体上传、图片管理、插件管理、主题设置、SEO优化、搜索引擎优化、SEO检查、网站安全、安全加固、速度优化、备份策略、内容管理系统CMS、网站运维、站点管理、博客运营。Manage posts, pages, media, plugins, themes, templates, and site settings. SEO health check, security audit, speed optimization, backup strategy. Blog management, content publishing, website operations. Use when: (1) managing WordPress sites/blogs, (2) publishing or editing posts and pages, (3) uploading media files, (4) managing plugins and themes, (5) updating site settings and SEO, (6) WordPress REST API operations, (7) checking SEO score, (8) WordPress security hardening, (9) site speed optimization, (10) backup planning. 适用场景:发布文章、管理页面、上传图片、管理插件主题、修改网站设置、WordPress自动化运维、SEO检查、安全加固、速度优化、备份策略。 |
WP Manager
Manage WordPress sites via REST API. Cookie-based auth, no plugins required.
为什么用这个 Skill? / Why This Skill?
- 结构化命令 vs 直接问AI:预置了完整的WordPress REST API调用链,登录→鉴权→操作一步到位,不用手写curl
- Cookie认证:自动处理登录、cookie存储、nonce提取,不需要安装额外插件
- Block格式:自动生成WordPress Gutenberg block标记,不用手写HTML
- Compared to asking AI directly: this skill provides ready-to-run shell commands that handle auth, nonce, and WordPress block formatting automatically
Setup
Store credentials in .env:
WP_URL=https://example.com
WP_USER=admin
WP_PASS=yourpassword
Quick Start
source .env
scripts/wp.sh login
scripts/wp.sh posts
scripts/wp.sh publish "Title" "Content here"
scripts/wp.sh pages
scripts/wp.sh plugins
scripts/wp.sh media upload ./image.png
scripts/wp.sh settings
Commands
Content
wp.sh posts
wp.sh post <id>
wp.sh publish "Title" "Content"
wp.sh draft "Title" "Content"
wp.sh edit <id> "New content"
wp.sh delete <id>
wp.sh pages
wp.sh page-publish "Title" "Content"
Media
wp.sh media
wp.sh media upload ./file.png
Plugins
wp.sh plugins
wp.sh plugin-activate <slug>
wp.sh plugin-deactivate <slug>
wp.sh plugin-delete <slug>
Site Settings
wp.sh settings
wp.sh set-title "New Title"
wp.sh set-tagline "New tagline"
wp.sh set-homepage posts
wp.sh set-homepage page <id>
Templates (Block Themes)
wp.sh templates
wp.sh template <id>
wp.sh template-update <id> "content"
wp.sh template-parts
wp.sh template-part <id>
wp.sh template-part-update <id> "content"
SEO & Operations
wp.sh seo-check "URL"
wp.sh security
wp.sh speed
wp.sh backup
See also: tips.md for WordPress best practices.
Auth Notes
- Uses
curl --data-urlencode for login (handles special chars in passwords)
- Cookie stored in
/tmp/wp-session.txt
- Nonce extracted from
/wp-admin/post-new.php
- Sessions expire ~24-48h; re-run
wp.sh login if you get 401/403
- REST API base:
{WP_URL}/wp-json/wp/v2/
Content Format
Post/page content uses WordPress block markup:
<p>Your text here</p>
<h2>Section Title</h2>
<ul><li>Item 1</li><li>Item 2</li></ul>
Plain HTML also works — WordPress auto-wraps in classic blocks.