Post by account_disabled on Dec 13, 2023 6:45:43 GMT
WordPress 多站点有很多优点。它允许您只需安装一个 WordPress 即可创建任意数量的网站。它允许这些站点之间的连接,共享数据和用户,并为您提供了一种通过向用户出售网络上的站点来通过安装 WordPress 赚钱的方法。 但有时,单站点 WordPress 安装可能是适合您情况的最佳选择。也许您不想与其他站点共享用户数据库。也许您的网站已经比网络上的其他网站大得多,并且您想将其分开。或者您可能想要为该站点提供不同的托管环境,或者您正在从其他人的多站点网络迁移到您自己的单一安装。 另一种可能性是您一直在管理一个小型多站点网络,但现在您想要删除除一个站点之外的所有站点并将安装恢复到单个站点。 好消息是,您可以从 WordPress Multisite 迁移子网站并将其带回到单个站点下,或者将网络转换为单个站点。不太好的消息是,此步骤比将单个站点迁移到另一个 WordPress 安装或另一个域更复杂。 在本文中,我们将向您展示如何将 WordPress 站点从WordPress 多站点迁移到单个站点,而不丢失任何数据。 为什么从 WordPress 多站点迁移到单个站点比迁移单个站点更复杂 让我们看看为什么从多站点网络迁移站点比在包含单个站点的安装之间迁移更复杂。
原因在于 WordPress Multisite 存储数据和文件的方式,以及其中一些数据与网络上其他 电话号码清单 站点的数据一起存储的事实。 多站点网络存储来自每个站点的数据,如下所示: 每个站点的上传文件单独存储在 WordPress-content/uploads/sites/xx 中,其中 xx 是单个站点 ID。 大多数数据(包括帖子、帖子元数据、分类法等)都针对每个站点单独存储在专用数据库表中,每次将新站点添加到网络时都会创建这些数据库表。它们被赋予一个包含站点 ID 的前缀,因此 wp_12_posts 将是站点 12 的帖子表。 全网的用户数据存储在两张表中。用户不再只是成为一个网站的用户,而是拥有一个网络范围的帐户,该帐户存储有关该人有权访问的网站的元数据。这意味着您无法导出用户数据库表并将其迁移到新站点:您必须单独迁移用户。 主题和插件文件仅在网络上存储一次,无论激活它们的站点数量如何。这是多站点的最大优势之一,因为这意味着您只需更新主题和插件一次。但是当您将站点从网络上迁移时,事情就会变得复杂。 当我们解释从 WordPress 多站点迁移到单个站点的过程时,我们将向您展示如何单独管理站点的每个部分,以便您可以无缝迁移它。 术语说明:在本文中,我们将多站点网络中的站点称为“子站点”。
我们将使用“基本站点”来指代网络的主站点,这是在激活多站点之前存在的。我们将其专用 WordPress 安装中的独立站点称为“单个站点”。 如何将子网站从 WordPress 多站点迁移到单个站点 因此,假设您没有被我到目前为止所说的有关该过程的内容吓到,让我们看一下您可以使用的不同方法。 选项有: 使用免费的导出/导入插件手动迁移数据和文件。 使用迁移插件导出所有数据和文件。 执行手动迁移。 让我们逐一看一下这些方法。 1. 使用免费插件将子站点从多站点 WordPress 网络迁移到单个站点 第一个选项使用免费的导入/导出插件来迁移内容,并使用另一个免费插件来迁移小部件设置。 这种方法的优点是它是免费的,并且不涉及任何数据库操作,所以我们可以说它实际上是万无一失的。然而,它有一些缺点: 唯一迁移的用户将是创建内容的用户:您必须手动迁移所有其他用户。 您将无法迁移小部件设置以外的任何设置。如果您有复杂的设置和插件(例如电子商务的设置和插件),我们不推荐此方法,因为您将花费大量时间手动复制所有设置。 但如果您的网站很简单,插件数量很少,没有太多的自定义,并且用户不多,那么这可能是最简单的方法。 让我们看看如何做。有六个步骤: 在单个站点中创建新安装。
原因在于 WordPress Multisite 存储数据和文件的方式,以及其中一些数据与网络上其他 电话号码清单 站点的数据一起存储的事实。 多站点网络存储来自每个站点的数据,如下所示: 每个站点的上传文件单独存储在 WordPress-content/uploads/sites/xx 中,其中 xx 是单个站点 ID。 大多数数据(包括帖子、帖子元数据、分类法等)都针对每个站点单独存储在专用数据库表中,每次将新站点添加到网络时都会创建这些数据库表。它们被赋予一个包含站点 ID 的前缀,因此 wp_12_posts 将是站点 12 的帖子表。 全网的用户数据存储在两张表中。用户不再只是成为一个网站的用户,而是拥有一个网络范围的帐户,该帐户存储有关该人有权访问的网站的元数据。这意味着您无法导出用户数据库表并将其迁移到新站点:您必须单独迁移用户。 主题和插件文件仅在网络上存储一次,无论激活它们的站点数量如何。这是多站点的最大优势之一,因为这意味着您只需更新主题和插件一次。但是当您将站点从网络上迁移时,事情就会变得复杂。 当我们解释从 WordPress 多站点迁移到单个站点的过程时,我们将向您展示如何单独管理站点的每个部分,以便您可以无缝迁移它。 术语说明:在本文中,我们将多站点网络中的站点称为“子站点”。
我们将使用“基本站点”来指代网络的主站点,这是在激活多站点之前存在的。我们将其专用 WordPress 安装中的独立站点称为“单个站点”。 如何将子网站从 WordPress 多站点迁移到单个站点 因此,假设您没有被我到目前为止所说的有关该过程的内容吓到,让我们看一下您可以使用的不同方法。 选项有: 使用免费的导出/导入插件手动迁移数据和文件。 使用迁移插件导出所有数据和文件。 执行手动迁移。 让我们逐一看一下这些方法。 1. 使用免费插件将子站点从多站点 WordPress 网络迁移到单个站点 第一个选项使用免费的导入/导出插件来迁移内容,并使用另一个免费插件来迁移小部件设置。 这种方法的优点是它是免费的,并且不涉及任何数据库操作,所以我们可以说它实际上是万无一失的。然而,它有一些缺点: 唯一迁移的用户将是创建内容的用户:您必须手动迁移所有其他用户。 您将无法迁移小部件设置以外的任何设置。如果您有复杂的设置和插件(例如电子商务的设置和插件),我们不推荐此方法,因为您将花费大量时间手动复制所有设置。 但如果您的网站很简单,插件数量很少,没有太多的自定义,并且用户不多,那么这可能是最简单的方法。 让我们看看如何做。有六个步骤: 在单个站点中创建新安装。