How to synchronize content between WordPress sites
For occasional transfers, use WordPress's built-in Tools > Export and Tools > Import screens, then check media, links, users and custom fields. For regular selective syncing between staging, local and production, use a dedicated sync plugin because WordPress does not provide continuous two-way syncing.
- 01Choose the sync direction
- 02Back up both sites first
- 03Use the manual export route
- 04Check media and URLs
- 05Verify the destination
- 06Use the fast way for regular syncs
What you need
- Administrator access to both WordPress sites
- A recent backup of both sites
- The source and destination site URLs
- Permission to install plugins if you want scheduled syncing
Choose the sync direction
Decide whether content will move from production to staging, from staging to production, or between two independent sites. Avoid treating both sites as equal sources unless you have a clear conflict policy. A change made on both sites can create duplicate posts, overwritten edits or mismatched media IDs.
For a one-off transfer, the built-in exporter is usually enough. For repeated, selective transfers, plan to sync only the post types and fields that need to move. Orders, form entries, comments and analytics data usually belong to the live site and should not be overwritten casually.
Back up both sites first
Create a database backup and a copy of the WordPress files on both sites before importing anything. A content export is not a complete site backup: the WXR file contains content such as posts, pages, terms, comments and users, but it does not contain site configuration or the attachment files themselves.
Keep the backups somewhere separate from the hosting account. If the destination contains newer content, record what was added there after the last sync so you can restore or recreate it if an import replaces something unexpectedly.
Use the manual export route
On the source site, open Tools > Export. Choose all content, or filter by posts, pages, authors, date range, status or another available content type, then download the XML export file. On the destination site, open Tools > Import, choose the WordPress importer, upload the XML file and map the imported authors to existing users or create users where appropriate.
This route adds content; it is not a live synchronisation system. It does not automatically keep later edits aligned, and it can be unsuitable for a large site or a site with complex plugin data. Run a small test export first, especially when custom post types or page-builder content are involved.
Check media and URLs
Confirm that imported posts have their images, featured images and downloadable files. WordPress stores media partly as files in the uploads directory and partly as attachment records in the database, so copying only one side can leave missing images or media-library entries.
If the sites use different domains, subdomains or paths, check internal links, image URLs, embeds and serialized settings. Do not run a blind database search-and-replace: WordPress warns that serialized values can break when changed incorrectly. Use a tool that understands serialized data, and take another backup before changing URLs.
Verify the destination
Review the imported posts, pages, custom post types, taxonomies, authors, menus and media library. Open representative pages while logged out, test search and forms, check featured images and confirm that links do not point back to the source site.
For staging and production, pay special attention to orders, sign-ups, comments and other records created while you were working. A full database copy can overwrite live records, and support discussions repeatedly flag this as a problem when production continues receiving data during a staging cycle.
Use the fast way for regular syncs
For scheduled, selective syncing between local, staging and production sites, install and configure WP Synchro PRO on the sites involved. Use its sync rules to choose the content to transfer, set a schedule where appropriate, and review its activity logs after each run.
This is the practical option when repeating the manual XML export and import would be too slow or too easy to get wrong. Still keep independent backups, define which site is authoritative, and exclude live transactional data unless you have confirmed how the sync handles it.
Let WP Synchro PRO do it
Scheduled, selective syncing with activity logs; suited to keeping staging, local, and production sites aligned.
Sources
- developer.wordpress.org /cli/commands/export/?utm_source=openai
- wordpress.org /documentation/article/tools-export-screen/?utm_source=opena…
- wordpress.org /support/topic/using-same-media-library-for-2-sites/?utm_sou…
- developer.wordpress.org /advanced-administration/upgrade/migrating/?utm_source=opena…
- wordpress.org /support/topic/staging-production-environments-advice/?utm_s…
Questions
- Can WordPress synchronise two sites automatically without a plugin?
- No, WordPress does not provide continuous two-way content synchronisation between separate sites. Its built-in export and import tools move selected content through a WXR file, but they do not watch for later edits or resolve conflicts. You can build a custom integration with the REST API or scheduled server jobs, but that requires development and careful handling of IDs, media and authentication.
- Does WordPress export include images and media files?
- The WXR export includes attachment information, but it does not contain the actual attachment files by itself. The importer may fetch referenced attachments when they are available, but this can fail because of permissions, timeouts, blocked remote requests or missing source files. For dependable transfers, verify the uploads and media library after importing and copy missing files separately when necessary.
- Will importing content overwrite the destination site?
- The standard WordPress importer normally adds imported posts and pages rather than replacing the whole destination site. It can still create duplicates, alter authors, add taxonomies and bring in unwanted comments or custom fields. A database or full-site sync is different: it may overwrite destination records, so back up first and exclude orders, submissions and other live data where possible.
- How do I sync staging and production without losing orders?
- Do not copy the whole production database back and forth while the live site is receiving orders. Export or synchronise only the content required for the release, and keep orders, customers, form entries, analytics and other transactional records on production. If your workflow cannot selectively exclude those records, use a separate deployment plan or a sync tool that documents its table and content rules.
- Why are links or page-builder layouts broken after a site sync?
- Links and layouts often break because the destination uses a different URL, or because plugin and theme settings contain serialized data tied to the original site. Check the site and WordPress URLs, run a serialization-aware URL replacement when needed, and regenerate or refresh page-builder assets using that builder's own tools. Always back up before changing database URLs.