$npx -y skills add jezweb/claude-skills --skill wordpress-contentCreate and manage WordPress posts, pages, media, categories, tags, and menus via WP-CLI or the REST API. Use whenever the user wants to publish a blog post on WordPress, update a page, upload media, manage categories or tags, update navigation menus, schedule posts, or do bulk co
| 1 | # WordPress Content |
| 2 | |
| 3 | Create, update, and manage WordPress content — posts, pages, media, categories, tags, and menus. Produces live content on the site via WP-CLI or the REST API. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | - Working WP-CLI SSH connection or REST API credentials (use **wordpress-setup** skill) |
| 8 | - Site config from `wordpress.config.json` or `wp-cli.yml` |
| 9 | |
| 10 | ## Workflow |
| 11 | |
| 12 | ### Step 1: Determine the Operation |
| 13 | |
| 14 | | Task | Best Method | |
| 15 | |------|-------------| |
| 16 | | Create/edit single post or page | WP-CLI `wp post create/update` | |
| 17 | | Bulk create posts | WP-CLI loop or REST API batch | |
| 18 | | Upload images/media | WP-CLI `wp media import` | |
| 19 | | Manage categories/tags | WP-CLI `wp term` | |
| 20 | | Update navigation menus | WP-CLI `wp menu` | |
| 21 | | Scheduled posts | WP-CLI with `--post_date` | |
| 22 | | Complex HTML content | Write to temp file, pass to WP-CLI | |
| 23 | | No SSH access available | REST API with Application Password | |
| 24 | |
| 25 | ### Step 2: Create Content |
| 26 | |
| 27 | #### Blog Posts |
| 28 | |
| 29 | ```bash |
| 30 | # Simple post |
| 31 | wp @site post create \ |
| 32 | --post_type=post \ |
| 33 | --post_title="My New Blog Post" \ |
| 34 | --post_content="<p>Post content here.</p>" \ |
| 35 | --post_status=draft \ |
| 36 | --post_category=3,5 |
| 37 | |
| 38 | # Post from HTML file (better for long content) |
| 39 | wp @site post create ./post-content.html \ |
| 40 | --post_type=post \ |
| 41 | --post_title="My New Blog Post" \ |
| 42 | --post_status=draft \ |
| 43 | --post_excerpt="A brief summary of the post." \ |
| 44 | --post_category=3,5 \ |
| 45 | --tags_input="tag1,tag2" |
| 46 | ``` |
| 47 | |
| 48 | **Post statuses**: `draft`, `publish`, `pending`, `future` (use with `--post_date`) |
| 49 | |
| 50 | #### Pages |
| 51 | |
| 52 | ```bash |
| 53 | wp @site post create \ |
| 54 | --post_type=page \ |
| 55 | --post_title="About Us" \ |
| 56 | --post_content="<h2>Our Story</h2><p>Content here...</p>" \ |
| 57 | --post_status=publish \ |
| 58 | --post_parent=0 \ |
| 59 | --menu_order=10 |
| 60 | ``` |
| 61 | |
| 62 | #### Scheduled Posts |
| 63 | |
| 64 | ```bash |
| 65 | wp @site post create \ |
| 66 | --post_type=post \ |
| 67 | --post_title="Scheduled Post" \ |
| 68 | --post_content="<p>This goes live tomorrow.</p>" \ |
| 69 | --post_status=future \ |
| 70 | --post_date="2026-02-23 09:00:00" |
| 71 | ``` |
| 72 | |
| 73 | ### Step 3: Upload Media |
| 74 | |
| 75 | ```bash |
| 76 | # Upload from URL |
| 77 | wp @site media import "https://example.com/image.jpg" \ |
| 78 | --title="Product Photo" \ |
| 79 | --alt="Product front view" \ |
| 80 | --caption="Our latest product" |
| 81 | |
| 82 | # Upload from local file (requires SCP first for remote sites) |
| 83 | scp ./image.jpg user@host:/tmp/image.jpg |
| 84 | wp @site media import /tmp/image.jpg --title="Local Upload" |
| 85 | |
| 86 | # Import and set as featured image in one step |
| 87 | wp @site media import "https://example.com/hero.jpg" \ |
| 88 | --title="Hero" --featured_image --post_id={id} |
| 89 | |
| 90 | # List media |
| 91 | wp @site post list --post_type=attachment --fields=ID,post_title,guid |
| 92 | |
| 93 | # Regenerate thumbnails |
| 94 | wp @site media regenerate --yes |
| 95 | ``` |
| 96 | |
| 97 | **Set featured image on a post**: |
| 98 | |
| 99 | ```bash |
| 100 | # Get the attachment ID from the import output, then: |
| 101 | wp @site post meta update {post_id} _thumbnail_id {attachment_id} |
| 102 | ``` |
| 103 | |
| 104 | ### Step 4: Manage Taxonomy |
| 105 | |
| 106 | #### Categories |
| 107 | |
| 108 | ```bash |
| 109 | # List categories |
| 110 | wp @site term list category --fields=term_id,name,slug,count |
| 111 | |
| 112 | # Create category |
| 113 | wp @site term create category "News" --slug=news --description="Company news and updates" |
| 114 | |
| 115 | # Create child category |
| 116 | wp @site term create category "Product News" --slug=product-news --parent=5 |
| 117 | |
| 118 | # Update category |
| 119 | wp @site term update category {term_id} --name="Updated Name" |
| 120 | |
| 121 | # Assign category to post |
| 122 | wp @site post term add {post_id} category news |
| 123 | ``` |
| 124 | |
| 125 | #### Tags |
| 126 | |
| 127 | ```bash |
| 128 | # List tags |
| 129 | wp @site term list post_tag --fields=term_id,name,slug,count |
| 130 | |
| 131 | # Create tag |
| 132 | wp @site term create post_tag "new-tag" |
| 133 | |
| 134 | # Add tags during post creation |
| 135 | wp @site post create --post_title="..." --tags_input="seo,marketing,tips" |
| 136 | |
| 137 | # Add tags to existing post |
| 138 | wp @site post term add {post_id} post_tag seo marketing tips |
| 139 | ``` |
| 140 | |
| 141 | ### Step 5: Manage Menus |
| 142 | |
| 143 | ```bash |
| 144 | # List menus |
| 145 | wp @site menu list --fields=term_id,name,slug,count |
| 146 | |
| 147 | # List items in a menu |
| 148 | wp @site menu item list main-menu --fields=db_id,type,title,link,position |
| 149 | |
| 150 | # Add page to menu |
| 151 | wp @site menu item add-post main-menu {page_id} --title="About Us" |
| 152 | |
| 153 | # Add custom link |
| 154 | wp @site menu item add-custom main-menu "Contact" "https://example.com/contact/" |
| 155 | |
| 156 | # Add category archive to menu |
| 157 | wp @site menu item add-term main-menu category {term_id} |
| 158 | |
| 159 | # Reorder (set position) |
| 160 | wp @site menu item update {item_id} --position=3 |
| 161 | |
| 162 | # Delete menu item |
| 163 | wp @site menu item delete {item_id} |
| 164 | ``` |
| 165 | |
| 166 | ### Step 6: Update Existing Content |
| 167 | |
| 168 | ```bash |
| 169 | # Update post title and content |
| 170 | wp @site post update {post_id} \ |
| 171 | --post_title="Updated Title" \ |
| 172 | --post_content="<p>New content.</p>" |
| 173 | |
| 174 | # Update from file |
| 175 | wp @site post update {post_id} ./updated-content.html |
| 176 | |
| 177 | # Search posts |
| 178 | wp @site post list --s="search term" --fields=ID,post_title |
| 179 | |
| 180 | # Bulk update status |
| 181 | wp @site post lis |