How to Copy Post Content From One Site to Another (Including Images)

Image of two computers transferring images over
License: Adobe Stock

I ran into a brick wall recently. Just figuratively.

I was transferring content between sites, because, well, I wanted to repurpose content. Gutenberg was supposed to make this easy; just copy all the blocks on a post from Site 1, and paste it into a new post on Site 2. Easy peasy? Not quite.

Copying post content is easy…

Just click on the three vertical dots at the top-right of the block editor and choose Copy All Content.

When you copy all the content, your clipboard will be full of a mixture of HTML comments and regular markup.

<figure class="wp-block-image alignwide size-full"><a href="https://mediaron.com/wp-content/uploads/2021/02/computer-updating.jpg"><img src="https://mediaron.com/wp-content/uploads/2021/02/computer-updating.jpg" alt="Computer Illustration of an update loading" class="wp-image-10901"/>a><figcaption>License: Adobe Stockfigcaption>figure> <p class="gb-headline gb-headline-c745e0ea"><span class="gb-icon"> <svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" class="svg-inline--fa fa-table fa-w-16" data-icon="table" data-prefix="fad" aria-hidden="true"><g class="fa-group"><path opacity="0.4" d="M288 160v96h160v-96zm0 256h160v-96H288zM64 256h160v-96H64zm0 160h160v-96H64z" fill="currentColor" class="fa-secondary">path><path d="M464 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h416a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48zM224 416H64v-96h160zm0-160H64v-96h160zm224 160H288v-96h160zm0-160H288v-96h160z" fill="currentColor" class="fa-primary">path>g>svg>span><span class="gb-headline-text">Table of Contentsspan>p> <p>This article is quite long. Here is a table of contents to jump to your favorite section.p> <div class="wp-block-kadence-accordion alignnone"><div class="kt-accordion-wrap kt-accordion-wrap kt-accordion-id_78a1e9-86 kt-accordion-has-2-panes kt-active-pane-0 kt-accordion-block kt-pane-header-alignment-left kt-accodion-icon-style-arrow kt-accodion-icon-side-left" style="max-width:none"><div class="kt-accordion-inner-wrap" data-allow-multiple-open="false" data-start-open="none"> <div class="wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-1 kt-pane_9b29b7-2c"><div class="kt-accordion-header-wrap"><button class="kt-blocks-accordion-header kt-acccordion-button-label-show"><span class="kt-blocks-accordion-title-wrap"><span class="kt-blocks-accordion-title">View Table of Contentsspan>span><span class="kt-blocks-accordion-icon-trigger">span>button>div><div class="kt-accordion-panel"><div class="kt-accordion-panel-inner">div>div>div> div>div>div>
Code language: HTML, XML (xml)

Armed with the post content, you can now venture onto Site 2 and paste the content into a post.

Pasting post content is… easy

First up is porting the post title over. This doesn’t come over with the copied content.

Adding the Title to the new Post on Site 2
Adding the Title to the new Post on Site 2

Once we have the title, we can create an empty block and just paste the content in.

Pasting the Content

Make sure both sites have the same block plugins installed and that you aren’t disabling any blocks that the copied content relies on.

But what about images?

Here’s the rub, as they say. When you copy content from Site 1 to Site 2, the images will still point to Site 1.

In the example Gif below, you can see that even though all the content is brought over, the images still point to Site 1.

Since the images aren’t “copied” over, you would have to download all the images from the original post and upload them again on the new post.

This is not ideal at all and is a time-suck, especially if you have multiple posts.

The solution for copying images over

I came across this great tutorial on WP Beginner for importing external images when copying from one site to another.

Screenshot of www.wpbeginner.com

WPBeginner tutorial on importing post images.

The solution is a plugin called Auto Upload Images.

The plugin scans your post content for any “external” or non-local images and uploads them to your new site and updates all of the links to point to these new images.

Installing the Auto Upload Images Plugin

You shouldn’t have to configure any of the plugin settings for this to work.

Finally, with the plugin activated, go to the posts and simply click Update. It might take a little longer to update the post, but in the background, the images are being uploaded to your new site.

Post Update Post
Post Update Post

Updating a Post

Make sure you are on the post when updating

And like magic, the post images are brought over from one site to the other and the post is updated.

After the Images are Brought Over

Since the plugin is resource-intensive, I recommend deactivating it when you’re done.

Conclusion

In this quick tutorial, I went over how to copy content from one site to another. Since images aren’t uploaded automatically, I used Auto Upload Images to bring the images over as well.

Ronald Huereca
By: Ronald Huereca
Published On: on July 11, 2022

Ronald Huereca founded DLX Plugins in 2022 with the goal of providing deluxe plugins available for download. Find out more about DLX Plugins, check out some tutorials, and check out our plugins.

Leave a Comment

Your email address will not be published. Required fields are marked *

Default Avatar
Choose an Avatar

Shopping Cart
Scroll to Top