Replies: 2 comments
-
WP-CLI Multisite Management GuideEssential WP-CLI commands specifically designed for WordPress Multisite networks. These commands leverage multisite-specific functionality that isn't available in single WordPress installations. 🔌 Network Plugin OperationsNetwork-wide Plugin Activation# Activate a plugin across the entire network
# This makes the plugin active on all sites in the multisite network
wp plugin activate contact-form-7 --network Install and Network Activate# Install a plugin and immediately activate it network-wide
# Combines installation with network activation in one command
wp plugin install woocommerce --network --activate Network Deactivation# Deactivate a plugin from the entire network
# This will disable the plugin on all sites in the network
wp plugin deactivate jetpack --network 🎨 Network Theme ManagementEnable Theme for Network# Make a theme available for activation across the network
# Note: This doesn't activate the theme, just allows subsites to use it
wp theme enable storefront --network Enable and Activate Network-wide# Enable a theme for the network AND activate it on the main site
# Combines enabling for network with activation
wp theme enable twentytwentyfour --network --activate Disable Theme Network-wide# Remove a theme from being available across the network
# Subsites will no longer be able to activate this theme
wp theme disable storefront --network 🌐 Site ManagementCreate New Site in Network# Create a new subsite in the multisite network
# --slug: URL path for subdirectory installs or subdomain name
# --title: Site title shown in admin and frontend
# --email: Administrator email for the new site
wp site create --slug=shop --title="Online Shop" --email="admin@example.com" Delete Site from Network# Remove a site from the multisite network
# The number (5) is the blog_id of the site to delete
# --yes flag skips confirmation prompt
wp site delete 5 --yes List All Network Sites# Display all sites in the multisite network
# Shows blog_id, URL, last_updated, and registered date
wp site list 🔄 Bulk Operations Across NetworkInstall Plugin on All Sites# Install and activate a plugin on every site in the network
# Gets list of all site URLs, then runs plugin install on each
wp site list --field=url | xargs -I % wp plugin install contact-form-7 --url=% --activate Update Options Network-wide# Update a WordPress option on all sites in the network
# Example: Change tagline on all sites
wp site list --field=url | xargs -I % wp option update blogdescription "New tagline" --url=% Run Commands on Specific Site TypesSubdirectory Site# Target a specific subdirectory site (example.com/blog)
wp plugin list --url=example.com/blog Subdomain Site# Target a specific subdomain site (blog.example.com)
wp plugin list --url=blog.example.com Domain Mapped Site# Target a site with custom domain mapping
wp plugin list --url=customdomain.com 💡 Command BreakdownKey Multisite Flags
Understanding xargs Usage# This pattern is common for bulk operations:
wp site list --field=url | xargs -I % wp [command] --url=%
# Breaking it down:
# 1. wp site list --field=url → Gets list of all site URLs
# 2. | → Pipes output to next command
# 3. xargs -I % → Takes each URL and replaces % with it
# 4. wp [command] --url=% → Runs command on each site
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Great, thank you! 🙏 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
WordPress Multisite Support for Bootscore Theme
This documentation provides a comprehensive guide for implementing WordPress Multisite/Network functionality with the Bootscore (Bootstrap 5) theme, supporting all three configurations: subdirectories, subdomains, and domain mapping.
📚 Reference
🏗️ Theme Structure
This setup provides a flexible, scalable foundation for running Bootscore on WordPress Multisite:
🔧 Core Implementation
Multisite Detection & Configuration
Add this to your
functions.php
:🌐 Network Type Configurations
1. Subdirectory Setup
For sites like
site.com/blog
,site.com/shop
:2. Subdomain Setup
For sites like
blog.site.com
,shop.site.com
:3. Domain Mapping Setup
For mapped domains like
brand1.com
,brand2.net
:🎨 Dynamic SCSS & CSS Management
Base SCSS Structure
Create a
style.scss
file:Dynamic CSS Generation
⚙️ Network Admin Controls
Create a
network-admin.php
file:⚡ Performance Optimization
Create a
cache-config.php
file:✅ Implementation Checklist
Bootscore Multisite Setup Steps:
📧 Feature Request for Bootscore Team
Subject: Native WordPress Multisite/Network Support Enhancement
Dear Bootscore Development Team,
I hope this message finds you well. First, I want to express my appreciation for creating such an excellent Bootstrap-based WordPress starter theme. The clean codebase, built-in SCSS compiler, and minimal approach make Bootscore a joy to work with.
🎯 Feature Request
I would like to propose adding native WordPress Multisite/Network support to Bootscore. As someone who manages multiple WordPress sites, I believe this enhancement would significantly benefit the Bootscore community.
💼 Use Case Scenarios
Multisite support would enable developers to:
🛠️ Proposed Implementation
The enhancement could include:
🌟 Community Benefits
This feature would:
🤝 Offer to Contribute
I would be happy to:
I believe many developers in the community would greatly appreciate and benefit from official Multisite support. Would you consider adding this to your development roadmap for upcoming releases?
Thank you for your time and for maintaining such an excellent theme framework. I look forward to hearing your thoughts on this proposal.
Best regards,
Vladislav
P.S. If this is already on your roadmap or if there are existing solutions I've missed, I'd be grateful for any guidance you can provide.
Beta Was this translation helpful? Give feedback.
All reactions