Wordpress多站点配置

  1. 编辑wp-config.php,在“好了!请不要再继续编辑。请保存本文件。使用愉快!”这段话上面写入:define('WP_ALLOW_MULTISITE', true);

  2. 进入WP后台-----工具-----管理网络,选择“子目录”,然后点击 安装

  3. 然后会进入到“创建一个wordpress站点网络”面板,里面有详细步骤,按照页面说明进行操作

  4. 完成后会列出一个Apache Rewrite规则,我在网上找了Nginx的Wordpress多站点rewrite规则

location / {

  server_name_in_redirect off;

  port_in_redirect off;

  rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;

  if (!-e $request_filename) {

  rewrite ^.+?(/wp-.*) $1 last;

  rewrite ^.+?(/.*.php)$ $1 last;

  rewrite ^ /index.php last;

  }

}

原文地址:https://www.cnblogs.com/imbin/p/3459598.html