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;

  }

}

相关文章:

  • 2021-08-28
  • 2022-02-17
  • 2021-09-23
  • 2021-07-19
  • 2021-07-07
  • 2021-06-09
猜你喜欢
  • 2022-12-23
  • 2021-07-16
  • 2021-05-24
  • 2021-11-05
  • 2021-06-02
  • 2021-11-18
  • 2021-11-17
相关资源
相似解决方案