Plataforma SaaS de gestió WordPress
SaaS Connector WordPress
Complete platform for centralized management of multiple WordPress installations including security, backups, SEO, AI agents, billing, and monitoring. One connector plugin per client and an administration portal acting as the control center.
Context
The project is designed for an agency or web service provider that manages multiple WordPress installations for different clients. Pànxing (Javi's company) is the primary use case: dozens of WordPress sites that need to be maintained, updated, audited, and monitored from a single central dashboard.
The system runs on a private server with Docker. The web portal serves as the administration interface, and each client has a WordPress plugin installed that acts as a communication bridge with the portal.
Project Evolution
The initial idea was a simple connector to remotely update WordPress plugins and themes. During development it was expanded until it became a complete management platform including: security, backups, optimization, SEO, client management, support tickets, and billing.
Later, an AI agent system (Nanobot) was added, capable of making autonomous decisions on maintenance tasks, with approval gates to control risk. The agent system includes: model provider registry, role-to-model binding, task catalog by risk, multi-step workflows with sequential chaining or routing, and an approval system via Telegram.
The current version consolidates: the SaaS portal (FastAPI), the WordPress connector (PHP), a Lighthouse worker for SEO audits, a broken link worker, and an AI agent system with controlled deployment.
Onboarding
New client onboarding starts with installing the WP SaaS Connector plugin on the client's WordPress. The plugin generates a unique token and an RSA key for bidirectional authentication.
From the SaaS portal, the administrator registers the new site with its URL and the plugin's token. The portal verifies the connection by calling the /wp-json/wp-saas/v1/verify endpoint on the client's WordPress. Once verified, the site appears in the dashboard as "connected".
The system manages the client-sites relationship: a client can have multiple sites associated, and each site is linked to a client with fiscal data (VAT ID, fiscal address, payment terms). The portal allows exporting the client list as CSV.
From the very beginning, the connected site starts sending information to the portal: plugin status, pending updates, WordPress version, PHP version, and security and optimization scores.
Management
Once the client is onboarded, the platform offers management tools divided into five main areas:
Security: The portal runs periodic security audits via the plugin. Each site receives a security score that is stored and displayed historically. The plugin includes a security manager that reviews file permissions, sensitive configurations, and known vulnerabilities.
Backups: The system allows configuring backup frequency (daily, weekly, monthly) and type (full, database, files). The plugin manages backup creation and restoration from the WordPress server, with internal storage via SSH+rsync.
Optimization: Performance audit with scores, review of PHP, cache, and compression configurations. Results are stored historically to track evolution.
SEO: The Lighthouse worker runs SEO audits per URL. A Python worker detects broken links. An internal link system uses an LLM to analyze each page's content, generate a semantic summary, and suggest contextual links between pages on the same site. Suggestions can be auto-applied or require approval.
AI Agents (Nanobot): The agent system allows configuring automatic tasks per site. Each task has an action code, an associated risk (LOW/MEDIUM/HIGH/CRITICAL), and a cooldown system. High-risk actions require human approval via Telegram. The system includes: model router to select the appropriate provider for each task, voice presets to adapt the tone of content generation, multi-step workflows that chain multiple actions, and a complete execution log with auditing.
Tickets and Billing: Support ticket system with priorities, categories, agent assignment, and source (manual, email, plugin). The portal generates invoices with immutable fiscal data, status tracking (draft, issued, paid, overdue), and automatic tax calculation.
Monitoring: Integration with Umami Analytics for traffic statistics and Uptime Kuma for uptime monitoring, all centralized in the dashboard.
How It Works
- The WordPress plugin is installed on the client and generates a token + RSA key.
- The administrator registers the site on the SaaS portal with the URL and token.
- The portal verifies the connection via the plugin's REST API.
- Once connected, the plugin periodically sends information to the portal.
- The portal runs security, SEO, broken link, and optimization audits on a scheduled basis.
- AI agents can execute maintenance tasks automatically or with approval.
- Results are displayed in the dashboard with history and trends.
- The plugin can be remotely updated from the portal (ZIP distribution).
Challenges
The main challenge was designing a secure communication system between the portal and dozens of WordPress installations. Bidirectional authentication was required without relying on sessions or cookies: the portal authenticates to the plugin with a token, and the plugin to the portal with an RSA signature.
Multi-tenant management required a granular permissions model: admins see all sites, agents only their assigned sites. Every agent action is recorded in an audit log.
The AI agent system required a risk model to decide which actions can be automatic and which need approval. The implementation required: task catalog with risk levels, cooldowns to prevent overly frequent executions, quiet hour windows, and a global kill switch.
Distributing plugin updates from the portal required packaging the plugin as a ZIP compatible with the WordPress update system, ensuring the folder structure was correct.
Outcome
The project delivers a complete multi-site WordPress management platform with:
- Centralized dashboard with real-time information from all sites
- Client management with fiscal data, billing, and history
- Security and optimization audits with score history
- Backup system with configuration by frequency and type
- SEO audits with Lighthouse and broken link detection
- Automatic internal link system with LLM-based suggestions
- AI agents with risk control, Telegram approval, and multi-step workflows
- Support tickets integrated with the WordPress plugin
- Remote plugin update from the portal
- Integration with Umami Analytics and Uptime Kuma
The backend (FastAPI) has 21 endpoints, 35+ business services, and 40+ data models. The WordPress plugin (PHP) has 15 classes and 43 REST endpoints. All deployed with Docker on a private server.
Lessons Learned
This project demonstrated that centralized management of multiple WordPress sites can be automated safely if an appropriate authentication protocol is designed between the portal and the plugins.
Integrating AI agents into an existing workflow required going step by step: first actions without autonomy, then autonomy with approval, and finally autonomy controlled by risk and cooldowns.
It also confirmed that multi-tenancy needs a consistent permissions model from the start: you cannot add security retroactively when productive data and users already exist.
Finally, the remote plugin update system taught that WordPress compatibility requires strictly following the format expected by the plugin manager: folder structure, main file header, and version verification.