To run any of the WPR tools below, you have to confirm the action in the confirm dialog that appears after clicking one of the action buttons. There is no double-confirm like in the main reset tool.

Description for each tool provides a short overview of what it does as well as a deeper code analysis of how things are done and what’s going on in the background. If you are still not clear on what exactly a tool does, please contact us. It’s smart to make a backup before running any tool. Remember: WP Reset does not make automatic backups.

Delete Transients

Delete Transients

All transient related database entries are deleted. That includes two DB entries per transient – one that holds the data, and the other that holds the expire timestamp. Any orphaned entries are removed as well. Expired and non-expired transients too.

Tool runs one DB query to delete transients. Table name is pulled from the default WP $wpdb object.

$wpdb->query("DELETE FROM $wpdb->options WHERE 
option_name LIKE '\_transient\_%'
OR option_name LIKE '\_site\_transient\_%'");

Clean Uploads Folder

Clean Uploads Folder

Upload folder path (default path: /wp-content/uploads/) is fetched using the wp_get_upload_dir() function and then all files and folders in it are deleted recursively using unlink(). The tool does not touch the database. If you have any files associated with media entries they will be deleted too and you’ll end up will orphaned media entries. So make sure you manually delete those media entries through WP admin – Media.

Reset Theme Options

Reset theme options

WordPress offers a standard modifications API for themes. Although not many themes use it (they prefer custom bloated solutions) it’s still a very hand API. If you want to see it in action check out default WP themes – Twenty Seventeen and Twenty Nineteen. The tool resets all options (mods) for all themes. That includes non-active themes too. Again, it’s only effective for themes that use the WordPress theme modification API. If options are saved in some other, 3rd party custom way they won’t be reset.

The tool runs one DB query to delete all themes’ options/mods. Two option names are used as one is a legacy one and the other current.

DELETE FROM $wpdb->options 
WHERE option_name LIKE 'theme_mods\_%' OR option_name LIKE 'mods\_%'

Delete Themes

Delete Themes

All themes except the default WP theme are deleted. That’s theme Twenty Seventeen for WP versions below 5.0 and theme Twenty Nineteen for all newer versions. Whether or not any extra files, custom tables or custom database entries are left behind depends on the theme. In 99% of cases, garbage will be left behind because only the theme files get removed. Unfortunately, there is no uninstall hook for themes, so this behavior is expected and “normal”. Use other tools to clean up theme data completely. Deleting a theme using this tool is the same as going to WP admin – Appearance – Themes and deleting themes one by one.

The list of themes is fetched with wp_get_themes(array('errors' => null)) to include all themes, including broken ones. Then, delete_theme() is used to delete them, one by one.

Delete Plugins

Delete Plugins

List of all plugin is fetched with get_plugins(). WP Reset is removed from the list and is not deleted or affected by this tool. Active plugins are then deactivated using deactivate_plugins(). Deactivation is not silent, meaning that if a plugin has a deactivation function hooked in via register_deactivation_hook(), it will get run. After that plugins are deleted with delete_plugins(). Again, if a plugin has a delete function hooked via register_uninstall_hook() that function will be run and the plugin will clean-up after itself. Unfortunately, a lot of plugin do not clean after themselves so you’ll have to remove custom tables, database entries or leftover files using other WPR tools.

Empty or Delete Custom Tables

Empty or Delete Custom Tables

This tool affects only custom database tables that start with a prefix defined in wp-config.php file ($table_prefix variable). Other tables in the database that do not have that prefix and WP core tables are not affected. Deleting (dropping) tables completely removes them from the database. Emptying (truncating) removes all content from them, but keeps the table structure intact.

Running the tool will NOT remove any WP Reset Database snapshots you have.

A list of custom databse tables is retrieved by running SHOW TABLE STATUS SQL command and then iterating through tables to pick ones that start with $wpdb->prefix but are not on the list of default WP tables; commentmeta, comments, links, options, postmeta, posts, term_relationships, term_taxonomy, termmeta, terms, usermeta, users.

Depending on the choosen tool, custom tables (if any) are either emptied with TRUNCATE TABLE or deleted with DROP TABLE.

Delete .htaccess File

Delete .htaccess File

Tool deletes the .htaccess file located in sites’s root or to be more precise in get_home_path() folder. No WP settings are touched after deleting the file meaning that permalinks (pretty links) will not work after .htaccess is deleted. To restore the default .htaccess file with WP permalink rules go to WP admin – Settings – Permalinks, choose any permalink setting that’s not “Plain” (it’s not a problem to leave the one you had chosen before) and click “Save Changes”. That will create a new .htaccess file and permalinks will work. If you need to edit htaccess and don’t want to mess with FTP install our free plugin – WP Htaccess Editor.