PHP Classes

How to Use an Alternative WordPress Management System Using the Package QuickWP: Manage WordPress sites using the REST API

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2026-12-05 (12 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
quickwp 2.0MIT/X Consortium ...8Tools, Systems administration, Conten..., B..., P...
Description 

Author

This package can manage WordPress sites using the REST API.

It provides an alternative Web application that can perform several types of operations with WordPress sites by sending HTTP requests to the REST API of a WordPress site installation.

Currently, this Web application can manage WordPress posts, pages, media, custom posts, categories and tags.

Innovation Award
PHP Programming Innovation award nominee
January 2026
Number 3
WordPress is a popular content management system that lets administrator users perform many types of administrative actions.

Some people do not like the current WordPress administration pages.

This package provides an alternative WordPress administration pages that can work with WordPress installation by using WordPress REST API.

Manuel Lemos
Picture of Adrian M
  Performance   Level  
Name: Adrian M <contact>
Classes: 6 packages by
Country: Ireland Ireland
Innovation award
Innovation award
Nominee: 1x

 

Instructions

Details

QuickWP ? WordPress REST API Toolkit (v3)

PHP Version License Packagist

QuickWP is a zero-dependency PHP 8.3+ toolkit, multi-site CLI, MCP server, and lightweight editorial web console for managing WordPress sites via the REST API.

? Installation

composer require bitshost/quickwp

Or clone the repository and install dev tools:

git clone https://github.com/bitshost/quickwp.git
cd quickwp
composer install

? Requirements

  • PHP 8.3+ with `ext-curl` and `ext-json`
  • WordPress site with REST API enabled (WordPress 5.6+ for Application Passwords; 5.9+ for Menus API)

? Features

  • Clean OOP SDK (src/) ? PSR-4 autoloaded services (`AbstractService`, `RestClientInterface`) with retry/backoff (`429`/`5xx`) and automatic pagination (`listAll()`).
  • Multi-Site Native ? Manage multiple WordPress sites (`quick-sites.php`) from a single installation via SDK, Web UI, CLI, or MCP.
  • Full WordPress Resource Coverage ? Posts, Pages, Custom Post Types, Media (web & local disk upload), Taxonomies, Menus, Templates, Users, Comments, Health Diagnostics, ACF/Meta fields, and Cross-Site Sync.
  • Multi-Site CLI (bin/quickwp) ? `site:list`, `site:check --all`, `post:list`, `post:create --file=article.md`, `media:upload`, `export`, `sync`, and `ai:draft` with global `--json` output.
  • Outbound Webhooks ? Optional HMAC-SHA256 signed event notifications (`post.published`, `page.published`, `*`) for n8n, Make, Zapier, Slack, Telegram, or social automation.
  • Local MCP Server (bin/quickwp-mcp) ? Native JSON-RPC 2.0 `stdio` server exposing 11 draft-first WordPress tools to Antigravity, Claude Desktop, or Cursor without putting credentials in prompts.
  • AI Concierge (Optional, Multilanguage) ? Provider-agnostic (`Gemini`, `OpenAI`, or local `Ollama`, with automatic Google AI Studio / Vertex Express routing) voice/text draft generator and existing Post/Page refiner (`draft_copy` / `update` / `preview`) with Type/Status filters and strict draft-first workflow.
  • Lightweight Editorial Web UI (public/) ? Zero-build vanilla JS HTML toolbar with Write/Split/Preview, visual Media Picker modal, Recent Drafts review card with 1-click Publish, Quick Edit live title search + Status filter, Schedule/Author/Sticky/ACF controls, Menus, Comments, zero-dependency UI i18n (EN / RO switcher), CSRF protection, and hardened `AccessControl`.

? Project Structure

QuickWP/
??? bin/
?   ??? quickwp                   # Multi-site CLI tool
?   ??? quickwp-mcp               # Local MCP stdio server for AI agents / IDEs
??? src/                          # Core library (PSR-4: QuickWP\)
?   ??? QuickWP.php               # Main facade
?   ??? Bootstrap.php             # Service factory
?   ??? Ai/
?   ?   ??? AiConciergeService.php # Multilingual draft-first AI Concierge
?   ??? Cli/
?   ?   ??? Application.php       # CLI command runner
?   ??? Config/
?   ?   ??? Config.php            # Immutable config wrapper
?   ?   ??? ConfigLoader.php      # Loads & merges quick-config.php / quick-sites.php
?   ?   ??? SiteConfig.php        # Endpoints, credentials, webhooks & AI config
?   ??? Content/
?   ?   ??? MarkdownParser.php    # Zero-dep Frontmatter + Markdown -> HTML
?   ??? Http/
?   ?   ??? AccessControl.php     # Timing-safe Basic / Token + session auth
?   ?   ??? CsrfProtection.php    # Session-backed CSRF token guard
?   ?   ??? RestClient.php        # cURL client with retry/backoff & local uploads
?   ?   ??? RestClientInterface.php
?   ?   ??? SessionHelper.php     # Unified secure session startup (HTTPS-aware)
?   ??? I18n/
?   ?   ??? Translator.php        # Zero-dep UI localization (lang/*.php, fallback en)
?   ??? Mcp/
?   ?   ??? McpServer.php         # JSON-RPC 2.0 MCP server (11 tools)
?   ??? Service/
?   ?   ??? AbstractService.php   # Shared CRUD helpers & listAll() pagination
?   ?   ??? PostService.php       # Posts CRUD + ACF/Meta + listAll()
?   ?   ??? PageService.php       # Pages CRUD + ACF/Meta + listAll()
?   ?   ??? CptService.php        # Custom Post Types CRUD + ACF/Meta + listAll()
?   ?   ??? MediaService.php      # $_FILES & uploadFromPath() + Featured Image
?   ?   ??? TaxonomyService.php   # Categories, tags & custom taxonomies
?   ?   ??? MenuService.php       # WordPress 5.9+ navigation menus & items
?   ?   ??? TemplateService.php   # Schema-discovered + configured templates
?   ?   ??? UserService.php       # Users & /users/me?context=edit
?   ?   ??? CommentService.php    # Comments CRUD + approve/unapprove/spam
?   ?   ??? HealthService.php     # REST reachability + auth + latency check
?   ?   ??? SyncService.php       # Cross-site post/page sync (staging -> prod)
?   ??? Webhook/
?       ??? WebhookDispatcher.php # Outbound JSON webhooks with HMAC-SHA256
??? lang/                         # UI translations (en.php, ro.php; auto-discovered)
??? public/                       # Editorial Web UI (zero npm/build)
?   ??? index.php                 # Dashboard + AI Concierge + Recent Drafts + Health Check
?   ??? quick-post.php            # 2-column Post editor + Live Preview + Media Picker
?   ??? quick-page.php            # 2-column Page editor + Live Preview + Media Picker
?   ??? quick-edit.php            # Quick Edit with live title search, Status filter & Preview
?   ??? quick-list.php            # Browse content + Quick Status Tabs + 1-click Publish + Bulk
?   ??? quick-media.php           # Upload Media + visual Media Library Browser
?   ??? quick-cpt.php             # Custom Post Types
?   ??? quick-taxonomy.php        # Categories & Tags
?   ??? quick-menus.php           # Navigation Menus Manager
?   ??? quick-comments.php        # Comments Moderation
?   ??? media-proxy.php           # Same-origin JSON proxy for Media Picker modal
?   ??? assets/                   # style.css, editor.js, taxonomy-picker.js
?   ??? partials/                 # bootstrap.php, header.php, footer.php, site-switcher.php
??? docs/                         # Detailed guides
??? tests/                        # PHPUnit 11 test suite (81 tests)
??? quick-config.example.php      # Configuration template
??? quick-sites.example.php       # Multi-site configuration template

? Quick Start

  1. Copy the example config:
    cp quick-config.example.php quick-config.php
    
  2. Create an Application Password in WordPress (Users ? Profile ? Application Passwords) and add it to `quick-config.php`.
  3. Verify your connection via CLI:
    php bin/quickwp site:check --all
    
  4. Or start the local web console:
    php -S localhost:8000 -t public
    

? Programmatic Usage

<?php
require_once __DIR__ . '/vendor/autoload.php';

use QuickWP\QuickWP;

$qwp = QuickWP::init(__DIR__, siteKey: 'main', enforceAccess: false);

// Optional: enable automatic retries on 429 / 502 / 503 / 504
$qwp->getClient()->setMaxRetries(maxRetries: 2, baseDelayMs: 250);

// Create a post with ACF & Meta fields
$result = $qwp->posts()->create([
    'title'   => 'Hello from QuickWP v3',
    'content' => '<p>Clean REST publishing.</p>',
    'status'  => 'draft',
    'acf'     => ['subtitle' => 'Fast and simple'],
]);

if (QuickWP::isSuccess($result)) {
    echo 'ID: ' . QuickWP::getId($result) . ' | ' . QuickWP::getLink($result);
} else {
    echo 'Error: ' . QuickWP::getError($result);
}

// Fetch all pages automatically across X-WP-TotalPages
$allPosts = $qwp->posts()->listAll(['status' => 'publish']);

// Upload a local file from CLI / scripts
$media = $qwp->media()->uploadFromPath('/path/to/cover.jpg', ['alt_text' => 'Cover']);

// Health check, users & comment moderation
$health   = $qwp->health()->check();
$me       = $qwp->users()->me();
$approved = $qwp->comments()->approve(42);

// AI Concierge (draft-first, multilingual)
$draft = $qwp->ai()->draftFromPrompt('Write a short summary in English about QuickWP v3');

? API Reference (Facade)

| Method | Description | |--------|-------------| | QuickWP::init($baseDir, $siteKey, $enforceAccess) | Initialize from quick-config.php / quick-sites.php | | QuickWP::withConfig($array) | Initialize from an explicit config array | | $qwp->posts() | PostService (create, update, get, list, listAll, delete) | | $qwp->pages() | PageService (create, update, get, list, listAll, delete) | | $qwp->cpt() | CptService (create, update, get, list, listAll, delete) | | $qwp->media() | MediaService (upload, uploadFromPath, setFeaturedImage, get, list, listAll, update, delete) | | $qwp->taxonomy() | TaxonomyService (createCategory, createTag, create, update, get, list, listAll, delete) | | $qwp->menus() | MenuService (getNavMenus, createNavMenu, getMenuItems, createMenuItem, deleteMenuItem, ?) | | $qwp->templates() | TemplateService (getPageTemplates, getPostTemplates) | | $qwp->users() | UserService (me, get, list, listAll) | | $qwp->comments() | CommentService (list, listAll, get, create, update, approve, unapprove, spam, delete) | | $qwp->health() | HealthService (check) | | $qwp->webhooks() | WebhookDispatcher (dispatch, getTargetsForEvent) | | $qwp->ai() | AiConciergeService (draftFromPrompt, parseDraftJson) |

?? Configuration Reference

| Key | Type | Default | Description | |-----|------|---------|-------------| | posts_endpoint | string | '' | WordPress posts REST endpoint | | pages_endpoint | string | '' | WordPress pages REST endpoint | | media_endpoint | string | derived | Media endpoint (auto-derived if empty) | | categories_endpoint / tags_endpoint | string | derived | Taxonomy endpoints | | users_endpoint / comments_endpoint | string | derived | Users & comments endpoints | | wp_username / wp_app_password | string | '' | WordPress Application Password credentials | | verify_ssl | bool | true | Verify SSL certificates | | access_mode | string | 'none' | Web UI access control: none, basic, or token | | access_basic_user / access_basic_password | string | '' | HTTP Basic Auth credentials (timing-safe hash_equals) | | access_token | string | '' | Token auth (?token=, X-QuickWP-Token, persisted in session) | | webhooks | array | [] | Outbound webhook map (event => url or url[], supports '*') | | webhook_secret | string | '' | Optional HMAC-SHA256 secret for X-QuickWP-Signature | | ai_provider | string | '' | Optional AI Concierge provider: gemini, openai, ollama | | ai_api_key | string | '' | Provider API key (not required for local Ollama) | | ai_model | string | provider default | Model override (gemini-3.5-flash-lite, gpt-4o-mini, llama3.2) | | ai_endpoint | string | '' | Optional custom endpoint (e.g. http://localhost:11434) |

? Documentation

? Development

# Run PHPUnit 11 test suite (70 tests)
composer test

# Run PHPStan 2 static analysis (Level 8)
composer analyse

? License

MIT License ? see LICENSE for details.


  Files folder image Files (81)  
File Role Description
Files folder image.github (1 directory)
Files folder imagebin (2 files)
Files folder imagedocs (4 files)
Files folder imagelang (2 files)
Files folder imagepublic (12 files, 2 directories)
Files folder imagesrc (2 files, 9 directories)
Files folder imagetests (16 files)
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file quick-config.example.php Conf. Configuration script
Accessible without login Plain text file quick-sites.example.php Conf. Configuration script
Accessible without login Plain text file README.md Doc. Read me

  Files folder image Files (81)  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files (81)  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file ci.yml Data Auxiliary data

  Files folder image Files (81)  /  bin  
File Role Description
  Accessible without login Plain text file quickwp Example Example script
  Accessible without login Plain text file quickwp-mcp Example Example script

  Files folder image Files (81)  /  docs  
File Role Description
  Accessible without login Plain text file CLI_AND_AUTOMATION.md Data Auxiliary data
  Accessible without login Plain text file GETTING_STARTED.md Doc. Documentation
  Accessible without login Plain text file MCP_AND_AI_CONCIERGE.md Data Auxiliary data
  Accessible without login Plain text file README.md Example Example script

  Files folder image Files (81)  /  lang  
File Role Description
  Accessible without login Plain text file en.php Aux. Configuration script
  Accessible without login Plain text file ro.php Aux. Configuration script

  Files folder image Files (81)  /  public  
File Role Description
Files folder imageassets (3 files)
Files folder imagepartials (4 files)
  Accessible without login Plain text file index.php Appl. Application script
  Accessible without login Plain text file media-proxy.php Example Example script
  Accessible without login Plain text file quick-comments.php Example Example script
  Accessible without login Plain text file quick-cpt.php Appl. Application script
  Accessible without login Plain text file quick-edit.php Appl. Application script
  Accessible without login Plain text file quick-list.php Appl. Application script
  Accessible without login Plain text file quick-media.php Appl. Application script
  Accessible without login Plain text file quick-menus.php Example Example script
  Accessible without login Plain text file quick-page.php Appl. Application script
  Accessible without login Plain text file quick-post.php Appl. Application script
  Accessible without login Plain text file quick-taxonomy.php Appl. Application script
  Accessible without login Plain text file quick-wp.php Appl. Application script

  Files folder image Files (81)  /  public  /  assets  
File Role Description
  Accessible without login Plain text file editor.js Data Auxiliary data
  Accessible without login Plain text file style.css Data Auxiliary data
  Accessible without login Plain text file taxonomy-picker.js Data Auxiliary data

  Files folder image Files (81)  /  public  /  partials  
File Role Description
  Accessible without login Plain text file bootstrap.php Example Example script
  Accessible without login Plain text file footer.php Aux. Configuration script
  Accessible without login Plain text file header.php Example Example script
  Accessible without login Plain text file site-switcher.php Example Example script

  Files folder image Files (81)  /  src  
File Role Description
Files folder imageAi (1 file)
Files folder imageCli (1 file)
Files folder imageConfig (3 files)
Files folder imageContent (1 file)
Files folder imageHttp (5 files)
Files folder imageI18n (1 file)
Files folder imageMcp (1 file)
Files folder imageService (12 files)
Files folder imageWebhook (1 file)
  Plain text file Bootstrap.php Class Class source
  Plain text file QuickWP.php Class Class source

  Files folder image Files (81)  /  src  /  Ai  
File Role Description
  Plain text file AiConciergeService.php Class Class source

  Files folder image Files (81)  /  src  /  Cli  
File Role Description
  Plain text file Application.php Class Class source

  Files folder image Files (81)  /  src  /  Config  
File Role Description
  Plain text file Config.php Class Class source
  Plain text file ConfigLoader.php Class Class source
  Plain text file SiteConfig.php Class Class source

  Files folder image Files (81)  /  src  /  Content  
File Role Description
  Plain text file MarkdownParser.php Class Class source

  Files folder image Files (81)  /  src  /  Http  
File Role Description
  Plain text file AccessControl.php Class Class source
  Plain text file CsrfProtection.php Class Class source
  Plain text file RestClient.php Class Class source
  Plain text file RestClientInterface.php Class Class source
  Plain text file SessionHelper.php Class Class source

  Files folder image Files (81)  /  src  /  I18n  
File Role Description
  Plain text file Translator.php Class Class source

  Files folder image Files (81)  /  src  /  Mcp  
File Role Description
  Plain text file McpServer.php Class Class source

  Files folder image Files (81)  /  src  /  Service  
File Role Description
  Plain text file AbstractService.php Class Class source
  Plain text file CommentService.php Class Class source
  Plain text file CptService.php Class Class source
  Plain text file HealthService.php Class Class source
  Plain text file MediaService.php Class Class source
  Plain text file MenuService.php Class Class source
  Plain text file PageService.php Class Class source
  Plain text file PostService.php Class Class source
  Plain text file SyncService.php Class Class source
  Plain text file TaxonomyService.php Class Class source
  Plain text file TemplateService.php Class Class source
  Plain text file UserService.php Class Class source

  Files folder image Files (81)  /  src  /  Webhook  
File Role Description
  Plain text file WebhookDispatcher.php Class Class source

  Files folder image Files (81)  /  tests  
File Role Description
  Plain text file AccessControlTest.php Class Class source
  Plain text file AiConciergeTest.php Class Class source
  Plain text file ConfigTest.php Class Class source
  Plain text file CsrfProtectionTest.php Class Class source
  Plain text file MarkdownParserTest.php Class Class source
  Plain text file McpServerTest.php Class Class source
  Plain text file QuickWPAndConfigLoaderTest.php Class Class source
  Plain text file RestClientTest.php Class Class source
  Plain text file RetryAndPaginationTest.php Class Class source
  Plain text file ServicePayloadTest.php Class Class source
  Plain text file SessionHelperTest.php Class Class source
  Plain text file SyncAndCliTest.php Class Class source
  Plain text file TemplateServiceTest.php Class Class source
  Plain text file TranslatorTest.php Class Class source
  Plain text file UserCommentHealthTest.php Class Class source
  Plain text file WebhookDispatcherTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0