fix(qa): health check, admin notice, docs, logo, Coolify port

- WP Advanced health_check uses aiohttp to /wp-json/ directly
- SEO Bridge admin notice only on Plugins page
- SEO Bridge README.md consolidated, changelog complete
- OpenPanel Self-Hosted README.md created
- Dashboard sidebar uses actual logo.svg
- docker-compose: expose instead of ports for Coolify
- README: version badge, wordpress_advanced endpoint, env var table
- Docs: SSE references fixed to streamable-http

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
airano
2026-02-19 01:55:29 +03:30
parent ff79968170
commit bb2a416dd5
10 changed files with 346 additions and 285 deletions

View File

@@ -10,94 +10,82 @@ SEO API Bridge is a comprehensive WordPress plugin that exposes Rank Math SEO an
## What's New in 1.3.0
**Full REST API Endpoints** - GET and POST operations for all post types
**Product SEO Support** - Complete WooCommerce product SEO management
**Simplified Integration** - Direct API calls instead of meta field manipulation
**Better Error Handling** - Proper validation and error responses
- **Full REST API Endpoints** - GET and POST operations for all post types
- **Product SEO Support** - Complete WooCommerce product SEO management
- **Simplified Integration** - Direct API calls instead of meta field manipulation
- **Better Error Handling** - Proper validation and error responses
## Features
- **Rank Math SEO Support** - Full access to all Rank Math meta fields
- **Yoast SEO Support** - Full access to all Yoast SEO meta fields
- **WooCommerce Compatible** - Works with product post types
- **Secure** - Requires proper authentication and edit_posts capability
- **Auto-Detection** - Automatically detects which SEO plugin is active
- **Health Check Endpoint** - NEW! Dedicated API endpoint for plugin detection
- **Zero Configuration** - Works out of the box after activation
- **Rank Math SEO Support** - Full access to all Rank Math meta fields
- **Yoast SEO Support** - Full access to all Yoast SEO meta fields
- **WooCommerce Compatible** - Works with product post types
- **Secure** - Requires proper authentication and edit_posts capability
- **Auto-Detection** - Automatically detects which SEO plugin is active
- **Health Check Endpoint** - Dedicated API endpoint for plugin detection
- **Zero Configuration** - Works out of the box after activation
## Supported SEO Fields
### Rank Math SEO
#### Core Fields
- `rank_math_focus_keyword` - Focus keyword
- `rank_math_title` - Meta title
- `rank_math_description` - Meta description
- `rank_math_additional_keywords` - Additional keywords
#### Advanced Fields
- `rank_math_canonical_url` - Canonical URL
- `rank_math_robots` - Robots meta directives
- `rank_math_breadcrumb_title` - Breadcrumb title
#### Open Graph (Facebook)
- `rank_math_facebook_title` - OG title
- `rank_math_facebook_description` - OG description
- `rank_math_facebook_image` - OG image URL
- `rank_math_facebook_image_id` - OG image ID
#### Twitter Card
- `rank_math_twitter_title` - Twitter title
- `rank_math_twitter_description` - Twitter description
- `rank_math_twitter_image` - Twitter image URL
- `rank_math_twitter_image_id` - Twitter image ID
- `rank_math_twitter_card_type` - Card type (summary, summary_large_image)
| Category | Field | Description |
|----------|-------|-------------|
| Core | `rank_math_focus_keyword` | Focus keyword |
| Core | `rank_math_title` | Meta title |
| Core | `rank_math_description` | Meta description |
| Core | `rank_math_additional_keywords` | Additional keywords |
| Advanced | `rank_math_canonical_url` | Canonical URL |
| Advanced | `rank_math_robots` | Robots meta directives |
| Advanced | `rank_math_breadcrumb_title` | Breadcrumb title |
| Open Graph | `rank_math_facebook_title` | OG title |
| Open Graph | `rank_math_facebook_description` | OG description |
| Open Graph | `rank_math_facebook_image` | OG image URL |
| Open Graph | `rank_math_facebook_image_id` | OG image ID |
| Twitter | `rank_math_twitter_title` | Twitter title |
| Twitter | `rank_math_twitter_description` | Twitter description |
| Twitter | `rank_math_twitter_image` | Twitter image URL |
| Twitter | `rank_math_twitter_image_id` | Twitter image ID |
| Twitter | `rank_math_twitter_card_type` | Card type (summary, summary_large_image) |
### Yoast SEO
#### Core Fields
- `_yoast_wpseo_focuskw` - Focus keyword
- `_yoast_wpseo_title` - Meta title
- `_yoast_wpseo_metadesc` - Meta description
#### Advanced Fields
- `_yoast_wpseo_canonical` - Canonical URL
- `_yoast_wpseo_meta-robots-noindex` - Noindex setting
- `_yoast_wpseo_meta-robots-nofollow` - Nofollow setting
- `_yoast_wpseo_bctitle` - Breadcrumb title
#### Open Graph
- `_yoast_wpseo_opengraph-title` - OG title
- `_yoast_wpseo_opengraph-description` - OG description
- `_yoast_wpseo_opengraph-image` - OG image URL
- `_yoast_wpseo_opengraph-image-id` - OG image ID
#### Twitter Card
- `_yoast_wpseo_twitter-title` - Twitter title
- `_yoast_wpseo_twitter-description` - Twitter description
- `_yoast_wpseo_twitter-image` - Twitter image URL
- `_yoast_wpseo_twitter-image-id` - Twitter image ID
| Category | Field | Description |
|----------|-------|-------------|
| Core | `_yoast_wpseo_focuskw` | Focus keyword |
| Core | `_yoast_wpseo_title` | Meta title |
| Core | `_yoast_wpseo_metadesc` | Meta description |
| Advanced | `_yoast_wpseo_canonical` | Canonical URL |
| Advanced | `_yoast_wpseo_meta-robots-noindex` | Noindex setting |
| Advanced | `_yoast_wpseo_meta-robots-nofollow` | Nofollow setting |
| Advanced | `_yoast_wpseo_bctitle` | Breadcrumb title |
| Open Graph | `_yoast_wpseo_opengraph-title` | OG title |
| Open Graph | `_yoast_wpseo_opengraph-description` | OG description |
| Open Graph | `_yoast_wpseo_opengraph-image` | OG image URL |
| Open Graph | `_yoast_wpseo_opengraph-image-id` | OG image ID |
| Twitter | `_yoast_wpseo_twitter-title` | Twitter title |
| Twitter | `_yoast_wpseo_twitter-description` | Twitter description |
| Twitter | `_yoast_wpseo_twitter-image` | Twitter image URL |
| Twitter | `_yoast_wpseo_twitter-image-id` | Twitter image ID |
## Installation
### Method 1: Manual Upload via WordPress Admin
### Method 1: Upload via WordPress Admin
1. Download the plugin folder
2. Create a ZIP file: `seo-api-bridge.zip`
3. Go to WordPress Admin → Plugins → Add New → Upload Plugin
4. Upload the ZIP file and click "Install Now"
5. Click "Activate Plugin"
1. Download `seo-api-bridge.zip` from [Releases](https://github.com/airano-ir/mcphub)
2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
3. Upload the ZIP file and click "Install Now"
4. Click "Activate Plugin"
### Method 2: FTP/SSH Upload
1. Upload the `seo-api-bridge` folder to `/wp-content/plugins/`
2. Go to WordPress Admin Plugins
2. Go to WordPress Admin > Plugins
3. Find "SEO API Bridge" and click "Activate"
### Method 3: WP-CLI
```bash
# Via SSH to your WordPress container
cd /var/www/html/wp-content/plugins/
# Copy the plugin folder here
wp plugin activate seo-api-bridge
@@ -105,28 +93,46 @@ wp plugin activate seo-api-bridge
## REST API Endpoints
All endpoints require **WordPress Application Password** authentication.
### Status Endpoint
**GET** `/wp-json/seo-api-bridge/v1/status`
Check plugin status and detected SEO plugins.
```bash
curl https://yoursite.com/wp-json/seo-api-bridge/v1/status
curl -X GET "https://yoursite.com/wp-json/seo-api-bridge/v1/status" \
-u "username:application_password"
```
**Response:**
```json
{
"plugin": "SEO API Bridge",
"version": "1.3.0",
"active": true,
"seo_plugins": {
"rank_math": { "active": true, "version": "1.0.257" },
"yoast": { "active": false, "version": null }
},
"supported_post_types": ["post", "page", "product"],
"message": "SEO API Bridge is active and working with Rank Math SEO."
}
```
### Post SEO Endpoints
**GET** `/wp-json/seo-api-bridge/v1/posts/{id}/seo`
**GET** `/wp-json/seo-api-bridge/v1/posts/{id}/seo` — Get SEO metadata for a post
Get SEO metadata for a post.
**POST** `/wp-json/seo-api-bridge/v1/posts/{id}/seo`
Update SEO metadata for a post.
**POST** `/wp-json/seo-api-bridge/v1/posts/{id}/seo` — Update SEO metadata for a post
```bash
curl -X POST https://yoursite.com/wp-json/seo-api-bridge/v1/posts/123/seo \
# Get post SEO
curl -X GET "https://yoursite.com/wp-json/seo-api-bridge/v1/posts/123/seo" \
-u "username:application_password"
# Update post SEO
curl -X POST "https://yoursite.com/wp-json/seo-api-bridge/v1/posts/123/seo" \
-u "username:application_password" \
-H "Content-Type: application/json" \
-d '{"focus_keyword": "wordpress", "seo_title": "My Title"}'
```
@@ -141,19 +147,38 @@ curl -X POST https://yoursite.com/wp-json/seo-api-bridge/v1/posts/123/seo \
**GET** `/wp-json/seo-api-bridge/v1/products/{id}/seo`
Get SEO metadata for a WooCommerce product.
**POST** `/wp-json/seo-api-bridge/v1/products/{id}/seo`
Update SEO metadata for a WooCommerce product.
```bash
curl -X POST https://yoursite.com/wp-json/seo-api-bridge/v1/products/1217/seo \
curl -X POST "https://yoursite.com/wp-json/seo-api-bridge/v1/products/1217/seo" \
-u "username:application_password" \
-H "Content-Type: application/json" \
-d '{"focus_keyword": "product keyword", "seo_title": "Product Title"}'
```
## Usage with MCP Servers
### Alternative: Standard WordPress REST API
The plugin also registers all SEO meta fields on standard WordPress REST API endpoints. You can read/write SEO data directly via:
- `GET/POST /wp-json/wp/v2/posts/{id}` — SEO fields in the `meta` object
- `GET/POST /wp-json/wp/v2/pages/{id}`
- `GET/POST /wp-json/wp/v2/products/{id}` (WooCommerce)
```bash
# Read SEO fields via standard endpoint
curl -X GET "https://yoursite.com/wp-json/wp/v2/posts/123" \
-u "username:application_password"
# Update SEO via standard endpoint
curl -X POST "https://yoursite.com/wp-json/wp/v2/posts/123" \
-u "username:application_password" \
-H "Content-Type: application/json" \
-d '{"meta": {"rank_math_focus_keyword": "wordpress optimization"}}'
```
## Usage with MCP Hub
This plugin is designed to work with [MCP Hub](https://github.com/airano-ir/mcphub).
```javascript
// Get product SEO
@@ -172,244 +197,98 @@ await mcp.wordpress_update_product_seo({
});
```
**Benefits of this approach:**
1.**WordPress Best Practice** - Uses recommended core REST API functionality
2.**Zero Maintenance** - Leverages WordPress built-in features
3.**Universal Compatibility** - Works with all WordPress REST API clients
4.**Inherits Security** - Uses WordPress authentication and permissions
5.**Simpler Code** - No custom endpoints to maintain
**Standard Endpoints:**
- Posts/Pages: `/wp-json/wp/v2/posts/{id}` or `/wp-json/wp/v2/pages/{id}`
- Products: `/wp-json/wp/v2/products/{id}` (WooCommerce custom post type)
**SEO data is in the `meta` object:**
```json
{
"id": 123,
"title": {"rendered": "My Post"},
"meta": {
"rank_math_focus_keyword": "wordpress seo",
"rank_math_title": "Complete SEO Guide",
"rank_math_description": "Learn WordPress SEO best practices..."
}
}
```
### Reading SEO Data
**Get Post with SEO Fields:**
```bash
GET /wp-json/wp/v2/posts/{id}
```
**Response includes:**
```json
{
"id": 123,
"title": {"rendered": "My Post"},
"meta": {
"rank_math_focus_keyword": "wordpress seo",
"rank_math_title": "Complete WordPress SEO Guide",
"rank_math_description": "Learn how to optimize your WordPress site...",
"rank_math_facebook_title": "SEO Guide for Facebook",
"rank_math_twitter_card_type": "summary_large_image"
}
}
```
### Writing SEO Data
**Update Post SEO Fields:**
```bash
POST /wp-json/wp/v2/posts/{id}
Authorization: Basic [base64(username:application_password)]
Content-Type: application/json
{
"meta": {
"rank_math_focus_keyword": "wordpress optimization",
"rank_math_title": "WordPress Optimization Tips",
"rank_math_description": "Discover the best practices for WordPress optimization"
}
}
```
### WooCommerce Products
**Get Product with SEO:**
```bash
GET /wp-json/wp/v2/products/{id}
```
**Update Product SEO:**
```bash
POST /wp-json/wp/v2/products/{id}
{
"meta": {
"rank_math_focus_keyword": "premium widget",
"rank_math_description": "Buy the best premium widget online"
}
}
```
## Usage with MCP Server
This plugin is designed to work with the [MCP Hub](https://github.com/airano-ir/mcphub).
### Example MCP Tool Usage
```python
# Get post SEO data
result = await mcp.call_tool(
"wordpress_site1_get_post_seo",
{"post_id": 123}
"wordpress_get_post_seo",
{"site": "yoursite", "post_id": 123}
)
# Update post SEO
result = await mcp.call_tool(
"wordpress_site1_update_post_seo",
"wordpress_update_post_seo",
{
"site": "yoursite",
"post_id": 123,
"focus_keyword": "wordpress seo",
"seo_title": "Complete SEO Guide",
"meta_description": "Learn WordPress SEO..."
}
)
# Update WooCommerce product SEO
result = await mcp.call_tool(
"wordpress_site1_update_product_seo",
{
"product_id": 456,
"focus_keyword": "premium widget",
"meta_description": "Buy the best widget"
}
)
```
## Verification
### Check if Plugin is Working
1. **Admin Notice:** After activation, visit the Plugins page to see a status notice indicating which SEO plugin was detected.
1. **Admin Notice:** After activation, you should see a success notice indicating which SEO plugin was detected
2. **Health Check Endpoint (v1.1.0+):**
2. **Status Endpoint:**
```bash
# Check plugin status directly
curl -X GET "https://your-site.com/wp-json/seo-api-bridge/v1/status" \
-u "username:application_password"
```
**Response:**
```json
{
"plugin": "SEO API Bridge",
"version": "1.1.0",
"active": true,
"seo_plugins": {
"rank_math": {
"active": true,
"version": "1.0.257"
},
"yoast": {
"active": false,
"version": null
}
},
"supported_post_types": ["post", "page", "product"],
"message": "SEO API Bridge is active and working with Rank Math SEO."
}
```
3. **REST API Test:**
```bash
# Get any post and check if meta fields are present
curl -X GET "https://your-site.com/wp-json/wp/v2/posts/1" \
-u "username:application_password"
```
4. **MCP Health Check:** The MCP server will automatically detect the plugin using the new endpoint
4. **MCP Health Check:** The MCP server automatically detects the plugin using the status endpoint.
## Security
- All meta fields require authentication via Application Passwords
- Write access requires `edit_posts` capability
- Read access follows WordPress post visibility rules
- No sensitive data exposed without proper permissions
- All meta fields require authentication via Application Passwords
- Write access requires `edit_posts` capability
- Read access follows WordPress post visibility rules
- No sensitive data exposed without proper permissions
## Troubleshooting
### MCP Server Cannot Detect Plugin
**Issue:** MCP reports "SEO API Bridge plugin not detected" even though plugin is active
**Solution for v1.1.0+:**
1. **Upgrade to v1.1.0** - This version adds a dedicated health check endpoint
2. **Restart MCP server** - New detection logic will be used
3. **Test endpoint directly:**
```bash
curl "https://your-site.com/wp-json/seo-api-bridge/v1/status" -u "user:pass"
```
**Solution for v1.0.0 (legacy):**
1. Create at least one post or product with SEO metadata set
2. The old detection requires checking actual content meta fields
3. Upgrade to v1.1.0 to avoid this requirement
1. Upgrade to v1.1.0+ (has dedicated health check endpoint)
2. Restart MCP server
3. Test endpoint: `curl "https://your-site.com/wp-json/seo-api-bridge/v1/status" -u "user:pass"`
### SEO Plugin Not Detected
**Issue:** Admin notice says "Neither Rank Math SEO nor Yoast SEO is detected"
**Solution:**
1. Verify Rank Math or Yoast SEO is installed and activated
2. Try deactivating and reactivating SEO API Bridge
3. Check PHP error logs for any warnings
2. Deactivate and reactivate SEO API Bridge
3. Check PHP error logs for warnings
### Meta Fields Not Appearing in REST API
**Issue:** `/wp-json/wp/v2/posts/{id}` doesn't show `meta` object
**Solution:**
1. Ensure you're authenticated (use Application Password)
2. Check that you have `edit_posts` permission
2. Check user has `edit_posts` permission
3. Verify the post type is supported (post, page, product)
### Fields Are Read-Only
**Issue:** Can read SEO fields but cannot update them
**Solution:**
1. Verify authentication credentials
2. Check user has `edit_posts` capability
3. Ensure you're using POST/PUT request, not GET
## Compatibility
- ✅ WordPress 5.0+
- ✅ PHP 7.4+
- ✅ Rank Math SEO 1.0+
- ✅ Yoast SEO 14.0+
- ✅ WooCommerce 5.0+ (for product support)
- ✅ Classic Editor & Gutenberg
- ✅ Multisite compatible
## Support
For issues related to:
- **This plugin:** [GitHub Issues](https://github.com/airano-ir/mcphub/issues)
- **MCP Server:** [MCP Server Documentation](https://github.com/airano-ir/mcphub)
- **Rank Math SEO:** [Rank Math Support](https://rankmath.com/support/)
- **Yoast SEO:** [Yoast Support](https://yoast.com/help/)
- WordPress 5.0+
- PHP 7.4+
- Rank Math SEO 1.0+
- Yoast SEO 14.0+
- WooCommerce 5.0+ (for product support)
- Classic Editor & Gutenberg
- Multisite compatible
## Changelog
### 1.3.0 (2025-02-18)
- Added REST API endpoints for posts, pages, and products (GET/POST operations)
- Added authentication requirement for all endpoints
- Fixed `rank_math_title` meta key registration
- Fixed output escaping for WordPress.org compliance
### 1.2.0 (2025-02-15)
- Enhanced WooCommerce product support
- Improved MariaDB compatibility for meta field queries
### 1.1.0 (2025-01-10)
- 🎉 **NEW:** Health check REST API endpoint `/seo-api-bridge/v1/status`
- 🎉 **NEW:** Direct plugin detection without requiring posts/products
- 🎉 **IMPROVEMENT:** Better compatibility with sites that have no content
- 🎉 **IMPROVEMENT:** Returns SEO plugin versions in status endpoint
- 🎉 **FIX:** MCP server can now detect plugin even with zero posts
- Added health check REST API endpoint `/seo-api-bridge/v1/status`
- Direct plugin detection without requiring posts/products
- Better compatibility with sites that have no content
- Returns SEO plugin versions in status endpoint
### 1.0.0 (2025-01-10)
- Initial release
@@ -417,12 +296,14 @@ For issues related to:
- Yoast SEO support (15 meta fields)
- WooCommerce product support
- Auto-detection of active SEO plugins
- Admin notices for status
## Support
- **Plugin issues:** [GitHub Issues](https://github.com/airano-ir/mcphub/issues)
- **MCP Server:** [MCP Hub Documentation](https://github.com/airano-ir/mcphub)
- **Rank Math SEO:** [Rank Math Support](https://rankmath.com/support/)
- **Yoast SEO:** [Yoast Support](https://yoast.com/help/)
## License
GPLv2 or later - See [LICENSE](https://www.gnu.org/licenses/gpl-2.0.html) for details
## Credits
Developed for use with MCP Hub to enable AI-powered SEO content management.