如何将带有图像的wordpost帖子从一个wordpress站点导入到另一个站点?
-
-
看到此[此处的文章](https://businessbloomer.com/woocommerce-exportimport-product-featured-images/),他们提到了如何导入/导出**特征图像**see this [article here](https://businessbloomer.com/woocommerce-exportimport-product-featured-images/), they mentioned how can you import/export **featured images**
- 0
- 2017-02-20
- Arsalan Mithani
-
您需要导入多少个帖子?事实是,您可以使用WP默认导入导出,而只需离开即可完成工作,导入图像需要一段时间,因此请花点时间.选项B将可能导出/导入所有媒体文件,然后继续发布.How many posts do you need to import export? the thing is, you can use WP default import export and just leave to do it's work, It will take a while for the images to get imported so give it time. Option B would mbe to export /import all media files and then proceed with posts.
- 2
- 2017-02-20
- Marko Jezernik
-
嗨..不仅是特色图片.帖子中的所有图像都不会导入.Hi.. Not only featured images. All images in post are not importing.
- 0
- 2017-02-22
- Padmini Maddur
-
@ArsalanMithani那篇文章只谈论WooCommerce产品图片中的特色图片@ArsalanMithani that article only talks about featured images in WooCommerce product images
- 0
- 2020-08-06
- clayRay
-
6 个回答
- 投票数
-
- 2018-09-26
为什么不导入图像
这是导致图像附件出现问题的导出步骤.除非您选择"所有内容"导出选项,否则WordPress的导出功能不包含"附件"帖子类型.但是,如果您只想将帖子从一个站点导入和导出到另一个站点,则会丢失附件.有关此这里.
无论如何如何将图片导入新网站
因此,如果您仅导出和导入帖子,则一种选择是手动移动图像.但这可能是很多工作,尤其是在较大的站点上.另一种选择是导入不包含图片的帖子,然后使用自动上传图片插件之后添加图像.该插件可以执行以下操作:
- 它会在您的帖子中查找图像URL(导入的帖子中仍然具有图像URL,但是它们指向内容从中导出的网站);
- 然后获取这些外部图像,并将其上传到本地WordPress上载目录,并将图像添加到媒体库中;
- 最后,它将旧的图像URL替换为新的URL.
该过程是半自动的,并且相对较快.完成后,您可以再次卸载该插件,这样您的网站上就不会再有多余的插件了.插件文档中未明确记录为此目的使用插件的情况,因此这里是分步指南.
分步:使用WordPress导入器和自动上传图像插件将帖子和图像从一个网站导入另一个网站
步骤1:在旧网站上准备导出文件
在旧网站上,转到"工具>导出",然后仅导出您的帖子.第2步:将您的帖子导入新网站
在新网站上,转到"工具>导入",然后导入导出的帖子.导入程序可以选择下载和导入文件附件,但是如果您不迁移所有内容,则此操作将不起作用,因此可以忽略它.第3步:安装并激活"自动上传图片"插件
它与WordPress存储库中的任何其他插件一样安装.激活后,该插件会在"设置>自动上传图片"下添加一个设置页面,但以我的经验,您可以将其保留为默认设置.第4步:将图片从旧站点转移到新站点
在撰写本文时,该插件没有选项来自动浏览您的帖子并批量上传以及更新所有图像.而是在保存时分别更新每个帖子.如果您有很多职位,这是很多工作,但是有一些技巧.您可以转到帖子概述屏幕,然后批量更新您的帖子.关于此此处(在多站点上有用的注释).基本上,您选择了多个帖子,然后在"批量操作"下选择"编辑",然后按"应用"按钮.然后,不做任何调整,单击"更新"按钮.根据您的服务器,进程运行时可能会超时,因此最好一次执行20到50个帖子.
第5步:检查您的信息并停用/卸载插件
完成所有操作后,您可以检查您的帖子并确认它们现在引用了本地图像.然后,您不再需要该插件,就可以安全地停用并删除它.最终想法
首先备份新站点(至少是站点数据库)是一个好主意.
在撰写本文时,"自动上传图片"插件尚未更新很长时间,但在测试时效果很好.
通过这种方法,帖子中的所有图像都将被导入,而不仅仅是精选图像.
Why images don't get imported
It's the export step that causes the issue here with image attachments. WordPress’ export function doesn’t include the “attachment” post type unless you select the “All content” export option. But if you only want to import and export your posts from one site to another, you lose your attachments. There is more information about the why of this here.
How to get images into your new website anyway
So if you're only exporting and importing posts, one option is to move your images manually. But that's potentially a lot of work, especially on larger sites. The other option is to import you posts without the images, and then use the Auto Upload Images plugin to add the images afterwards. This plugin does several things:
- It looks for image URLs in your posts (imported posts do still have image URLs in them, but they point to the site the content was exported from);
- It then gets those external images and uploads them to the local WordPress uploads directory and adds the images to the media library;
- And finally, it replaces the old image URLs with new URLs.
The process is semi-automatic and relatively quick. You can uninstall the plugin again when you're done, so you're not left with an extra plugin on your website. Using the plugin for this purpose isn't explicitly documented in the plugin's documentation, so here is a step-by-step guide.
Step by step: Importing posts and images from one website into another with the WordPress Importer and Auto Upload Images plugin
Step 1: Prepare your export file on the old site
On your old website go to 'Tools > Export' and export your posts only.Step 2: Import your posts into the new site
On your new website go to 'Tools > Import' and import the posts you exported. The importer has an option to download and import file attachments, but this won't work if you're not migrating all content, so you can ignore this.Step 3: Install and activate the Auto Upload Images plugin
It installs as any other plugin in the WordPress repository. Once activated the plugin adds a settings page under 'Settings > Auto Upload Images', but in my experience you can leave these to their defaults.Step 4: Get the image from your old site into your new site
At the time of writing the plugin has no option to automatically go through your posts and bulk upload plus update all the images. Instead, it updates each post individually when you save it. If you have many posts this is a lot of work, but there is a little trick. You can go to your posts overview screen and bulk update your posts. There is a little more information on this here (useful note on multisite).Essentially, you select multiple posts and then under 'bulk actions' choose 'edit' and press the 'apply' button. Then, without making any adjustments, click the 'Update' button. Depending on your server you may get a timeout as the process runs, so it's a good idea to do this maybe 20 to 50 posts at a time.
Step 5: Check your posts and deactivate/uninstall the plugin
When all is done you can check your posts and confirm they now reference local images. You then no longer need the plugin and you can safely deactivate and delete it.Final thoughts
Probably a good idea to make a backup of your new site first (at least of your site's database).
At the time of writing the Auto Upload Images plugin hasn't been updated for quite some time, but on testing it worked fine.
With this method all images in posts get imported, not just featured images.
-
好答案.完美运作.Great answer. Works perfectly.
- 1
- 2019-01-22
- Chris
-
这对我不起作用.This didn't work for me.
- 0
- 2019-06-05
- shipshape
-
后期图片有效,精选图片无效.Images in post worked, featured images did not.
- 0
- 2020-06-09
- Gangesh
-
与WP 5.4.2完美兼容-喜欢批量编辑解决方案!!Worked great with WP 5.4.2 - love the bulk edit solution!!
- 0
- 2020-08-06
- pathfinder
-
- 2018-07-02
使用导出特色图片插件,该插件可让您将帖子或自定义帖子类型的特色图片导出到WordPress xml,以便您可以使用WordPress导入器工具将其导入其他网站.
使用方法?
- 首先,将您的帖子导入到新网站.
- 在您的旧站点中使用此插件,然后转到工具>导出特色图片下,然后选择帖子类型. 然后,您将获得一个 .xml文件.
- 在新站点中,转到工具,然后选择 wordpress导入.然后选择上一步中下载的 .xml文件.
仅此而已..您的帖子已映射有特色图片.享受吧!
Use Export Featured Images plugin that let you export Featured images from posts or custom post types into a WordPress xml so you can import them in other sites using the WordPress importer tool.
https://wordpress.org/plugins/export-featured-images/#description
How to use??
- First, import your posts to the new site.
- Use this plugin in your old site and go to under tools > Export Featured Images and select post types. Then you will get a .xml file.
- In your new site go to Tool and select wordpress import. Then select the .xml file which you downloaded in the previous step.
That’s all.. Your posts are mapped with featured images. Enjoy!
-
它有一段时间没有更新,但可以与Wordpress 5.2.2一起正常使用.救命!!我真的不知道为什么这种功能不是核心.It's not been updated for a while but works just fine with Wordpress 5.2.2. Life saver!! Why this level of functionality is not in core I really do not know.
- 1
- 2019-06-19
- Chris Pink
-
@ChrisPink是否在步骤1和3或仅在步骤3中检查"导入媒体附件"?@ChrisPink Are you checking "Import media attachments" at both step 1 and 3, or just step 3?
- 1
- 2019-06-19
- Jonny
-
步骤1和3.Both steps 1 and 3.
- 2
- 2019-06-20
- Chris Pink
-
不幸的是,此插件似乎已从WP存储库中删除.Unfortunately this plugin seems to have been removed from the WP repository.
- 0
- 2019-09-05
- clayRay
-
使用WordPress 5.2.5测试导出,并使用WordPress 5.2.4测试导入,就像一个魅力!Tested export with WordPress 5.2.5 and tested import with WordPress 5.2.4, worked like a charm!
- 2
- 2020-03-06
- Ken
-
嗯,是的,您仍然可以从[插件页面](https://wordpress.org/plugins/export-featured-images/)下载它.大!Ah, yes, you can still download it from the [plugin page](https://wordpress.org/plugins/export-featured-images/). Great!
- 0
- 2020-08-06
- clayRay
-
与WP 5.4.2完美兼容Worked great with WP 5.4.2
- 0
- 2020-08-06
- pathfinder
-
- 2018-12-30
我是回答此问题的最佳人选,因为我在导入时也面临相同的问题.问题实际上不在导入中.
正在进行导出.导出所有内容时,将使用附件导入该XML文件,所有图像将被下载,但是当您导出选定的帖子然后使用附件导入时,则仅导入帖子. 因此,要解决此问题,有一个插件可以导出正确的XML文件,就像导出所有内容XML文件一样.
所以这是插件">://://presspress.org/plugins/demomentsomtres -wp-export
这将创建一个新的导出选项,就像默认的WordPress导出GUI一样,但是具有高级功能,因此,当您导入XML文件时,将在导入XML文件(从默认服务器到本地服务器)的同时导入媒体.您无需将其安装在导入媒体的Wordpress中,只需将其安装在导出服务器WordPress上即可.
I am the best person to answer this question as I was facing the same issue while importing. The problem is not actually in importing.
It is in exporting. When you export all content then you import with attachments that XML file all your images will be download but when you export selected posts then import with attachments then only posts get imported. So to fix this there is a plugin which exports the right XML file that it does same like export all content XML file.So here is the plugin https://wordpress.org/plugins/demomentsomtres-wp-export
This will create a new export option just like default WordPress export GUI, but with advanced features so that when you import that XML file your media will be imported while importing that XML file(from default server to your local server). You don't need to install it in the Wordpress where you importing media, It just needs to be installed on the exporting server WordPress.
-
- 2019-08-20
那对我有用.所有其他选项均无效,但该插件终于满足了我的需要!
我不得不将房地产从一个站点导出到另一个站点.每个属性都有很多图像.此插件 https://wordpress.org/plugins/demomentsomtres-wp-export 做到了正是我需要的-从第一个站点下载所有图像并将其上传到第二个站点.
That did the trick for me. All other options didn't work, but that plugin finally did what I needed!
I had to export real estate properties from one site to another. Each property has a lot of images. This plugin https://wordpress.org/plugins/demomentsomtres-wp-export did exactly what I needed - downloaded and uploaded all the images from the first site to the second.
-
- 2017-08-13
您可以通过多种方式执行此操作:
- 手册
- 使用插件
对于手动操作,这要花更长的时间,您需要从一台服务器下载完整文件,然后将其上传到另一台服务器.对备份数据库进行一些更改,即替换URL,然后再上传数据库文件.
另一种更好的方法是使用名为" Allin one Migration"的插件.这是可以指导您完成整个过程的链接:
There are multiple ways you can do this:
- Manual
- Using plugin
For manual, it's a little more lengthy process, you need to download complete files from one server and upload it to another. Do some changes to the backup DB i.e replacing urls and then uploading the DB file as well.
Other way, which is far more better is to use the plugin called as "All in one Migration". Here is the link which can guide you on the complete process:
https://makersbyte.com/easily-export-import-wordpress-sites/
-
- 2020-08-04
我刚刚找到了今天的操作方法,并通过照片的出色指南回答了这个问题,其中包含有关如何使用WordPress中的导出和导入工具将照片传输到要在帖子和页面中使用的新网站的照片.这是通过编辑xml文件以显示正确传输的图像URL来完成的.
I just found out how to do this today, and answered this question with a great guide with photos on how to use the export and import tools in WordPress to transfer photos to a new site to be used in posts and pages. This is done by editing the xml files to show the correctly transferred image URLs.
我使用了Tools->import&export,但是没有用.我尝试使用Wp-All-Import和Export插件,但它也无法正常工作.仅导入的内容不导入图像.如何解决此问题.有什么方法可以导入带有图片的帖子?