How To Reset a WordPress Site – WPQuickies

Have you ever been in a situation where your WordPress website is so full of junk you just wanted to push a big red reset button, clear out everything and start again?

Resetting WordPress back to its default installation is an easy solution.

What Is a WordPress Reset?

A WordPress reset takes your site back to the initial installation state.

  • Only one active theme.
  • No plugins installed or activated.
  • No posts, posts, post meta, comments, taxonomies or media.
  • No custom database tables.
  • A blank slate.

When Do You Need A WordPress Reset?

There are several situations where you may need to reset your WordPress website.

  • You use the same site for demos.
    I use the same demo site regularly for these WPQuickies, and I often perform a WordPress site reset to clean out all the previous content, plugins and data.
  • You have a single development site that you want to reuse on the next project.
  • Your website has been infected with malware.
  • You want to do a complete website rebuild from scratch.

Backup First

Whenever you are contemplating changing your WordPress website, please ensure that you take a complete backup.

Make sure you download the backup to your local machine and check its integrity.

I have a blog post about the best WordPress backup plugins.

Resetting WordPress With a Plugin

The easiest way to reset WordPress’s original state is to use the WP Reset plugin.

Once installed and activated, navigate to Tools > WP Reset.

WP Reset plugin menu

There are many options in WP Reset and three versions of the plugin, Options Reset (pro), Site Reset, and Nuclear Reset (pro).

The table below shows the features of each plugin version, the free Site Reset version is in the middle column.

WP Reset features and options

The free Site Reset plugin doesn’t physically delete the server’s media, plugins and theme files. It also doesn’t remove non-WordPress core database tables.

You will need to upgrade to the Nuclear Reset pro plugin to remove physical files in one go; however, the Site Reset plugin comes with some free tools to remove these files.

To reset your WordPress site, scroll down the Reset tab to the Site Reset box.

WordPress Site Reset

here are three options available.

  1. Reactivate current theme.
  2. Reactivate WP Reset plugin.
  3. Reactivate all currently active plugins.

Type “reset” into the input box and click on the “Reset Site” red button.

Once done, your WordPress website will be reset to just after installation, and you’ll see the About WordPress welcome screen.

About WordPress setup screen

Deleting Physical Files

The WordPress database may be reset, but there’s a bit of cleanup to do as physical files are still on the server.

If you need to delete the server’s media library, plugin or theme files, navigate to the plugin’s “Tools” tab.

WP Reset tools

Some tools are only available in the pro version. However, there are some excellent free tools to clean up your WordPress site further.

Clean Uploads Folder

Scroll down the page to the “Clean uploads Folder” box.

WP Reset Clean uploads folder

Delete Themes & Plugins

Scroll down the page to the “Delete Themes” and “Delete Plugins” boxes to delete all the physical files associated with each.

WP Reset delete themes and delete plugins

You must perform both actions if you want to delete the server files physically.

Depending on how many themes and plugins you have, these operations could take a few minutes to complete.

Empty or Delete Custom Tables

Scroll down the page to the “Empty or Delete Custom Tables” box.

WP Reset Empty or Delete Custom Tables

You can either empty the custom tables, which clears out the table data but leaves the table in the database or drop them, which removes the tables entirely from the database.

Once you’ve cleared up the physical files and dropped the custom tables, your WordPress website is near the default installation.

Reset WordPress Website Using WP-CLI

WP-CLI is a command line interface for WordPress for use on server interfaces like an SSH (Secure Shell) session.

You can use many WordPress core functions from the command line, including resetting or “emptying” a WordPress site of its posts, comments, terms and meta.

Within the root folder of the WordPress site you want to reset, type the command: wp site empty

This will prompt you to confirm resetting the WordPress. 

To bypass the confirmation, use the command: wp site empty –yes

To also delete physical files in the uploads folder, use the command: wp site empty –yes –uploads

To delete all plugin files using WP-CLI, use the command: wp plugin delete –all

To delete all theme files using WP-CLI, use the command: wp theme delete –all

Summary

Resetting WordPress doesn’t need to be a time-consuming manual effort. Using a plugin or WP-CLI can speed up your WordPress site reset.

Do you still have questions about WordPress hooks, actions and filters?

Ask in the comments below.

#WPQuickies

Join me every Thursday at 1 pm Sydney time for some more WPQuickies – WordPress tips and tricks in thirty minutes or less.

Broadcasting live on YouTube and Facebook.

Suggest a #WPQuickies Topic

If you have a WordPress topic you want to see explained in 30 mins or under, fill out the form below.

https://forms.gle/mMWCNd3L2cyDFBA57

Watch Previous WPQuickies

Was this article helpful?
YesNo