DownloadQuickWP Documentation
Detailed documentation for the QuickWP WordPress REST API Toolkit.
Table of Contents
Quick Links
For Users
If you just want to use the web interface:
-
Run `composer install`
-
Copy `quick-config-example.php` to `quick-config.php`
-
Edit `quick-config.php` with your WordPress site details
-
Open `public/index.php` in your browser
For Developers
If you want to use QuickWP programmatically:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use QuickWP\QuickWP;
$qwp = QuickWP::init(__DIR__);
// Create content
$qwp->posts()->create(['title' => 'Hello', 'content' => 'World']);
$qwp->pages()->create(['title' => 'About', 'content' => 'About us']);
$qwp->media()->upload($_FILES['image']);
$qwp->taxonomy()->createCategory(['name' => 'News']);
Architecture Overview
QuickWP follows a clean service-oriented architecture:
???????????????????????????????????????????????????????????????
? QuickWP (Facade) ?
???????????????????????????????????????????????????????????????
? Provides a simple, unified API for all WordPress operations?
???????????????????????????????????????????????????????????????
?
?????????????????????????????????????????
? ? ?
? ? ?
????????????????? ????????????????? ?????????????????
? PostService ? ? PageService ? ? MediaService ?
? CptService ? ?TaxonomyService? ? MenuService ?
????????????????? ????????????????? ?????????????????
? ? ?
?????????????????????????????????????????
?
?
?????????????????
? RestClient ?
? (cURL) ?
?????????????????
?
?
?????????????????
? WordPress ?
? REST API ?
?????????????????
Key Classes
| Class | Purpose |
|-------|---------|
| QuickWP | Main facade ? entry point for all operations |
| Bootstrap | Factory class for creating services with dependencies |
| SiteConfig | Holds site configuration (endpoints, credentials) |
| ConfigLoader | Loads and merges configuration from files |
| RestClient | cURL-based HTTP client for REST API calls |
| AccessControl | Handles access protection (basic auth, token) |
| PostService | CRUD operations for posts |
| PageService | CRUD operations for pages |
| CptService | CRUD operations for custom post types |
| MediaService | Media upload and management |
| TaxonomyService | Categories, tags, and custom taxonomies |
| MenuService | WordPress menu operations |
| TemplateService | Fetch available page/post templates |
Design Principles
-
Dependency Injection ? Services receive their dependencies via constructor
-
Immutable Config ? Configuration objects are read-only after creation
-
Standardized Responses ? All operations return consistent response arrays
-
Lazy Loading ? Services are created on first access
-
Single Responsibility ? Each service handles one type of content
Contributing
See the main README.md for development setup instructions.
|