[wordpress插件] Disable Multisite Rewrites禁用多站点重写

wordpress 插件 文章 2020-04-18 05:50 371 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

By default, WordPress Multisite uses certain rewrite rules for file uploads.

默认情况下,WordPress Multisite使用某些重写规则来上传文件。

This leads to a URL that doesn’t reflect the exact location of your files on the server.

这会导致URL不能反映文件在服务器上的确切位置。

This plugin disables that functionality.

该插件会禁用该功能。

Note: This plugin is extremely simple in purpose.

注意:此插件的目的非常简单。

It requires additional setup before it can be used with most Multisite Networks.

它需要附加设置才能与大多数多站点网络一起使用。

If your Multisite was initially created using WordPress 3.5 or later, then you do not need this plugin

如果您的多站点最初是使用WordPress 3.5或更高版本创建的,则不需要此插件

Before Use

使用前

This plugin is very specific in purpose.

此插件的用途非常具体。

In order to use it, you will need to follow some steps first:

为了使用它,您首先需要遵循一些步骤:

    1. Move your images from /wp-content/blogs.dir/SITENUM/files/ to /wp-content/uploads/sites/SITENUM/.

    2. 将图像从 /wp-content/blogs.dir/SITENUM/files / 移至 / wp-content / uploads / sites / SITENUM /

      SITENUM corresponds to the ID of each of your sub-sites.

    3. SITENUM 对应于每个子站点的ID。

    4. Modify the database for each site.

    5. 修改每个站点的数据库。

      I recommend using this awesome script (just don't forget

      我建议使用这个很棒的脚本(只是不要忘记

      to delete it when you're done!).

      完成后将其删除!)。

      You will need to update the image URLs in the database to replace http://site.example.com/files/ with http://site.example.com/wp-content/

      您将需要更新数据库中的图像URL,以将 http://site.example.com/files/ 替换为 http://site.example.com/wp-content/

      uploads/sites/SITENUM/

    6. 上传/站点/ SITENUM /

    7. Clear out the settings for each site for “Upload Path”, “Upload URL Path”, and “File Upload URL”.

    8. 清除每个站点的“上载路径”,“上载URL路径”和“文件上载URL”的设置。

      You can find these settings by going to Network Admin > Sites, then for each individual site, click the “Edit” link, then go to the Settings tab.

    9. 您可以通过以下方法找到这些设置:网络管理>站点,然后为每个站点单击“编辑”链接,然后转到“设置”标签。

安装步骤

    1. Upload the disable-multisite-rewrites folder to your /wp-content/plugins/ directory
    2. disable-multisite-rewrites 文件夹上传到您的 / wp-content / plugins / 目录

    3. Activate the plugin through the “Plugins” menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

下载地址
https://downloads.wordpress.org/plugin/disable-multisite-rewrites.1.0.zip
-EOF-

AI助手支持GPT4.0