Add Multi-Site Support for Managing Multiple WordPress Sites #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements comprehensive multi-site support for the WordPress MCP server, enabling users to manage multiple WordPress installations from a single MCP server instance.
Key Features
🌐 Multi-Site Management
list_sites,get_site,test_site🔧 Core Implementation
src/config/site-manager.ts): Centralized site configuration and client managementsrc/tools/site-management.ts): New tools for site discovery and testingsiteIdparameter📝 Configuration Options
WORDPRESS_N_URL: Site URL (required)WORDPRESS_N_USERNAME: WordPress username (required)WORDPRESS_N_PASSWORD: Application password (required)WORDPRESS_N_ID: Custom site identifier (optional)WORDPRESS_N_DEFAULT: Mark as default site (optional)WORDPRESS_N_ALIASES: Comma-separated aliases (optional)✨ Enhanced Features
site_idparameterTesting
Tested with two live WordPress sites (wpfusion.com and verygoodplugins.com):
site_idparametersite_idspecified)Documentation Updates
Breaking Changes
None. The implementation is fully backward compatible with existing single-site configurations.
Files Changed
src/config/site-manager.ts(new): Site management implementationsrc/tools/site-management.ts(new): Site management toolssrc/wordpress.ts: Updated to use SiteManagersrc/server.ts: Removed legacy WORDPRESS_API_URL checksrc/tools/index.ts: Added site management toolssrc/tools/unified-content.ts: Addedsite_idsupport to all toolsREADME.md: Multi-site documentationCLAUDE.md: Technical documentationclaude_desktop_config.json.example: Multi-site examples