isotopsweden/wp-hercules

该软件包已被弃用,且不再维护。未建议替代软件包。

顶级域名的简单域名映射

安装次数: 12,218

依赖项: 0

建议者: 0

安全性: 0

星级: 13

关注者: 2

分支: 3

开放问题: 2

类型:wordpress-muplugin

v1.1.0 2016-12-07 13:59 UTC

This package is auto-updated.

Last update: 2023-03-01 00:11:42 UTC


README

需要PHP 5.5.9和WordPress 4.5

顶级域名的简单域名映射。

安装

composer require isotopsweden/wp-hercules

使用

创建wp-content/sunrise.php

<?php

// Default mu-plugins directory if you haven't set it.
defined( 'WPMU_PLUGIN_DIR' ) or define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' );

require WPMU_PLUGIN_DIR . '/wp-hercules/sunrise.php';

此外,为了使sunrise.php能够加载,您必须在您的wp-config.php中添加以下内容

define( 'SUNRISE', 'on' );

创建新站点

安装Hercules后,您应使用wp-cli来添加新站点,而不是使用network/site-new.php,这是因为Hercules修改了wp site create命令,使您可以添加域名而不是仅添加别名,SUBDOMAIN_INSTALL应设置为true

wp site create --slug=example.com

许可证

MIT © Isotop