Back to blog
5 min read Content Sync

PDF and File Download Links After Copying a Post to Another WordPress Site

A post with a price list, a menu or a manual usually links to a PDF in the Media Library: a File block with a Download button, or a plain link in the text. Copy such a post to another WordPress site, and the link either still points to the old site or, after a domain replace, to a file that was never copied. With Import Export by RockStarLab Content Sync, the PDF is copied to the other site’s Media Library and the links in the post point to that copy.

Free: Content Sync of posts and pages, with the Media Library files they link to, is in the free plugin. The test below used version 2.2.12 on both sites.

Short Answer

Push the post. Every Media Library file it links to (a PDF in a File block or a link in a paragraph; video and audio files are handled the same way) is copied to the other site, and the File block’s attachment ID and every link to the file are changed to the copy. Pushing again doesn’t copy the file a second time. PDFs uploaded by FTP join in too: add them to the Media Library with the plugin’s Media Sync, and the next push copies them like any other file.

The post we pushed

The post Café Partner Downloads had a sentence with a link to the wholesale price list PDF and a File block for the same PDF with a Download button:

Block editor on the source site with a paragraph linking to a wholesale price list PDF and a File block with a Download button
The post links to the PDF in the text and in a File block.

We pushed it from the editor with Sync Content > Sync This Post, chose the other site and clicked Push to Site. The post was new on that site:

Map Posts for Sync dialog with Café Partner Downloads set to Create New Post
The post is new on the other site.

What the other site got

After Confirm & Sync, the PDF was in the other site’s Media Library, in its own uploads folder for the month:

Media Library list on the receiving site with the wholesale price list and cupping guide PDFs
The PDFs in the receiving site’s Media Library after the push.

In the post, the File block pointed to the new attachment, and both links, in the paragraph and on the Download button, used the other site’s address. The editor showed both blocks without warnings, and the PDF opened from the link.

Block editor on the receiving site with the PDF link in the paragraph and the File block with its Download button
On the receiving site the links and the File block point to its own copy of the PDF.
How the PDF is linked After the push
File block with a Media Library PDF PDF copied; block ID and both links point to the copy
Text link to a Media Library PDF (no File block) PDF copied; the link points to the copy
The same post pushed again No second copy; the links stay on the first copy
PDF uploaded by FTP, added to the Media Library with Media Sync Copied like any other attachment

PDFs Uploaded by FTP

Content Sync sends the files of the Media Library. A PDF uploaded by FTP to wp-content/uploads/price-sheets/ becomes such a file in one step with Media Sync, which is part of the same plugin: open Import Export > Import, choose Media Sync, scan the folder and start the sync. The files stay where they are and get Media Library entries; see how to register FTP and SFTP uploads in the Media Library. Push the post again, and the PDFs travel to the other site with their links.

To check a post before you push it, open it on the source site and hover over each download link: an address with /wp-content/uploads/2026/11/ or a similar month folder is usually a Media Library file. You can also find every post that links to a path with an export.

As before any push, back up the site you push to, or ask your AI agent to start the backup.

With an AI agent

Import Export by RockStarLab gives AI agents its exports, imports and Content Sync as abilities. Through the WordPress MCP Adapter, WordPress itself offers an agent only read-only abilities for site, user and environment information, so without the plugin the agent cannot do the steps above (to connect an agent, see connecting Claude Code to WordPress). With it, one request is enough:

With Import Export by RockStarLab, push "Café Partner Downloads" to the staging site, update the existing copy, and list the files that were copied.

In our run, the agent called rsl-ie/sync-push with the post and the ID of its copy on staging. The result showed 1 post updated and 1 media file synced, with the source PDF’s attachment ID mapped to the attachment created by the first push, so no second copy was made.

FAQ

Why does my PDF link still point to the old site after copying a post?

Copied as HTML, a link keeps its address. Content Sync copies the Media Library file and changes the link to the copy on the other site.

Is the File block’s Download button updated too?

Yes. The block’s attachment ID, the file link and the Download button all point to the copy.

Will the PDF be copied again on every push?

No. A file sent earlier is used again, so the other site keeps one copy.

What about PDFs uploaded by FTP?

Add them to the Media Library with Media Sync, part of the same plugin, and push the post again. They are then copied like any other file.

Get the free plugin on WordPress.org.

Dmitriy
About author

Dmitriy

WordPress Developer with 15+ years of commercial experience. Elite Author on ThemeForest and creator of custom WordPress plugins. Passionate about clean code, performance optimization, and building useful tools for the WordPress community.

JOIN THE CONVERSATION

Comments 0

Have a question or a tip to share? Leave it below.

Leave a comment

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

We store your name, email and comment to show and moderate it; your email is never published. Spam protection is provided by Cloudflare Turnstile and profile pictures by Gravatar. See our Privacy Policy.


Try the plugin with no risks!

New users get 1 month with access to all premium features. Experience the most powerful WordPress data engine today.

Download Now
Get PRO for FREE