wordpress数据库中图片和帖子之间的关系在哪里?

发布于 2025-01-07 07:34:25 字数 490 浏览 0 评论 0原文

我正在尝试将 WordPress 网站从 wordpress.com 迁移到自托管网站。

正如人们所期望的那样,我将数据从 wordpress.com 导出到 xml 文件。然后,我尝试将数据导入到自托管站点上的 WordPress 安装中。我在导入时检查导入媒体,经过几次尝试后一切似乎都正常。(有很多图像,所以 Varnish 似乎在中间的某个地方卡住了,但最终一切都结束了)。所有图像都在新数据库中,但如果我查看仪表板中的“媒体”选项卡,图像和任何帖子之间都没有关系。因此,尽管帖子中直接链接的图像文件显示得很好,但原始帖子中定义的画廊都没有显示。

因此,我认为图像和帖子之间的关系在导入过程中的某个地方被删除了。我查看了 XML 文件,似乎无法找到图像(媒体)和帖子之间的关系到底在哪里。我还使用 phpmyadmin 查看了数据库,似乎也找不到它们相关的地方。

我希望如果我能找到这些关系在 XML 文件中的存储位置,我也许能够找到一种方法将它们导入到新数据库中。

对此有任何帮助将不胜感激。

I am trying to migrate a wordpress site from wordpress.com to a self-hosted site.

I export the data from wordpress.com to the xml file as one might expect. I then try to import the data into my wordpress installation on the self-hosted site. I check off import media when importing and everything seems to work after a couple of tries.( there are a LOT of images, so Varnish seems to gak somewhere in the middle, but it eventually all comes over). All the images are in the new database, but if I look at the Media tab in the Dashboard, there are no relationships between the images and any of the posts. Consequently none of the galleries defined in the original posts show up, although the directly linked image files in the posts show up fine.

So, I think the relationships between the images and the posts are getting dropped somewhere during the import. I've looked thru the XML file and can't seem to find where exactly these relationships between images (media) and posts are. I've also looked thru the database using phpmyadmin and can't seem to find where they're related either.

I'm hoping that if I can find where these relationships are stored in the XML file, I might be able to find a way to get them imported into the new database.

Would appreciate any help with this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疯到世界奔溃 2025-01-14 07:34:25

新的自托管网站上缺少哪些画廊的 URL?它们仍然是“yoursite.wordpress.com/wp-content/...”吗?

您需要使用 phpmyadmin 在数据库中查找/替换,以更改仍指向 yoursite.wordpress.com 的 URL。请参阅如何操作将 WordPress 博客移至新域或位置 » 我的数字生活 和/或使用 搜索正则表达式,a很好的插件,允许在所有帖子和页面中使用 Grep 进行搜索和替换。

What are the URLs of the galleries that are missing on the new self-hosted site? Are they still "yoursite.wordpress.com/wp-content/..."?

You need to find/replace in the database using phpmyadmin to change URLs that are still pointing to yoursite.wordpress.com. See How to Move WordPress Blog to New Domain or Location » My Digital Life and/or use Search RegEx, a good plugin that allows searching and replacing with Grep through all posts and pages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文