Major refactoring to create a clean, integrated CLI application: ### New Features: - Unified CLI executable (./seo) with simple command structure - All commands accept optional CSV file arguments - Auto-detection of latest files when no arguments provided - Simplified output directory structure (output/ instead of output/reports/) - Cleaner export filename format (all_posts_YYYY-MM-DD.csv) ### Commands: - export: Export all posts from WordPress sites - analyze [csv]: Analyze posts with AI (optional CSV input) - recategorize [csv]: Recategorize posts with AI - seo_check: Check SEO quality - categories: Manage categories across sites - approve [files]: Review and approve recommendations - full_pipeline: Run complete workflow - analytics, gaps, opportunities, report, status ### Changes: - Moved all scripts to scripts/ directory - Created config.yaml for configuration - Updated all scripts to use output/ directory - Deprecated old seo-cli.py in favor of new ./seo - Added AGENTS.md and CHANGELOG.md documentation - Consolidated README.md with updated usage ### Technical: - Added PyYAML dependency - Removed hardcoded configuration values - All scripts now properly integrated - Better error handling and user feedback Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
6.0 KiB
6.0 KiB
Installation Guide - Rank Math API Manager Plugin
📋 Prerequisites
Before installing the Rank Math API Manager plugin, ensure you have:
- WordPress 5.0 or newer
- PHP 7.4 or newer
- Rank Math SEO plugin (installed and activated)
- Administrator access to your WordPress site
🚀 Installation Methods
Method 1: Manual Installation (Recommended)
Step 1: Download the Plugin
- Visit the GitHub repository
- Click the green "Code" button
- Select "Download ZIP"
- Extract the ZIP file to your local computer
Step 2: Upload to WordPress
- Log in to your WordPress admin panel
- Navigate to Plugins → Add New
- Click "Upload Plugin" at the top of the page
- Choose File and select the extracted plugin folder
- Click "Install Now"
- Activate the plugin when prompted
Method 2: FTP Installation
Step 1: Prepare the Files
- Download the plugin from GitHub
- Extract the ZIP file
- Upload the
rank-math-api-managerfolder to/wp-content/plugins/
Step 2: Activate the Plugin
- Log in to WordPress admin
- Go to Plugins → Installed Plugins
- Find "Rank Math API Manager"
- Click "Activate"
⚙️ Configuration
Step 1: Verify Installation
After activation, you should see:
- ✅ Plugin appears in the plugins list
- ✅ No error messages in WordPress admin
- ✅ REST API endpoints are available
Step 2: Test API Endpoints
Using cURL (Command Line)
# Test the API endpoint
curl -X POST "https://your-site.com/wp-json/rank-math-api/v1/update-meta" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Basic [base64-encoded-credentials]" \
-d "post_id=1&rank_math_title=Test Title"
Using Postman
- Create a new POST request
- URL:
https://your-site.com/wp-json/rank-math-api/v1/update-meta - Headers:
Content-Type: application/x-www-form-urlencodedAuthorization: Basic [base64-encoded-credentials]
- Body (form-data):
post_id:1rank_math_title:Test Title
Step 3: Set Up Authentication
WordPress Application Passwords
- Go to Users → Profile
- Scroll to "Application Passwords"
- Enter a name (e.g., "API Access")
- Click "Add New Application Password"
- Copy the generated password
Basic Auth Setup
# Encode credentials
echo -n "username:password" | base64
🔧 Integration Setup
n8n Workflow Integration
- Add HTTP Request node to your n8n workflow
- Configure the request:
- Method:
POST - URL:
https://your-site.com/wp-json/rank-math-api/v1/update-meta - Headers: Add authentication headers
- Body: Configure form data
- Method:
Example n8n Configuration
{
"method": "POST",
"url": "https://your-site.com/wp-json/rank-math-api/v1/update-meta",
"contentType": "form-urlencoded",
"headers": {
"Authorization": "Basic [base64-encoded-credentials]"
},
"bodyParameters": {
"post_id": "={{ $('Post on Wordpress').first().json.id }}",
"rank_math_title": "={{ $('Generate metatitle e metadescription').first().json.output.metatitle }}",
"rank_math_description": "={{ $('Generate metatitle e metadescription').first().json.output.metadescription }}",
"rank_math_focus_keyword": "={{ $('Generate metatitle e metadescription').first().json.output.metakeywords }}"
}
}
🛡️ Security Configuration
1. Enable HTTPS
Ensure your WordPress site uses HTTPS for secure API communications.
2. Restrict API Access
- Use strong application passwords
- Limit API access to trusted applications
- Monitor API usage logs
3. WordPress Security
- Keep WordPress updated
- Use security plugins
- Enable two-factor authentication
🔍 Verification Steps
1. Check Plugin Status
- Go to Plugins → Installed Plugins
- Verify "Rank Math API Manager" is Active
- Check for any error messages
2. Test API Endpoint
# Test endpoint availability
curl -X GET "https://your-site.com/wp-json/rank-math-api/v1/update-meta"
Expected response: {"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}
This confirms the endpoint exists but requires POST method.
3. Verify Permissions
- Create a test post
- Use the API to update its SEO metadata
- Verify the changes appear in Rank Math
🐛 Troubleshooting
Common Issues
Issue: "Plugin could not be activated"
Solution:
- Check PHP version (requires 7.4+)
- Verify WordPress version (requires 5.0+)
- Check for plugin conflicts
Issue: "401 Unauthorized" API errors
Solution:
- Verify application password is correct
- Check user permissions (
edit_posts) - Ensure authentication headers are properly formatted
Issue: "404 Not Found" API errors
Solution:
- Verify plugin is activated
- Check WordPress REST API is enabled
- Ensure URL is correct
Issue: "400 Bad Request" API errors
Solution:
- Verify
post_idexists - Check parameter formatting
- Ensure all required fields are provided
Debug Mode
Enable WordPress debug mode for detailed error messages:
// Add to wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
📞 Support
If you encounter issues during installation:
- Check the troubleshooting section above
- Review WordPress error logs
- Create a GitHub issue with detailed information
- Contact support at devora.no
Required Information for Support
- WordPress version
- PHP version
- Plugin version
- Error messages
- Steps to reproduce the issue
- Screenshots (if applicable)
Next Steps: After installation, see the API Documentation for detailed usage instructions.
Last Updated: July 2025
Version: 1.0.6