<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: rnaga</title>
    <description>The latest articles on DEV Community by rnaga (@rnaga).</description>
    <link>https://dev.to/rnaga</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3365608%2F5a998999-ca29-47c8-ab5f-fa97a9bf2ef7.png</url>
      <title>DEV Community: rnaga</title>
      <link>https://dev.to/rnaga</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rnaga"/>
    <language>en</language>
    <item>
      <title>MCP for WordPress: Write and Publish Posts from Your AI Assistant</title>
      <dc:creator>rnaga</dc:creator>
      <pubDate>Wed, 15 Oct 2025 13:16:51 +0000</pubDate>
      <link>https://dev.to/rnaga/mcp-for-wordpress-write-and-publish-posts-from-your-ai-assistant-lmb</link>
      <guid>https://dev.to/rnaga/mcp-for-wordpress-write-and-publish-posts-from-your-ai-assistant-lmb</guid>
      <description>&lt;p&gt;I recently introduced &lt;a href="https://dev.to/rnaga/wordpress-in-typescript-build-fast-without-php-3lg4"&gt;&lt;strong&gt;wp-node&lt;/strong&gt;&lt;/a&gt;, which mirrors WordPress core data structures and CRUD operations.&lt;/p&gt;

&lt;p&gt;Building on that idea, I’ve now developed &lt;a href="https://github.com/rnaga/wp-mcp" rel="noopener noreferrer"&gt;&lt;strong&gt;wp-mcp&lt;/strong&gt;&lt;/a&gt; — a &lt;strong&gt;Model Context Protocol (MCP) server&lt;/strong&gt; for WordPress that exposes your site’s content and settings as AI-accessible primitives. With it, tools like &lt;strong&gt;Claude Desktop&lt;/strong&gt; can draft, edit, and publish posts straight into your database without touching wp-admin — &lt;strong&gt;and no PHP or traditional LAMP stack required, just pure MCP and TypeScript.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine telling Claude Desktop:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Draft a post called Exploring Headless WordPress and publish it when done.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;wp-mcp makes that possible — all through the MCP standard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdboemo5grs1khlaardnn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdboemo5grs1khlaardnn.png" alt="example prompt to publish a post" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can check out the full documentation and setup instructions in the project’s &lt;strong&gt;&lt;a href="https://github.com/rnaga/wp-mcp" rel="noopener noreferrer"&gt;README.md&lt;/a&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;If you find it useful, don’t forget to ⭐️ &lt;a href="https://github.com/rnaga/wp-mcp" rel="noopener noreferrer"&gt;&lt;strong&gt;star the repo&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;




&lt;h2&gt;
  
  
  What is wp-mcp?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;@rnaga/wp-mcp&lt;/code&gt; turns your WordPress into an &lt;strong&gt;AI-operable surface&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
It extends the TypeScript foundation of &lt;a href="https://github.com/rnaga/wp-node" rel="noopener noreferrer"&gt;&lt;code&gt;@rnaga/wp-node&lt;/code&gt;&lt;/a&gt; and ships with a rich set of &lt;strong&gt;MCP tools&lt;/strong&gt; that map directly to your WordPress database — including posts, users, comments, terms, metadata, options, and settings.&lt;/p&gt;

&lt;p&gt;Through the MCP standard, any compatible AI client (like &lt;strong&gt;Claude Desktop&lt;/strong&gt;) can perform WordPress CRUD actions — safely and capability-aware — without you writing custom endpoints or plugins.&lt;/p&gt;
&lt;h3&gt;
  
  
  Key capabilities
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Draft, revise, and publish posts&lt;/strong&gt; directly from an MCP client
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moderate comments&lt;/strong&gt; or auto-generate replies using AI
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inspect and manage users&lt;/strong&gt; with proper role and capability checks
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Work with taxonomies&lt;/strong&gt; like categories, tags, and custom terms
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read or update site options&lt;/strong&gt; and network-level settings
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Why wp-mcp?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🧩 &lt;strong&gt;TypeScript-first&lt;/strong&gt; — no PHP or traditional LAMP stack required
&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Local + Remote&lt;/strong&gt; MCP server support (STDIO and Streamable HTTP)
&lt;/li&gt;
&lt;li&gt;🔐 &lt;strong&gt;Built-in Remote Proxy&lt;/strong&gt; for clients that only support STDIO
&lt;/li&gt;
&lt;li&gt;🧠 &lt;strong&gt;Capability-aware&lt;/strong&gt; — tools filter by actual WordPress roles
&lt;/li&gt;
&lt;li&gt;🛠️ &lt;strong&gt;Extensible&lt;/strong&gt; — easily build custom primitives (tools, resources, prompts)
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;All setup goes through the &lt;strong&gt;&lt;code&gt;wp-mcp&lt;/code&gt; CLI&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
You can check available commands with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  A) Local STDIO Server
&lt;/h3&gt;

&lt;p&gt;Use this when you can connect directly to the WordPress database.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Configure database connection&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;local &lt;/span&gt;config-set
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll be prompted for host, port, database, username, and password.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set up your MCP client&lt;/strong&gt; (for example, Claude Desktop):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"wp-mcp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@rnaga/wp-mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"--"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"local"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"LOCAL_USERNAME"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"wp-admin"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;wp-admin&lt;/code&gt; with your WordPress username.&lt;br&gt;&lt;br&gt;
Restart Claude Desktop, and you’ll see WordPress tools appear under the MCP panel.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Inspect available primitives&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; utils list-prims
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This shows which MCP tools your WordPress role can use (create posts, manage users, etc.).&lt;/p&gt;


&lt;h3&gt;
  
  
  B) Streamable Remote HTTP Server
&lt;/h3&gt;

&lt;p&gt;Use this when you need to share access or host your MCP server remotely.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scaffold the project&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; http init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This generates an Express-based TypeScript project with all boilerplate in place.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run in development&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Build and start in production&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
npm run start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The HTTP transport supports &lt;strong&gt;streaming MCP&lt;/strong&gt; and &lt;strong&gt;SSE fallback&lt;/strong&gt;, with built-in OAuth and Application Password authentication.&lt;/p&gt;


&lt;h2&gt;
  
  
  Remote Proxy Mode
&lt;/h2&gt;

&lt;p&gt;If your MCP client doesn’t fully support &lt;strong&gt;OAuth authentication&lt;/strong&gt; or &lt;strong&gt;Streamable HTTP&lt;/strong&gt;, you can use the &lt;strong&gt;proxy&lt;/strong&gt;. It acts as a &lt;strong&gt;local STDIO server&lt;/strong&gt; while securely forwarding requests to the remote HTTP endpoint.&lt;br&gt;&lt;br&gt;
This is especially helpful for clients like &lt;strong&gt;Claude Desktop&lt;/strong&gt;, where HTTP connections are available only in the paid tier or OAuth support is limited.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqozrxe9nk1052ed88uad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqozrxe9nk1052ed88uad.png" alt="Diagram Remote Proxy" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  1) Authenticate
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;WordPress Application Password:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; remote login password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;OAuth Device Flow:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; remote login oauth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Credentials are stored securely in &lt;code&gt;~/.wp-mcp&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
You can inspect them later with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; remote config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2) Start the Proxy
&lt;/h3&gt;

&lt;p&gt;In your Claude Desktop config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"wp-mcp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@rnaga/wp-mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"--"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"remote"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"proxy"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"REMOTE_AUTH_TYPE"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"oauth"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"REMOTE_URL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://wp-mcp.example.com/mcp"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your MCP client connects locally, and the proxy securely forwards every request to the remote server.&lt;/p&gt;




&lt;h2&gt;
  
  
  Building Custom MCP Primitives
&lt;/h2&gt;

&lt;p&gt;You can extend wp-mcp with your own MCP primitives — tools, resources, or prompts — using decorators.&lt;/p&gt;

&lt;h3&gt;
  
  
  1) Scaffold your project
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Local (STDIO)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;local &lt;/span&gt;init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Remote (HTTP)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; http init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2) Add a primitive class
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;src/example-suite.mcp.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;mcp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;mcpBind&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@rnaga/wp-mcp/decorators&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Mcps&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@rnaga/wp-mcp/mcp&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;types&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@rnaga/wp-mcp/types&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;mcp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;example_suite&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Example bundle showing tools, resources, and prompts.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ExampleSuiteMcp&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;mcpBind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;example_tool&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;List Options&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Return the WordPress options table as JSON.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;capabilities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;read&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="nf"&gt;example&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;types&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;McpBindParameters&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;registerTool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Mcps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getWpContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;wp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;utils&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crud&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAll&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3) Register it in your entry point
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Local STDIO:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createLocalServer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@rnaga/wp-mcp/cli/local&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ExampleSuiteMcp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./example-suite.mcp&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mcpServer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;createLocalServer&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LOCAL_USERNAME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;mcps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;ExampleSuiteMcp&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Remote HTTP:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;MemoryCache&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@rnaga/wp-mcp/http/cache/memory-cache&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createHttpServer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@rnaga/wp-mcp/http/express&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ExampleSuiteMcp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./example-suite.mcp&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createHttpServer&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;cacheClass&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;MemoryCache&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;mcps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;ExampleSuiteMcp&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart your server, and your custom tools appear instantly in your MCP client.&lt;/p&gt;




&lt;h2&gt;
  
  
  In Summary
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;wp-mcp&lt;/strong&gt; bridges WordPress and AI clients through the &lt;strong&gt;Model Context Protocol&lt;/strong&gt;, letting you manage, create, and publish WordPress content without touching PHP or wp-admin.  &lt;/p&gt;

&lt;p&gt;✅ Works with &lt;strong&gt;Local STDIO&lt;/strong&gt; and &lt;strong&gt;Remote Streamable HTTP&lt;/strong&gt; servers&lt;br&gt;&lt;br&gt;
✅ Includes a &lt;strong&gt;Remote Proxy&lt;/strong&gt; for STDIO-only clients&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Extensible&lt;/strong&gt; through custom primitives&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Built on TypeScript&lt;/strong&gt; — no PHP, no LAMP stack  &lt;/p&gt;




&lt;h3&gt;
  
  
  Quick Start Recap
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Configure local STDIO server&lt;/span&gt;
npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;local &lt;/span&gt;config-set

&lt;span class="c"&gt;# Start locally&lt;/span&gt;
npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;local &lt;/span&gt;start

&lt;span class="c"&gt;# Scaffold remote HTTP server&lt;/span&gt;
npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; http init

&lt;span class="c"&gt;# Authenticate for remote proxy&lt;/span&gt;
npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; remote login oauth
npx @rnaga/wp-mcp &lt;span class="nt"&gt;--&lt;/span&gt; remote proxy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With &lt;strong&gt;wp-mcp&lt;/strong&gt;, WordPress becomes a seamless extension of your AI assistant — ready to draft, edit, and publish at your command.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>wordpress</category>
      <category>typescript</category>
      <category>mcp</category>
    </item>
    <item>
      <title>WP-Next: A Headless WordPress Admin Built with Next.js (No PHP Required)</title>
      <dc:creator>rnaga</dc:creator>
      <pubDate>Tue, 26 Aug 2025 15:02:00 +0000</pubDate>
      <link>https://dev.to/rnaga/wp-next-a-headless-wordpress-admin-built-with-nextjs-and-typescript-583n</link>
      <guid>https://dev.to/rnaga/wp-next-a-headless-wordpress-admin-built-with-nextjs-and-typescript-583n</guid>
      <description>&lt;p&gt;Tired of the classic, PHP-bound WordPress admin? &lt;a href="https://github.com/rnaga/wp-next" rel="noopener noreferrer"&gt;&lt;strong&gt;WP-Next&lt;/strong&gt;&lt;/a&gt; reimagines it with a modern stack. Built entirely with &lt;strong&gt;Next.js&lt;/strong&gt; and &lt;strong&gt;WP-Node&lt;/strong&gt;, WP-Next delivers a &lt;strong&gt;headless CMS&lt;/strong&gt; experience for managing posts, pages, media, comments, users, and more—&lt;strong&gt;without writing any PHP&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;👉 Check out the repo here: &lt;a href="https://github.com/rnaga/wp-next" rel="noopener noreferrer"&gt;https://github.com/rnaga/wp-next&lt;/a&gt; — and don’t forget to &lt;strong&gt;leave a star&lt;/strong&gt; if you find it useful! ⭐  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://vimeo.com/1112693769?share=copy#t=0" rel="noopener noreferrer" alt="WP-Next Admin"&gt;&lt;br&gt;
  &lt;img alt="dashboard-vimeo" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flv8h0p7va0yn2hteobln.png" width="800" height="466"&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Under the hood, WP-Next uses &lt;strong&gt;Next.js Server Functions&lt;/strong&gt; (powered by &lt;a href="https://github.com/rnaga/wp-node" rel="noopener noreferrer"&gt;&lt;strong&gt;WP-Node&lt;/strong&gt;&lt;/a&gt;) to interact with your WordPress database. That means a clean, React-first workflow in &lt;strong&gt;TypeScript&lt;/strong&gt;, server-side data handling, and a development process that feels just like building any modern Next.js app.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it stands out&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Headless by design:&lt;/strong&gt; Manage WordPress content with a React-powered admin.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next.js + TypeScript:&lt;/strong&gt; Familiar tools for building, extending, and customizing.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WP-Node integration:&lt;/strong&gt; Direct access to WordPress data through Node.js.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No PHP required:&lt;/strong&gt; Everything runs in JavaScript/TypeScript, front to back.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With WP-Next, you keep WordPress’s proven content model while gaining the speed and flexibility of a Next.js application. &lt;/p&gt;
&lt;h2&gt;
  
  
  Quick Demo
&lt;/h2&gt;

&lt;p&gt;The fastest way to try out &lt;a href="https://github.com/rnaga/wp-next" rel="noopener noreferrer"&gt;WP-Next&lt;/a&gt; is by running the prebuilt demo image with Docker.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;--init&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; wp-next-example &lt;span class="nt"&gt;-p&lt;/span&gt; 3000:3000 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; wp-next-example_public:/app/admin/public &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; wp-next-example_db:/var/lib/mysql &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; wp-next-example_html:/app/html &lt;span class="se"&gt;\&lt;/span&gt;
  rnagat/wp-next-example:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the container is running, open &lt;a href="http://localhost:3000/admin" rel="noopener noreferrer"&gt;http://localhost:3000/admin&lt;/a&gt; in your browser and log in with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Username: wp  
Password: wp  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you’re done, you can stop and remove the running container with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker stop wp-next-example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Admin Dashboard
&lt;/h2&gt;

&lt;p&gt;The main feature of WP-Next is the &lt;strong&gt;Admin Dashboard&lt;/strong&gt;—a headless CMS that serves as a modern alternative to the traditional WordPress Admin Dashboard.  &lt;/p&gt;

&lt;p&gt;Out of the box, it includes:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Posts &amp;amp; Pages&lt;/strong&gt; – create, edit, and manage content
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Media&lt;/strong&gt; – upload and organize images, videos, and files
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terms&lt;/strong&gt; – categories, tags, and other taxonomies
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comments&lt;/strong&gt; – moderate and manage discussions
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Profile &amp;amp; Settings&lt;/strong&gt; – manage user profiles and account preferences
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Users and Roles&lt;/strong&gt; – add, edit, and assign capabilities
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Revisions&lt;/strong&gt; – track and roll back content changes
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;WP-Next also supports &lt;strong&gt;multi-site / multi-network mode&lt;/strong&gt;, enabling you to manage multiple WordPress sites from the same admin interface:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sites&lt;/strong&gt; – manage and configure multiple sites in one network
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blogs&lt;/strong&gt; – per-site content such as posts, media, and comments
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Notes
&lt;/h3&gt;

&lt;p&gt;Since WP-Next is fully written in &lt;strong&gt;TypeScript&lt;/strong&gt; and &lt;strong&gt;React&lt;/strong&gt;, certain WordPress features are &lt;strong&gt;not supported&lt;/strong&gt;, including:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WordPress Themes and appearance settings
&lt;/li&gt;
&lt;li&gt;WordPress Block Editor (Gutenberg)
&lt;/li&gt;
&lt;li&gt;WordPress template rendering APIs
&lt;/li&gt;
&lt;li&gt;WordPress plugins
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Core Libraries
&lt;/h2&gt;

&lt;p&gt;WP-Next is built on top of a modern TypeScript and React ecosystem. Its core dependencies include:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/rnaga/wp-node" rel="noopener noreferrer"&gt;&lt;code&gt;@rnaga/wp-node&lt;/code&gt;&lt;/a&gt; — TypeScript-first WordPress database integration.
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;&lt;code&gt;next&lt;/code&gt;&lt;/a&gt; — Next.js framework providing SSR, routing, and server functions.
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://mui.com/" rel="noopener noreferrer"&gt;&lt;code&gt;@mui/material&lt;/code&gt;&lt;/a&gt; — Material UI component library for building the admin interface.
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tiptap.dev/" rel="noopener noreferrer"&gt;&lt;code&gt;@tiptap/react&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/sjdemartini/mui-tiptap" rel="noopener noreferrer"&gt;&lt;code&gt;mui-tiptap&lt;/code&gt;&lt;/a&gt; — TipTap rich-text editor with Material UI integration.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hooks (Filter and Action)
&lt;/h2&gt;

&lt;p&gt;WP-Next uses the &lt;a href="https://rnaga.github.io/wp-node/docs/concepts-features/hooks" rel="noopener noreferrer"&gt;WP-Node hook system&lt;/a&gt;, which is inspired by WordPress hooks but designed for &lt;strong&gt;TypeScript&lt;/strong&gt; and &lt;strong&gt;Node.js&lt;/strong&gt;. It supports both &lt;strong&gt;filters&lt;/strong&gt; (for transforming data) and &lt;strong&gt;actions&lt;/strong&gt; (for running side effects).  &lt;/p&gt;

&lt;p&gt;Because WP-Node is TypeScript-first, hooks are:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type-safe&lt;/strong&gt; — strongly typed signatures for safer extension.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Asynchronous filters&lt;/strong&gt; — filters can be &lt;code&gt;async&lt;/code&gt; and return transformed data.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Actions as events&lt;/strong&gt; — actions are built on top of Node.js &lt;code&gt;EventEmitter&lt;/code&gt; and are used to trigger side effects.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Independent of PHP&lt;/strong&gt; — not directly compatible with WordPress core hooks.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key points:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Filters&lt;/strong&gt;: transform and return data; may be async.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Actions&lt;/strong&gt;: perform side effects and do not return data.
&lt;/li&gt;
&lt;li&gt;Hooks can be registered either with &lt;strong&gt;TypeScript decorators&lt;/strong&gt; (for static / lifecycle hooks) or with the &lt;strong&gt;HookCommand utilities&lt;/strong&gt; (for runtime / dynamic hooks).
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more details about hooks, how they work, and usage examples, see the WP-Node hooks documentation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rnaga.github.io/wp-node/docs/concepts-features/hooks" rel="noopener noreferrer"&gt;https://rnaga.github.io/wp-node/docs/concepts-features/hooks&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Frontend vs Backend Hooks
&lt;/h3&gt;

&lt;p&gt;When initialized, WP-Next generates a &lt;code&gt;_wp/hooks&lt;/code&gt; directory where you can add your own hooks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hooks/
├── client
│   └── index.tsx
└── server
    ├── admin-media.hook.ts
    ├── index.ts
    ├── nextauth-providers.hook.ts
    └── notifications.hook.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Frontend Hooks
&lt;/h4&gt;

&lt;p&gt;Frontend hooks (under &lt;code&gt;_wp/hooks/client/&lt;/code&gt;) are bundled into the Admin UI and run in the browser.&lt;br&gt;&lt;br&gt;
Use them for UI extensions such as:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding sidebar menus
&lt;/li&gt;
&lt;li&gt;Registering custom admin pages
&lt;/li&gt;
&lt;li&gt;Applying client-side theming
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚠️ Frontend hooks must only contain &lt;strong&gt;client-safe code&lt;/strong&gt; (no filesystem access, no env secrets, no server-only APIs).  &lt;/p&gt;

&lt;h4&gt;
  
  
  Backend Hooks
&lt;/h4&gt;

&lt;p&gt;Backend hooks (under &lt;code&gt;_wp/hooks/server/&lt;/code&gt;) run on the server-side application.&lt;br&gt;&lt;br&gt;
Use them for responsibilities like:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Media upload handling
&lt;/li&gt;
&lt;li&gt;Authentication providers (e.g., NextAuth integration)
&lt;/li&gt;
&lt;li&gt;Email sending
&lt;/li&gt;
&lt;li&gt;Other Node.js integrations requiring credentials or server APIs
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;WP-Next brings the familiar power of WordPress into a &lt;strong&gt;Next.js + TypeScript&lt;/strong&gt; world, giving developers a modern, headless CMS dashboard without the need to work in PHP. With support for posts, pages, media, users, revisions, and even multi-site networks, it provides a solid foundation for building custom admin experiences.  &lt;/p&gt;

&lt;p&gt;If you’d like to explore further:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⭐ Star the repo on GitHub: &lt;a href="https://github.com/rnaga/wp-next" rel="noopener noreferrer"&gt;https://github.com/rnaga/wp-next&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📖 View &lt;a href="https://rnaga.github.io/wp-next/" rel="noopener noreferrer"&gt;Full Documentation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Give the quick demo a try, experiment with hooks, and see how WP-Next can fit into your workflow. This is just the beginning — the project will continue to evolve, and community feedback will help shape its future.  &lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>wordpress</category>
      <category>webdev</category>
      <category>react</category>
    </item>
    <item>
      <title>WordPress in TypeScript — Build Fast Without PHP</title>
      <dc:creator>rnaga</dc:creator>
      <pubDate>Fri, 18 Jul 2025 15:30:00 +0000</pubDate>
      <link>https://dev.to/rnaga/wordpress-in-typescript-build-fast-without-php-3lg4</link>
      <guid>https://dev.to/rnaga/wordpress-in-typescript-build-fast-without-php-3lg4</guid>
      <description>&lt;p&gt;WP-Node lets you work directly with your WordPress data — using modern TypeScript and Node.js. No PHP. No WordPress runtime. Just clean APIs for querying posts, users, terms, and metadata, backed by a powerful CLI.&lt;/p&gt;

&lt;p&gt;Whether you're building automation scripts, developer tools, or headless apps, WP-Node gives you the flexibility of Node with the structure of WordPress.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/rnaga/wp-node" rel="noopener noreferrer"&gt;&lt;strong&gt;View on GitHub&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🧩 When You Just Want to Work with WordPress Data
&lt;/h3&gt;

&lt;p&gt;WordPress is one of the most widely used CMS platforms, but its all-in-one architecture often gets in the way for developers who just need to work with the data.&lt;/p&gt;

&lt;p&gt;Out of the box, WordPress includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A full PHP runtime
&lt;/li&gt;
&lt;li&gt;Gutenberg block editor
&lt;/li&gt;
&lt;li&gt;Admin UI and themes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While this is great for editors and site owners, it can feel heavy when you're focused purely on backend or integration work.&lt;/p&gt;

&lt;h4&gt;
  
  
  Common developer tasks that are harder than they need to be:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;🧱 &lt;strong&gt;Running &lt;code&gt;wp-cli&lt;/code&gt; to inspect data&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Requires a full WordPress environment, PHP setup, and deep knowledge of WordPress internals — even for simple scripting tasks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;🪵 &lt;strong&gt;Navigating WordPress database by hand&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You need to understand internal SQL schema and join behavior — with no typing or IDE support.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;🌐 &lt;strong&gt;Building modern apps (e.g., Next.js, NestJS for REST API)&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;You’re stuck either querying MySQL directly or proxying through REST endpoints from WordPress.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🚀 Meet WP-Node
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;WP-Node&lt;/strong&gt; is a TypeScript toolkit that lets you interact with your WordPress database directly — without booting up WordPress or writing a single line of PHP.&lt;/p&gt;

&lt;p&gt;It gives you a clean, fully-typed interface for querying, inspecting, and manipulating WordPress data using modern Node.js workflows.&lt;/p&gt;

&lt;h4&gt;
  
  
  🧪 Example: Fetch a Post by ID
&lt;/h4&gt;

&lt;p&gt;With WP-Node, querying WordPress content is straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Application&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@rnaga/wp-node/application&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Initialize WP-Node application&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Application&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="c1"&gt;// Fetch a post with ID 1&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;wp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;utils&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ID&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No WordPress bootstrap, no wp-load.php — just clean, TypeScript-native access to your content.&lt;/p&gt;

&lt;h4&gt;
  
  
  🔧 Key features:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Query core tables like &lt;code&gt;posts&lt;/code&gt;, &lt;code&gt;users&lt;/code&gt;, &lt;code&gt;terms&lt;/code&gt;, &lt;code&gt;comments&lt;/code&gt;, and &lt;code&gt;meta&lt;/code&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typed utility classes&lt;/strong&gt; for common patterns like post &amp;amp; meta access, term relationships&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI-first mindset&lt;/strong&gt; comes with built-in CLI commands and makes it easy to define your own custom scripts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No WordPress runtime required&lt;/strong&gt; — Doesn’t depend on PHP, themes, plugins, or WordPress bootstrap. Just point it at your existing database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern architecture&lt;/strong&gt; with decorators and dependency injection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript + &lt;a href="https://knexjs.org/" rel="noopener noreferrer"&gt;Knex.js&lt;/a&gt; + &lt;a href="https://zod.dev/" rel="noopener noreferrer"&gt;Zod&lt;/a&gt;&lt;/strong&gt; for type-safe, validated, and fluent database access using a modern query builder.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🛠️ Use it for things like:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Running cleanup scripts on postmeta&lt;/li&gt;
&lt;li&gt;Building internal admin tools&lt;/li&gt;
&lt;li&gt;Creating custom CLI commands (e.g. sync-users, seed-posts)&lt;/li&gt;
&lt;li&gt;Integrating with modern apps (Next.js, NestJS, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;WP-Node focuses on what developers care about: structured data access, automation, and developer experience — without the bloat.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚙️ Getting Started
&lt;/h3&gt;

&lt;p&gt;WP-Node lets you build apps and scripts on top of WordPress data using only Node.js and TypeScript — no WordPress PHP runtime required. Follow these steps to get up and running.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Prerequisites
&lt;/h4&gt;

&lt;p&gt;WP-Node requires a MySQL-compatible WordPress database. You can use your existing WordPress setup, or spin up a new one using Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker network create wpnet &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; wpdb &lt;span class="nt"&gt;--network&lt;/span&gt; wpnet &lt;span class="nt"&gt;-p&lt;/span&gt; 33306:3306 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;MYSQL_ROOT_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;example &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;MYSQL_DATABASE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wordpress &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;MYSQL_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wp &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;MYSQL_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wp &lt;span class="se"&gt;\&lt;/span&gt;
  mariadb &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; wp &lt;span class="nt"&gt;--network&lt;/span&gt; wpnet &lt;span class="nt"&gt;-p&lt;/span&gt; 8080:80 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;WORDPRESS_DB_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wpdb:3306 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;WORDPRESS_DB_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wp &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;WORDPRESS_DB_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wp &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;WORDPRESS_DB_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wordpress &lt;span class="se"&gt;\&lt;/span&gt;
  wordpress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then visit &lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt; to complete WordPress setup.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Initialize WP‑Node Project
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;wp-node
&lt;span class="nb"&gt;cd &lt;/span&gt;wp-node
npx @rnaga/wp-node-cli &lt;span class="nt"&gt;--&lt;/span&gt; init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow the prompts to enter your database settings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;✔ Enter your database &lt;span class="nb"&gt;hostname&lt;/span&gt;: · localhost
✔ Enter your database port: · 33306
✔ Enter your database username: · wp
✔ Enter your database password: · &lt;span class="k"&gt;**&lt;/span&gt;
✔ Enter your database name: · wordpress
✔ Is it a multi-site? · No
✔ Enter your static assets path: · public
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Project Structure
&lt;/h5&gt;

&lt;p&gt;After initialization, your project will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./
├── _wp
│   ├── config
│   │   ├── index.d.ts
│   │   └── wp.json
│   └── settings.ts
├── .env
├── index.ts
├── package-lock.json
├── package.json
└── tsconfig.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h6&gt;
  
  
  Key files
&lt;/h6&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;_wp/config/wp.json&lt;/code&gt;: Holds configuration for WP-Node such as public path and multisite info. This file is imported by settings.ts.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;_wp/settings.ts&lt;/code&gt;: Initializes the WP-Node Context, including config, database access and hooks.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;index.ts&lt;/code&gt;: The main entry point for your WP-Node app. A basic sample is provided.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.env&lt;/code&gt;: Stores sensitive environment variables, including your database credentials and other configuration values required at runtime.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Run the App
&lt;/h4&gt;

&lt;p&gt;Once the config is initialized, run the app using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mvn use 22
npx ts-node ./index.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything is working correctly, you’ll see SQL output like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; from &lt;span class="sb"&gt;`&lt;/span&gt;wp_posts&lt;span class="sb"&gt;`&lt;/span&gt; as &lt;span class="sb"&gt;`&lt;/span&gt;posts_5&lt;span class="sb"&gt;`&lt;/span&gt; where &lt;span class="sb"&gt;`&lt;/span&gt;posts_5&lt;span class="sb"&gt;`&lt;/span&gt;.&lt;span class="sb"&gt;`&lt;/span&gt;ID&lt;span class="sb"&gt;`&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; 1
&lt;span class="o"&gt;[&lt;/span&gt;
  &lt;span class="o"&gt;{&lt;/span&gt;
    ID: 1,
    post_author: 1,
    post_title: &lt;span class="s1"&gt;'Hello world!'&lt;/span&gt;,
    ...
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  6. Use the CLI (Alternative)
&lt;/h4&gt;

&lt;p&gt;You can also use the built-in CLI to query data without writing code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-node-cli &lt;span class="nt"&gt;--&lt;/span&gt; post get 1 &lt;span class="nt"&gt;-Z&lt;/span&gt; table &lt;span class="nt"&gt;-F&lt;/span&gt; ID,post_title,post_type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;┌────────────┬────────────────┐
│ &lt;span class="o"&gt;(&lt;/span&gt;index&lt;span class="o"&gt;)&lt;/span&gt;    │ Values         │
├────────────┼────────────────┤
│ ID         │ 1              │
│ post_title │ &lt;span class="s1"&gt;'Hello world!'&lt;/span&gt; │
│ post_type  │ &lt;span class="s1"&gt;'post'&lt;/span&gt;         │
└────────────┴────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;npx @rnaga/wp-node-cli -- -h&lt;/code&gt; to discover all available commands&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @rnaga/wp-node-cli &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;

Usage: &amp;lt;&lt;span class="nb"&gt;command&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &amp;lt;subcommand&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;options]

Commands:
   blog             Blog commands
   comment          Comment commands
   config           Generate WP config files
   init             Initialize WP with Node. &lt;span class="o"&gt;(&lt;/span&gt;Generate wp.json and &lt;span class="nb"&gt;install &lt;/span&gt;dependencies&lt;span class="o"&gt;)&lt;/span&gt;
   &lt;span class="nb"&gt;install          &lt;/span&gt;Initialize a new blog and create a user
   meta             Meta commands &lt;span class="o"&gt;(&lt;/span&gt;post, comment, blog, term, user, site&lt;span class="o"&gt;)&lt;/span&gt;
   option           Options commands
   post             Post commands
   repl             Start a REPL
   role             Role commands
   site             Site commands
   term             Term commands
   user             User commands
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ⭐️ Conclusion
&lt;/h3&gt;

&lt;p&gt;WP-Node gives developers a modern, TypeScript-first way to interact with WordPress data — no PHP, no themes, and no plugin overhead. Whether you're building a script, a custom CLI, or a backend service, WP-Node makes it fast and developer-friendly.&lt;/p&gt;

&lt;p&gt;If you found this project useful, please consider giving it a ⭐️ on GitHub:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/rnaga/wp-node" rel="noopener noreferrer"&gt;https://github.com/rnaga/wp-node&lt;/a&gt;&lt;br&gt;
👉 &lt;strong&gt;Documentation&lt;/strong&gt; &lt;a href="https://rnaga.github.io/wp-node/docs/intro" rel="noopener noreferrer"&gt;https://rnaga.github.io/wp-node/docs/intro&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your support helps others discover the project and keeps the development going!&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>typescript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
