最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

posts - Moving Gutenberg content from one website to another (block media ids wrong?)

programmeradmin0浏览0评论

I have been looking at moving page content created in Gutenberg from one website to another.

I can use the “Copy All Content” option in the Gutenberg top right menu and if I paste this into a page on my new website all the blocks appear and seems fine.

However if I view the code behind the blocks I find that the blocks reference the IDs of the media set on the old website.

The media does not exist on the new website – what repercussions does having an incorrect media ID have here? Is there anyway other than manually downloading and reuploading the images to have these linked correctly?

If I use the WordPress export/import tool I get the same result.

I have been looking at moving page content created in Gutenberg from one website to another.

I can use the “Copy All Content” option in the Gutenberg top right menu and if I paste this into a page on my new website all the blocks appear and seems fine.

However if I view the code behind the blocks I find that the blocks reference the IDs of the media set on the old website.

The media does not exist on the new website – what repercussions does having an incorrect media ID have here? Is there anyway other than manually downloading and reuploading the images to have these linked correctly?

If I use the WordPress export/import tool I get the same result.

Share Improve this question asked Jan 31, 2020 at 15:33 SteveoSteveo 296 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The obvious result of an incorrect media ID is that it cannot find the image (because it's not in the media set).

One way to work around this, is to set up your images on the old site as url's instead of media items. I'm sure this is not the only and definitely not the best solution. However, it works for me. (Select "Insert from URL" instead of "Media Gallery". The url's for each image are shown in the "Copy Link" field when you select the image in the media gallery). However, this means that the image have to remain available on the old website.

发布评论

评论列表(0)

  1. 暂无评论