stuttter/wp-multi-network
Composer 安装命令:
composer require stuttter/wp-multi-network
包简介
Provides a Network Management Interface for global administrators in WordPress Multisite installations.
README 文档
README
Provides a Network Management Interface for global administrators in WordPress Multisite installations.
Turn your WordPress Multisite installation into many multisite networks, surrounding one global set of users.
- Reveals hidden WordPress Multisite functionality.
- Includes a "Networks" top-level Network-Admin menu.
- Includes a List Table for viewing available networks.
- Allows moving subsites between networks.
- Allows global administrators to create new networks with their own sites and domain arrangements.
- Group sites into logical networks using nearly any combination of domain (example.org) and path (/site/).
Installation
- Download and install using the built in WordPress plugin installer.
- Activate in the "Plugins" network admin panel using the "Network Activate" link.
- Comment out the
DOMAIN_CURRENT_SITEline in yourwp-config.phpfile. If you don't have this line, you probably need to enable multisite.
Cookie Configuration
Stash something like this in your wp-config.php to use a single cookie configuration across all sites & networks.
Replace example.com with the domain for the main site in your primary network.
// Cookies define( 'COOKIEHASH', md5( 'example.com' ) ); define( 'COOKIE_DOMAIN', 'example.com' ); define( 'ADMIN_COOKIE_PATH', '/' ); define( 'COOKIEPATH', '/' ); define( 'SITECOOKIEPATH', '/' ); define( 'TEST_COOKIE', 'thing_test_cookie' ); define( 'AUTH_COOKIE', 'thing_' . COOKIEHASH ); define( 'USER_COOKIE', 'thing_user_' . COOKIEHASH ); define( 'PASS_COOKIE', 'thing_pass_' . COOKIEHASH ); define( 'SECURE_AUTH_COOKIE', 'thing_sec_' . COOKIEHASH ); define( 'LOGGED_IN_COOKIE', 'thing_logged_in' . COOKIEHASH );
Domain/Sub-domain flexibility
Stash something like this in your wp-config.php to make new site/network/domain creation and resolution as flexible as possible.
You'll likely need some server configuration outside of WordPress to help with this (documentation pending.)
// Multisite define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', false ); define( 'PATH_CURRENT_SITE', '/' ); define( 'DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST'] ); // Likely not needed anymore (your config may vary) //define( 'SITE_ID_CURRENT_SITE', 1 ); //define( 'BLOG_ID_CURRENT_SITE', 1 ); // Uncomment and change to a URL to funnel no-site-found requests to //define( 'NOBLOGREDIRECT', '/404/' ); /** * These are purposely set for maximum compliance with multisite and * multinetwork. Your config may vary. */ define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] ); define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] );
Single Sign-on
Single Sign-on is a way to keep registered users signed into your installation regardless of what domain, subdomain, and path they are viewing. This functionality is outside the scope of what WP Multi Network hopes to provide, but a dedicated SSO plugin made specifically for WP Multi Network is in development.
FAQ
Can I have separate domains?
Yes you can. That is what this plugin does best.
Will this work on standard WordPress?
You need to have WordPress Multisite enabled before using this plugin.
See: https://codex.wordpress.org/Create_A_Network
Where can I get support?
Community: https://wordpress.org/support/plugin/wp-multi-network
Development: https://github.com/stuttter/wp-multi-network/discussions
What's up with uploads?
WP Multi-Network needs to be running to set the upload path for new sites. As such, all new networks created with this plugin will have it network activated. If you do disable it on one of your networks, any new site on that network will upload files to that network's root site, effectively causing them to be broken.
Leave this plugin activated, and it will make sure uploads go where they are expected to.
Can I achieve a multi-level URL path structure domain/network/site with subfolder network?
To achieve nested folder paths in this fashion network1/site1, network1/site2 etc, please follow the steps in this article to construct a custom sunrise.php (Thanks to Paul Underwood for providing these steps).
Can I contribute?
Yes! Having an easy-to-use interface and powerful set of functions is critical to managing complex WordPress installations. If this is your thing, please help us out! Read more in the plugin contributing guidelines.
stuttter/wp-multi-network 适用场景与选型建议
stuttter/wp-multi-network 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24.71k 次下载、GitHub Stars 达 235, 最近一次更新时间为 2016 年 02 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 stuttter/wp-multi-network 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 stuttter/wp-multi-network 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 24.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 236
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2016-02-08