Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

wordpress

БесплатноБез исполняемых скриптовНе проверен

WordPress is an open-source CMS for websites, blogs and online stores, extended with themes, plugins and a REST API. Use when installing or scripting…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

WordPress

Overview

WordPress is a PHP/MySQL (or MariaDB) CMS. Content is stored as posts of a type (post, page, or a custom post type), shaped by a theme and extended by plugins. Modern themes are block themes: HTML templates built from blocks plus a theme.json file for design settings. The REST API lives at /wp-json/wp/v2/ and powers both the editor and headless frontends. wp (WP-CLI) scripts installs, content, users, plugins and database tasks. Check the current version with wp core version and the plugin pages before pinning anything.

Instructions

Run a local site

docker network create harbor-net
docker run -d --name harbor-db --network harbor-net \
  -e MARIADB_ROOT_PASSWORD="$DB_ROOT_PASSWORD" -e MARIADB_DATABASE=wordpress \
  -e MARIADB_USER=wp -e MARIADB_PASSWORD="$DB_PASSWORD" mariadb:11
docker run -d --name harbor-wp --network harbor-net -p 127.0.0.1:8080:80 \
  -e WORDPRESS_DB_HOST=harbor-db -e WORDPRESS_DB_USER=wp \
  -e WORDPRESS_DB_PASSWORD="$DB_PASSWORD" -e WORDPRESS_DB_NAME=wordpress \
  -v harbor-html:/var/www/html wordpress:apache

WORDPRESS_DB_PASSWORD must be set for the image to write wp-config.php. Publish on 127.0.0.1 only unless the site is meant to be public.

WP-CLI

Run it as the web user (uid 33 in the official image), either on the host or with the wordpress:cli image sharing the volume:

alias wp='docker run --rm --network harbor-net --volumes-from harbor-wp --user 33:33 \
  -e WORDPRESS_DB_HOST=harbor-db -e WORDPRESS_DB_USER=wp -e WORDPRESS_DB_PASSWORD="$DB_PASSWORD" \
  -e WORDPRESS_DB_NAME=wordpress wordpress:cli wp'

wp core install --url=http://127.0.0.1:8080 --title="Harbor Coffee" \
  --admin_user=siteadmin --admin_password="$WP_ADMIN_PASSWORD" [email protected] --skip-email
wp plugin install advanced-custom-fields --activate
wp plugin list --status=active --format=csv
wp plugin update --all
wp post create --post_title="Opening hours update" --post_status=publish --porcelain   # prints the new ID
wp post meta update 4 subtitle "Now open Sundays"
wp user create editor1 [email protected] --role=editor --porcelain
wp search-replace "http://127.0.0.1:8080" "https://harborcoffee.test" --dry-run
wp db export backup.sql

On a normal install (not Docker) use wp core download, wp config create --dbname=... --dbuser=... --prompt=dbpass and wp core install. Keep passwords out of the command line: use --prompt, environment variables, or the config file. Always run search-replace with --dry-run first and back up the database before the real run.

Block theme

A block theme needs style.css (header comment: Theme Name, Version, Requires at least), theme.json, and templates/index.html; template parts go in parts/. Use "version": 3 for theme.json (WordPress 6.6+). Verified to activate as a block theme (wp_is_block_theme() returns true) and apply the palette and layout:

{
  "$schema": "https://schemas.wp.org/trunk/theme.json",
  "version": 3,
  "settings": {
    "appearanceTools": true,
    "color": {
      "palette": [
        { "slug": "primary", "color": "#6366f1", "name": "Primary" },
        { "slug": "ink", "color": "#0f172a", "name": "Ink" }
      ]
    },
    "typography": {
      "fontFamilies": [
        {
          "fontFamily": "Inter, sans-serif", "slug": "inter", "name": "Inter",
          "fontFace": [
            { "fontFamily": "Inter", "fontWeight": "400 700", "fontStyle": "normal", "fontDisplay": "swap", "src": ["file:./assets/fonts/Inter.woff2"] }
          ]
        }
      ],
      "fluid": true
    },
    "layout": { "contentSize": "720px", "wideSize": "1200px" }
  },
  "styles": {
    "color": { "background": "#ffffff", "text": "var(--wp--preset--color--ink)" },
    "elements": { "link": { "color": { "text": "var(--wp--preset--color--primary)" } } }
  }
}

templates/index.html is block markup, for example a header part plus a query loop:

<!-- wp:template-part {"slug":"header"} /-->
<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
<main class="wp-block-group"><!-- wp:query {"queryId":1,"query":{"perPage":10,"postType":"post"}} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:post-title {"isLink":true} /--><!-- wp:post-excerpt /-->
<!-- /wp:post-template --></div>
<!-- /wp:query --></main>
<!-- /wp:group -->

Copy the folder to wp-content/themes/harbor and run wp theme activate harbor. Palette slugs become CSS variables such as --wp--preset--color--primary.

REST API and headless use

The REST API is public for published content. Pagination totals come back in the X-WP-Total and X-WP-TotalPages headers. A custom post type appears at /wp-json/wp/v2/products (the rest_base you set) only with 'show_in_rest' => true. ACF (6.x) exposes fields in an acf property natively when the field group and field have "Show in REST API" on ('show_in_rest' => 1 in code); t

Полный SKILL.md на GitHub

Установить wordpress в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл wordpress?

WordPress is an open-source CMS for websites, blogs and online stores, extended with themes, plugins and a REST API. Use when installing or scripting WordPress with WP-CLI, building a block theme with theme.json, registering custom post types or REST routes, running WordPress headless behind a Next.js frontend, or adding WooCommerce endpoints.

Как установить скилл wordpress?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл wordpress запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить wordpress с