You may already know that you can import and export your content with WordPress. This built-in functionality is useful for example when you need to move your website.

It is also a good idea to create backups of your content regularly, and always before you upgrade WordPress to a new version.

However, the WordPress export and import tools only works for your content and comments. To backup or import your widgets, you need to install a WordPress plugin.

Why you should backup your widgets

You may find that you need to copy your widget settings if you:

Perhaps you have even lost widgets before and want to prevent it from happening again?

Which widget import and export plugin to use

If you export your widgets with one plugin, you need to use the same plugin to import the file. So which plugin should you choose?

Widget Importer & Exporter plugin

The Widget Importer & Exporter plugin by Church Themes is a free plugin, you can download from the WordPress plugin directory. With over 300, 000 installs, it is the most popular plugin for importing and exporting widgets.

We have chosen this plugin for its simplicity, speed, and most of all, ease of use. It only has two options: Import and Export, which is really all you need.

When you import widgets to your website, the plugin will automatically save the widgets to the correct sidebars, without affecting your existing widgets, saving you time and effort.

Exporting widgets

To export widgets, first install and activate the plugin.

The Widget Importer & Exporter plugin only saves your active widgets. So before exporting the widgets you want to make sure that there are no inactive widgets that you would like to keep.

In your WordPress admin area, go to Appearance, Widgets.

Then scroll down to the Inactive Widgets area.

If there are any widgets here that you want to save, you need to activate them by adding them to a widget area (Sidebar).

Inactive Widgets

Now you can continue to the plugin settings.

In the menu, select Tools, Widget Importer & Exporter:

Export Widgets

Select the Export Widgets button.

A new file called your_domain-widgets.wie is created and downloaded for you. The .wie file format is specific for this plugin.

Importing widgets

If you are moving your widgets to a different website, you also need to install and activate the plugin on the second website.

Go to the Widget Importer & Exporter settings page.

In the file upload option, choose the your_domain-widgets.wie file that you just created, and select the Import Widgets button.

Next, you will be presented with a report of the Import Results:

Import Widgets

In our example, the plugin imported all the widgets except one. This is because the plugin found that a duplicate widget already existed in our Footer Copyright widget area. All the other widgets were correctly saved to the widget area, in the correct order.

Troubleshooting your widget import

Some themes have custom widgets that are only available in that theme. Examples of custom widgets can be About Me widgets, Testimonials widget or Instagram galleries.

When you import your widgets to a website that is using a different theme, the custom widgets might not show up correctly. You may see an error report.

In this example, we have imported widgets from a theme with two widget areas and a custom widget, to a theme with only one widget area:

Troubleshoot widget import

The report is telling us that the website does not support widget number two – our custom widget.

It also explains that sidebar-2 does not exist in the theme, so it cannot import the widget to the same sidebar. Instead, it has saved the Text widget to the list of Inactive Widgets. This means that the content is not lost, and that you can activate the widget again by placing it in a different widget area.

Alternative plugins

If you only want to import and export widgets, we are convinced that the Widget Importer and Exporter plugin is your best option.

There has been a few other plugins, but they have not been updated for several years and they might not work with your version of WordPress. Because of that, we would not recommend them as a viable alternative.

If you want to export both your content and your widgets, you can look into the more advanced plugins that will help you backup or import your entire WordPress database:

Widgets in the new editor

We have discussed when and why you need to back up your widgets, and which plugin to use. We have also looked at error reports and mentioned some of the problems that can happen when you change your theme.

To avoid confusion we want to mention a few things about using widgets in the new WordPress editor. With the new editor, you can include widgets as part of your page and post contents, in the form of blocks. These blocks does not use a widget area and they cannot be copied or imported with the Widget Importer and Exporter plugin.

You may also want to edit widgets with WYSIWYG visual editor in WordPress.