Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计提醒

wordpress-selfhostedWordPress selfhosted 命令行

Agent Skill

wordpress-selfhosted 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

10,686

周安装

459

GitHub Stars

1

下载量

3,745
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:wordpress-selfhosted(WordPress selfhosted 命令行)
来源仓库:https://github.com/eddygk/wordpress-selfhosted
安装命令:
openclaw skills install wordpress-selfhosted
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install wordpress-selfhosted

简介

wordpress-selfhosted 用于自托管 WordPress 网站的管理与维护,提升运维效率。

  • 适用于写作、内容起草和发布的自动化任务场景。
  • 主要通过 SSH+WP-CLI 操作,支持 HTTPS 访问时也可使用 WP REST API。
  • 安装命令为 openclaw skills install wordpress-selfhosted,需确认服务器权限和网络连通性。
  • 建议核验维护状态,避免在生产环境无备份情况下执行高危命令。

SKILL.md

name
wordpress-selfhosted
license
MIT
description
Manage a self-hosted WordPress site via SSH+WP-CLI (primary) and WP REST API (when direct HTTPS access is available). Use when asked to write, draft, publish, update, or delete posts/pages on a self-hosted WordPress installation — including SEO optimization, categories/tags, featured images, author assignment, and proper post formatting. Designed for WordPress running on LXC, VPS, or bare-metal (not WordPress.com hosted). Requires: ssh, scp, curl, jq, wp (WP-CLI). Optional: op (1Password CLI for credential hydration via SSH agent socket). Network: SSH to user-configured WordPress host (LAN IP or public domain). Credentials: SSH key (via ssh-agent or 1Password SSH agent on macOS), WP application password (stored in 1Password, item name configurable via WP_1P_ITEM). Required env vars (gated; set via openclaw.json skills.entries or shell environment): WP_HOST, WP_SSH_USER, WP_ROOT. Optional config (TOOLS.md or env): WP_USER, WP_1P_ITEM. File writes: /tmp/post-content.html, /tmp/*.html (temporary content files SCP'd to host, created mode 600, cleaned up after use). Uses -o StrictHostKeyChecking=accept-new for SSH by default (trust-on-first-use); see Security Notes for alternatives.
metadata
{ "openclaw": { "emoji": "📝", "requires": { "bins": ["ssh", "scp", "curl", "jq", "wp"], "anyBins": ["op"], "env": ["WP_HOST", "WP_SSH_USER", "WP_ROOT"] }, "os": ["darwin", "linux"] } }

WordPress Self-Hosted

Manage a self-hosted WordPress site via SSH+WP-CLI (primary) or WP REST API (when direct HTTPS access is available).

Configuration — set via openclaw.json skills.entries.wordpress-selfhosted.env (preferred) or shell environment. Falls back to TOOLS.md if set there.

  • WP_HOST — LAN IP or domain, e.g., myblog.com (required, gated)
  • WP_SSH_USER — SSH user, e.g., dev (required, gated)
  • WP_ROOT — WordPress root path, e.g., /var/www/html/wordpress (required, gated)
  • WP_USER — WordPress username (optional; set in TOOLS.md or env)
  • WP_1P_ITEM — 1Password item name for app password (optional; set in TOOLS.md or env)

Connection Decision Tree

Use SSH+WP-CLI when:

  • WordPress is on a LAN IP (HTTP only)
  • Site is behind Cloudflare or a reverse proxy that strips Authorization headers
  • SITEURL is https:// but you're connecting over HTTP (SSL mismatch blocks app passwords)
  • You need plugin/theme/DB/cache operations (REST can't do these anyway)

Use REST API when:

  • You have direct HTTPS access to the WordPress host (no proxy stripping headers)
  • SITEURL matches the URL you're calling (no SSL mismatch)
  • Verify first: curl -s "https://<wp-host>/wp-json/" | jq '.authentication' — must return non-empty

⚠️ Common blockers for REST API auth:

  • Cloudflare (and most reverse proxies) strip Authorization headers — REST API auth will fail via public domain
  • WordPress requires SSL for application passwords — HTTP LAN access fails even if app passwords are created
  • Wordfence can disable application passwords entirely (wf_prevent_application_passwords option)

SSH + WP-CLI (Primary)

Use for all content operations when REST API is unavailable. Also the only option for plugin installs, cache flush, DB operations, file management.

# macOS with 1Password SSH agent
# Remove -o StrictHostKeyChecking=accept-new if host key is in known_hosts (see Security Notes)
SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" \
  ssh -o StrictHostKeyChecking=accept-new <ssh-user>@<wp-host> \
  'cd <wp-root> && wp <command>'

# Linux / other SSH agents — SSH_AUTH_SOCK is already set in most environments
# Remove -o StrictHostKeyChecking=accept-new if host key is in known_hosts (see Security Notes)
ssh -o StrictHostKeyChecking=accept-new <ssh-user>@<wp-host> \
  'cd <wp-root> && wp <command>'

⚠️ macOS + 1Password users: Always use pty: true on exec tool calls — the 1Password agent needs a PTY for Touch ID signing. Without it: communication with agent failed.

SCP (file upload)

Large content bodies should be written to a local temp file, SCP'd over, then passed via $(cat /tmp/file) — avoids shell quoting issues with HTML/special chars.

SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" \
  scp -o StrictHostKeyChecking=accept-new /tmp/file.html <ssh-user>@<wp-host>:/tmp/

Temp File Handling

Content files written to /tmp/ should use restrictive permissions and be cleaned up after use:

# Write with restrictive permissions (owner-only read/write)
umask 077 && cat > /tmp/post-content.html << 'CONTENT'
...your HTML content...
CONTENT

# SCP to host (file is already mode 600 due to umask)
SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" \
  scp -o StrictHostKeyChecking=accept-new /tmp/post-content.html <ssh-user>@<wp-host>:/tmp/

# After use, clean up local and remote temp files
rm -f /tmp/post-content.html
ssh <ssh-user>@<wp-host> 'rm -f /tmp/post-content.html'

Temp files contain post HTML content only — not credentials. App passwords retrieved via op are captured into shell variables and never written to disk.

WP REST API (When Direct HTTPS Available)

No PTY, no Touch ID, single HTTP call. Use only when connection decision tree above confirms it will work.

WP_USER="<wp-username>"
WP_PASS=$(op item get "<1p-item-name>" --fields password --reveal)
WP_BASE="https://<wp-host>/wp-json/wp/v2"

# Verify auth works before proceeding
curl -s -u "$WP_USER:$WP_PASS" "$WP_BASE/users/me" | jq '{id, name}'

# List posts
curl -s -u "$WP_USER:$WP_PASS" "$WP_BASE/posts?per_page=20&status=any" | jq '[.[] | {id, title: .title.rendered, status}]'

# Get post content (raw blocks)
curl -s -u "$WP_USER:$WP_PASS" "$WP_BASE/posts/<ID>?context=edit" | jq -r '.content.raw'

# Create post (draft)
curl -s -X POST -u "$WP_USER:$WP_PASS" "$WP_BASE/posts" \
  -H "Content-Type: application/json" \
  -d '{"title":"Post Title","content":"<p>Body</p>","status":"draft"}'

# Update post content
curl -s -X POST -u "$WP_USER:$WP_PASS" "$WP_BASE/posts/<ID>" \
  -H "Content-Type: application/json" \
  -d "{\"content\": $(cat /tmp/content.html | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')}"

# Publish
curl -s -X POST -u "$WP_USER:$WP_PASS" "$WP_BASE/posts/<ID>" \
  -H "Content-Type: application/json" \
  -d '{"status": "publish"}'

To create an app password:

wp user application-password create <username> "MyAgent" --porcelain

Store output in 1Password. Note: passwords are hashed in the DB — you can't recover them later.

Quick Start Workflow (WP-CLI)

0. Pre-Write (gather context)

ssh <ssh-user>@<wp-host> 'cd <wp-root> && wp post list --post_status=publish --fields=ID,post_title,post_name --format=json 2>/dev/null' | jq '[.[] | {id: .ID, title: .post_title, slug: .post_name}]'

Pick 2–3 related posts to link contextually in the content body.

1. Write content to temp file locally

Write Gutenberg HTML to /tmp/post-content.html, then SCP to host.

2. Create Draft

ssh <ssh-user>@<wp-host> 'cd <wp-root> && \
  wp post create /tmp/post-content.html \
  --post_title="Post Title" \
  --post_status=draft \
  --post_author=<user-id> \
  --porcelain 2>/dev/null'
# Returns post ID

3. Set Metadata

POST_ID=123
ssh <ssh-user>@<wp-host> 'cd <wp-root> && \
  wp post term set '"$POST_ID"' category <slug> && \
  wp post term set '"$POST_ID"' post_tag <tag1> <tag2> && \
  wp post meta update '"$POST_ID"' _yoast_wpseo_metadesc "Meta description 120-155 chars" && \
  wp post meta update '"$POST_ID"' _yoast_wpseo_focuskw "focus keyphrase" 2>/dev/null'

4. SEO Checklist

Before publishing, verify:

  • [ ] Meta description set (120–155 chars)
  • [ ] Focus keyphrase set
  • [ ] 2–3 internal links to related posts
  • [ ] 5–7 tags
  • [ ] Categories assigned
  • [ ] Featured image set (optional but recommended)

5. Publish

ssh <ssh-user>@<wp-host> 'cd <wp-root> && wp post update '"$POST_ID"' --post_status=publish 2>/dev/null'

Authors

ssh <ssh-user>@<wp-host> 'cd <wp-root> && wp user list --fields=ID,user_login,display_name --format=json 2>/dev/null'

Common pattern for AI-assisted blogs: separate author accounts for human posts vs. agent-authored posts.

Post Content Format

Use WordPress block format (Gutenberg):

<!-- wp:paragraph -->
<p>Paragraph text here.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Section Heading</h2>
<!-- /wp:heading -->

<!-- wp:code -->
<pre class="wp-block-code"><code>code here</code></pre>
<!-- /wp:code -->

<!-- wp:list -->
<ul>
<li>List item</li>
</ul>
<!-- /wp:list -->

Author Signatures (optional)

Append at end of AI-authored posts:

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:paragraph {"style":{"typography":{"fontSize":"14px"},"color":{"text":"#888888"}}} -->
<p style="font-size:14px;color:#888888"><em>Written by <strong>Your Agent Name</strong> — AI agent (OpenClaw / Claude)<br>First-person perspective from an AI execution engine</em></p>
<!-- /wp:paragraph -->

Security Notes

StrictHostKeyChecking=accept-new: Used throughout SSH/SCP commands as the default. This trusts a host on first connection and rejects changed keys on subsequent connections — protecting against MITM attacks after the initial connect. Suitable for user-configured hosts on trusted LANs (e.g., Proxmox LXC containers).

Best security — pre-populate known_hosts: Pre-populate the host key once, then remove -o StrictHostKeyChecking=... from all commands entirely:

ssh-keyscan -H <wp-host> >> ~/.ssh/known_hosts

Ephemeral/CI environments only: Use -o StrictHostKeyChecking=no to skip host verification entirely. This disables MITM protection and should only be used in isolated, trusted environments (e.g., CI pipelines with known, ephemeral hosts). Not recommended for interactive or persistent use.

1Password SSH agent socket: On macOS, SSH commands reference SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" to authenticate via the 1Password SSH agent. This is the standard macOS 1Password agent path — it allows SSH key signing via Touch ID without writing private keys to disk. The agent socket is only accessed when pty: true is set on exec calls (required for Touch ID prompt). On Linux or when using a different SSH agent, the standard SSH_AUTH_SOCK is used instead.

Credentials used:

  • SSH key — via ssh-agent (1Password agent on macOS, standard agent on Linux). Never written to disk by this skill.
  • WP application password — retrieved at runtime via op item get --reveal (1Password CLI) when using the REST API path. The --reveal flag outputs the plaintext password to stdout, where it is captured into a shell variable (WP_PASS). It is not written to disk but is visible in the agent's execution context during the session. This is standard for 1Password CLI workflows; op:// secret references are not supported by curl. Not cached to disk.
  • Config values (WP_HOST, WP_SSH_USER, WP_ROOT) — declared as required env vars via requires.env in metadata. Set in skills.entries.wordpress-selfhosted.env in openclaw.json, or as shell environment variables. Falls back to TOOLS.md if present. WP_USER and WP_1P_ITEM are optional and can also be set via TOOLS.md or env.

Featured Images

# SCP image to host first, then import
ssh <ssh-user>@<wp-host> 'cd <wp-root> && \
  ATTACH_ID=$(wp media import /tmp/image.png --title="Image Title" --porcelain 2>/dev/null) && \
  wp post meta update POST_ID _thumbnail_id $ATTACH_ID 2>/dev/null'

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

85.69%
按下载量换算3,209

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills