如何导入带有图片和特色图片的 wordpress 帖子?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/42392567/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 11:17:05  来源:igfitidea点击:

How to import wordpress posts with images and featured images?

wordpress

提问by Padmini Maddur

I have used Tools->import&export but it didn't work. I have tried using Wp-All-Import and Export plugin then also it is not working. Only the content imported not the images. How to fix this issue. Is there any way to import posts with images?

我使用了工具->导入和导出,但没有用。我曾尝试使用 Wp-All-Import 和 Export 插件,但它也不起作用。只有导入的内容而不是图像。如何解决这个问题。有没有办法导入带有图片的帖子?

回答by Roy Scheffers

The import and export of posts, pages, comments, and media is currently part of WordPress core. So use the default import and export utility to get this done. In this example I export posts but the same goes for pages, etc.

文章、页面、评论和媒体的导入和导出目前是 WordPress 核心的一部分。因此,请使用默认的导入和导出实用程序来完成此操作。在这个例子中,我导出帖子,但同样适用于页面等。

  1. Log into the WordPress website you need to copy from.
  2. On the dashboard go to Tools > Export > WordPress > Posts (install the plugin if needed)
  3. Save the file
  4. Repeat the process but this time choose Media (rename the file so you don't overwrite the prior one)
  5. Log into the WordPress Site to copy to.
  6. On the dashboard go to Tools > Import > WordPress
  7. Select the posts file
  8. Repeat step 6 and upload the media file.
  1. 登录您需要从中复制的 WordPress 网站。
  2. 在仪表板上转到工具 > 导出 > WordPress > 帖子(如果需要,安装插件)
  3. 保存文件
  4. 重复这个过程,但这次选择媒体(重命名文件,这样你就不会覆盖之前的文件)
  5. 登录到要复制到的 WordPress 站点。
  6. 在仪表板上转到工具 > 导入 > WordPress
  7. 选择帖子文件
  8. 重复步骤 6 并上传媒体文件。

All posts and media files are currently imported.

当前已导入所有帖子和媒体文件。

NOTES:

笔记:

Although all media is now on the new server, I had to take care of one additional step and rename the domain name for all database entries pointing to the images. I used the below tool to do this. (backup your DB before you proceed just in case...)

尽管所有媒体现在都在新服务器上,但我必须处理一个额外的步骤并为指向图像的所有数据库条目重命名域名。我使用下面的工具来做到这一点。(在继续之前备份您的数据库以防万一......)

https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

Instructions are on their website on how to update DB entries, in my case it had to run the tool and rename www.olddomain.com to www.newdomain.com.

他们的网站上有关于如何更新数据库条目的说明,在我的情况下,它必须运行该工具并将 www.olddomain.com 重命名为 www.newdomain.com。

Worked like a charm and Within 10 minutes I had all old data on the new server.

工作得很好,在 10 分钟内,我在新服务器上拥有了所有旧数据。

回答by Sehdev

There are many plugins available for the same. You can try the following:

有许多插件可用。您可以尝试以下操作:

https://wordpress.org/plugins/wp-attachment-export/

https://wordpress.org/plugins/wp-attachment-export/