Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Backups & maintenance · Guide

How to Swap a Plugin Without Losing Data

How to Swap a Plugin Without Losing Data

Short answer

Export your content with Tools > Export and your settings with the old plugin's own export or WP Options Importer, then install and set up the new plugin while the old one still runs. Import the content, compare item counts on both sides, replace old shortcodes, and delete the old plugin only after a week of normal use.

Key takeaways

  • A WXR export holds posts, pages, comments, custom fields, categories and tags, but not plugin or theme files.
  • Unattached media in the Media Library is not included in a WXR export file.
  • WP Options Importer exports settings to a JSON file through Tools > Export.
  • Keep the old plugin active while you set up the new one, and deactivate it first when the swap is proven.
  • Compare item counts on both sides after every import, since an import can skip media or authors.
  • Search your pages for the old plugin's shortcodes and replace each one before you finish.

What does swapping a plugin mean for your data?

Swapping a plugin means replacing one tool with another that does the same job, without losing the content it built.

The risk is not the install step. The risk is the data: posts, settings, images, and links that the old plugin stored in its own format.

A new plugin may not read that format, so the data can sit orphaned in the database or vanish from the front of the site.

Start by naming what the old plugin owns. Some plugins store plain posts and pages, which any tool can read.

Others store settings in the options table, custom tables, or post meta that only that plugin understands. The swap plan depends on which kind you face.

What should you check before you swap?

Check where the old plugin stores its data before you install anything new.

Open the old plugin's settings page and look for an export or backup option. Many form, SEO, and migration plugins include one.

If the settings page has no export, the data likely lives in the options table or a custom table, and you will need the new plugin's import tool or a manual move.

List every place the old plugin appears on the site. Search your pages for its shortcodes, check widgets and menus for its blocks, and note any templates that call its functions. A shortcode that belongs to the old plugin will print as plain text once the plugin is gone.

Check the new plugin's docs for a migration path from the old one. Some plugins ship a one-click importer for a named rival, while others expect you to rebuild settings by hand. Knowing this before you start sets the time the job needs.

Also confirm the new plugin works with your WordPress version and your PHP version. The plugin page on WordPress.org lists the WordPress version it was tested with, so compare that number with your own install before you commit.

How do you back up and export your content first?

Export your content with the built-in WordPress tools before you touch either plugin.

Go to Tools > Export and choose All content, then click Download Export File. WordPress saves an XML file in WXR format that holds posts, pages, comments, custom fields, categories, and tags, as the Learn WordPress tutorial explains. Save that file on your computer, not only on the server.

Know what the export leaves out. The same tutorial notes that exports do not include plugin or theme files, and unattached media in the Media Library is not included in the XML file. Your theme, your plugins, and loose media need separate copies.

Take a full backup too, with files and database together. The WXR file covers content, but only a full backup can restore the site to the exact state it was in before the swap. Follow our guide to back up a WordPress site if you have no backup routine yet.

What to moveTool to useWhat it covers
Posts, pages, commentsTools > Export (WXR)Content records, not files or settings
Plugin settingsPlugin export or WP Options ImporterSettings saved as a file
Files and databaseFull backupWhole site, for a full restore

How do you export the old plugin's settings?

Export settings separately, because the content export does not carry them.

Some plugins include their own export button on their settings page, often under a Tools or Import/Export tab. Use that first, since it writes the settings in the format the same plugin reads back. Save the file with a clear name and the date.

If the old plugin has no export, the WP Options Importer plugin can help. Its WordPress.org page explains that it exports options to a JSON file and lets you pick which options to import, through Tools > Export and Tools > Import.

It covers general settings, widget setups, plugin settings, and theme settings that plain content exports skip. The page is at WP Options Importer.

Open the exported file in a text editor and check that it holds the settings you expect. A settings file for a form plugin should name its forms, while one for an SEO plugin should name titles and meta fields.

If the file looks empty, the settings live somewhere the exporter did not reach, and you should note each setting by hand before you move on.

How do you install and set up the replacement?

Install the new plugin while the old one is still active, then set it up before you remove anything.

Follow these steps:

  1. Go to Plugins > Add New, search for the new plugin, and click Install Now, then Activate.
  2. Open the new plugin's settings and import the settings file you exported, if it offers an import option.
  3. Recreate by hand any setting that did not import, working from the notes you made earlier.
  4. Build one test item in the new plugin, such as one form, one redirect, or one gallery.
  5. Check that test item on the front of the site in a private browser window.

Keep the old plugin active during setup so the live site keeps working.

A staging copy is the safest place for this work, and our guide to set up a staging site for WordPress walks through that.

If you have no staging site, do the work at a quiet time and keep the old plugin running until the new one is ready.

How do you move the content to the new plugin?

Move the content in small pieces and check each piece as it lands.

If the old plugin stored plain posts or pages, the WXR file you exported already holds them. On the new setup, go to Tools > Import, choose WordPress, install the importer if asked, and upload the file.

The Learn WordPress tutorial notes you should tick “Download and import file attachments” so linked media comes along too.

For command-line moves, WP-CLI offers the same import with more control. The WP-CLI import reference shows wp import example.xml --authors=create, which creates any authors named in the file that do not exist yet. It also supports --skip=attachment to skip media and --rewrite_urls to point old links at the new site.

If the new plugin has its own importer, use that instead of the WXR route for the plugin's own data. A form plugin's importer, for example, can carry entries and notifications that a content export never sees.

Run the importer once, then count the items on both sides before you go further.

After the move, open the pages that used the old plugin. Replace its shortcodes with the new plugin's shortcodes or blocks, one page at a time. A page that still shows the old shortcode as text needs that swap before you finish.

When should you keep the old plugin installed?

Keep the old plugin installed until the new one proves itself on the live site.

A parallel run of a few days catches problems that a quick check misses. Scheduled tasks, email notices, and cron jobs from the new plugin may only fire after a day or two. Watch for missing emails, broken forms, or gaps in the data during that window.

Deactivate the old plugin first, rather than deleting it. Deactivation stops its code while keeping its files and settings, so you can switch it back on if the new tool fails. Leave it deactivated for a week of normal traffic before you delete it.

Delete it only after the new plugin has handled real use: real form entries, real orders, or real page views, depending on the tool.

When you do delete it, follow the safe removal steps described in the guide on removing unused plugins and themes safely, which is part of this same batch.

If the swap goes wrong at any point, our guide to roll back a plugin update covers the recovery steps.

How do you check that nothing was lost?

Check counts, links, and the front of the site before you call the swap done.

Compare numbers on both sides: how many forms, entries, redirects, or products the old plugin held, and how many the new one shows now. A count that differs by even one item deserves a look before you delete anything.

Open the five most visited pages that used the old plugin and confirm each feature works. Submit a test form, click a test link, and check that images load. Then check Search Console or your analytics for a drop in traffic to those pages over the next few days.

Look at the database only if counts differ and you know what to search for. Plugin data usually lives in the options table or in tables named after the plugin, and a developer can compare those rows.

Do not delete tables by hand unless you can name each one and know which plugin made it.

What mistakes should you avoid?

Deleting the old plugin first is the most common mistake.

Once the files are gone, the settings export and the import tools that read the old data go with them. Always export, install the new plugin, and prove it works before you delete the old one.

Keep a copy of every export file until the swap has run clean for a week.

A second mistake is skipping the staging check. A new plugin can clash with your theme or with another plugin, and a clash on the live site costs visitors. A staging copy catches that clash with no risk.

A third mistake is trusting an import without counting. An import can report success while skipping media or authors, so compare counts and open pages by hand.

A fourth mistake is forgetting shortcodes: pages that still carry the old shortcode will show raw text to visitors, so search the content and replace each one.

Note: keep the old plugin's export files for at least a month after the swap, in case a missing item turns up late.

Frequently asked questions

Will the WordPress export tool move my plugin settings?

No. The export under Tools > Export saves content in WXR format, such as posts, pages, comments, and custom fields, but it does not include plugin settings or theme files. Export settings separately with the plugin's own export option or with WP Options Importer, which saves them as a JSON file.

Should I delete the old plugin before installing the new one?

No. Install and set up the new plugin while the old one still runs, so the live site keeps working. Deactivate the old plugin only after the new one has handled real use for about a week. Deleting first removes the data and export tools you may still need.

What if the new plugin has no importer for the old one?

Then rebuild the settings by hand from notes you made before the swap, and move the content with the built-in WXR export and import. Check the new plugin's docs first, since some offer a one-click importer for a named rival. A staging site is the safest place to test the manual route.

How do I know the import worked fully?

Compare counts: how many forms, entries, redirects, or products the old plugin held versus how many the new one shows. Open the five most visited pages that used the old plugin and test each feature by hand. A count that differs by even one item deserves a look before you delete anything.

Can I use WP-CLI to import content during a swap?

Yes. The wp import command imports a WXR file from the command line, with options such as --authors=create to create missing authors and --skip=attachment to skip media. It also supports --rewrite_urls to point old links at the new site. Use it when you have shell access and a large export file.

Sources

  1. Tools: Import and Export Learn WordPress
  2. wp import WordPress Developer Resources
  3. WP Options Importer WordPress.org
  4. Duplicator Plugin Tiger Technologies Support

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test