Multi-tenant WordPress solution with shared MySQL and domain-based routing.
GrabWP Tenancy provides the foundation for multi-tenant WordPress with essential isolation features. This plugin focuses on cost-effective multi-tenancy with shared resources and basic tenant separation.
- 📥 Download: WordPress.org Plugin Directory - Official plugin distribution
- 🌐 Documentation: Official Website - Complete guides and support
- 🐛 Issues & Support: WordPress.org Support Forum - Community support
- 💻 Source Code: GitHub Repository - Development and contributions
- WordPress 5.0+
- PHP 7.4+
- Tested up to WordPress 6.8
- Go to Plugins > Add New in your WordPress admin
- Search for "GrabWP Tenancy"
- Click Install Now and then Activate
- Add to
wp-config.php:require_once __DIR__ . '/wp-content/plugins/grabwp-tenancy/load.php';
- Download from WordPress.org Plugin Directory
- Upload
grabwp-tenancyto/wp-content/plugins/ - Activate the plugin
- Add to
wp-config.php:require_once __DIR__ . '/wp-content/plugins/grabwp-tenancy/load.php';
📖 Need help? Check our complete documentation or visit the support forum.
wp-content/
├── uploads/
│ └── grabwp-tenancy/
│ ├── tenants.php # Domain mappings
│ └── {tenant_id}/
│ └── uploads/ # Isolated uploads per tenant
└── plugins/
└── grabwp-tenancy/ # Base plugin
- Shared MySQL with tenant prefixes (
{tenant_id}_) - Cost-effective tenant isolation using unique table prefixes
- Shared themes and plugins
- Isolated uploads per tenant (
wp-content/uploads/grabwp-tenancy/{tenant_id}/uploads)
$tenant = [
'id' => 'abc123', // 6-char alphanumeric
'domains' => [ // Array with primary first
0 => 'domain1.local',
1 => 'domain2.local'
],
'status' => 'active', // active/inactive
'created_date' => timestamp
];$tenant_mappings = [
'abc123' => [
0 => 'tenant1.grabwp.local',
],
'def456' => [
0 => 'tenant2-0.grabwp.local',
1 => 'tenant2-1.grabwp.local'
]
];flowchart TD
A[HTTP Request] --> B[Extract domain]
B --> C[Load tenants.php]
C --> D[Search tenant mappings]
D --> E{Found?}
E -->|Yes| F[Set tenant context]
E -->|No| G[Use default/main]
F --> H[Set database prefix]
F --> I[Set content paths]
G --> J[Continue with main site]
H --> K[Initialize WordPress]
I --> K
J --> K
K --> L[Process request]
- Functions:
grabwp_tenancy_prefix - Classes:
GrabWP_Tenancy_prefix - Constants:
GRABWP_TENANCY_prefix
- Issues: Report bugs and request features on GitHub Issues
- Pull Requests: Submit code improvements via GitHub Pull Requests
- Documentation: Help improve docs on our website
- 📖 Documentation: grabwp.com - Complete guides and tutorials
- 💬 Support Forum: WordPress.org Support - Community help
- 🐛 Bug Reports: GitHub Issues - Technical issues
- ⭐ Rate Plugin: WordPress.org Reviews - Share your experience
GPLv2 or later