我正在更改我的网站托管,所以我对所有内容、主题、数据库进行了备份,并使用 WP 中的导出实用程序导出所有帖子、页面等。
现在我正在尝试在新主机中导入帖子、页面和用户,但出现以下错误:
Failed to create new user for John Their posts will be attributed to the current user.
Failed to create new user for guest. Their posts will be attributed to the current user.
Failed to create new user for Sam. Their posts will be attributed to the current user.
Failed to import Media “MW profile”
Failed to import Media “LA house”
Failed to import Media “Gold”
Failed to import Media “Archive”
Failed to import Media “21882183”
...等等
我检查了导入 xml 文件和其中的路径,但我没有发现任何问题,因为导入 XML 文件中的路径与图像的真实路径完全相同。
那么有人可以告诉我这里可能做错了什么,以及如何解决这个问题吗?
最佳答案
这是我要做的:
- 将所有文件和文件夹从旧主机复制到新主机。
- 将数据库转储到旧主机上,并将其导入新主机。
(在此步骤中,您将拥有原始 WP 安装的完整备份)。
如有必要,请调整
wp-config.php
文件中的数据库连接参数以反射(reflect)您的新主机(某些主机强制使用 db 前缀名称,它可能与您的不同原始数据库名称)。您现在应该在各个方面都安装了相同的 WP。
关于php - WordPress 导入错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19072060/