WordPress themes store their settings, including customizations, in the database. This way, when you deactivate the theme, the options are not lost should you choose to activate the theme for use.
This behaviour however also applies to situations when you delete the theme from your WordPress. The options are retained in the database, just in case you decide to reinstall the theme. This is the case for most WordPress plugins as well.
While this is desired in most typical cases, there are situations when one may want to start afresh. For instance, when implenting a major redesign of the site with the same theme.
This requires that all settings and customizations done to the theme (including additional CSS) be reset to their default state. Unfortunately, most themes don’t provide such a functionality, as it’s the case with some plugins.
Reset WordPress Theme using WP Reset
To reset the theme, we need to modify the database. The safe way to do that is using a plugin built for that purpose. WP Reset is a popular plugin that is used to do a site wide reset, but can also reset specific items such as themes and user roles.
It should however be noted that WP Reset clears the options for all the themes and not just for the active one. This also includes themes that were previously installed and deleted.
Additionally, the reset function only works with themes that use the WordPress theme modification API i.e. the customizer. This is the case for most themes that are installed from the WordPress theme directory. If the theme stores its options differently, WP reset will not be able to reset it.
Let’s now see how to use if for this purpose.
- Install and activate WP Reset plugin.
- Go to
Tools > WP Resetto open the plugin’s dashboard.
- Select the Tools page from the top menu, then scroll down to the Reset Theme Options section.
- Start by creating a snapshot of the options in case you need to roll back. Save your additional CSS in case you need to restore them without restoring other theme options stored in the snapshot.
- Click the Reset theme options button and let the plugin do its job.
The process will take only a few seconds to complete. Once done, load the site in the front end and confirm the theme’s default state has been restored.
Likewise, check customizer in
Appearance > Customize and confirm the options have been reset to default and that the additional CSS box is empty.