# How to reset a WordPress installation safely

URL: https://wp24x7.com/reset-wordpress-installation/
Updated: 2026-11-29
Type: blog post
Audience: site owners and developers starting a WordPress site over

> Resetting returns a WordPress site to a fresh state: no posts, no settings, default theme, one admin user. It destroys data, so take a full backup of files and database first and run it only on the site you mean to reset. This guide compares a reset plugin, WP-CLI and a manual reset, what each removes, and the checks to make afterwards.

## Key facts

- For: owners and developers who want a clean start on the same domain
- Methods: a reset plugin, WP-CLI, or by hand in the database tool
- Warning: there is no recycle bin; a reset can only be undone from a backup
- Not for: a hacked site, which needs malware removal instead
- After: re-save permalinks, clear caches, test email and set search visibility
- Help: backup and restore service or support team before touching a live store

Resetting means returning a site to a fresh state: no posts, no settings, default theme, one admin user. It is useful after testing on a staging site, when you inherit a messy build, or when you want to start over on the same domain. **It destroys data, so take a full backup of files and database first, and run it only on the site you mean to reset.**

## When should I not reset?

- On a live site with orders, members or content you cannot recreate, unless you have a restored backup you have tested.
- When the real problem is a hack. A reset leaves malware in files, so use [malware removal](/wordpress-malware-removal) instead.
- When the database is shared with another application, because a reset can drop that application's tables too.

## What does each method remove?

| Method | Database | Plugins and themes | Uploads |
|:--|:--|:--|:--|
| Reset plugin (default) | Reset to defaults | Kept, deactivated | Kept |
| WP-CLI `db reset` | Every table dropped | Kept | Kept |
| Manual | Tables dropped | You delete them | You delete them |

Read the options of whichever tool you use. Most offer checkboxes to also delete themes, plugins and uploads.

## What do I back up first?

Export the database and copy files, not just one of them.

```
wp db export backup-before-reset.sql
```

Then download `wp-content/` and `wp-config.php` over SFTP, or take a host snapshot, and store the backup off the server. A backup you have never restored is a hope, not a backup, so check that the SQL file is not empty and opens.

## How do I reset it?

### Reset plugin
A plugin such as WP Reset is the easiest route:

1. Install and activate it on the site you intend to reset.
2. Open its tools page and read what the reset covers. It typically removes content, settings and users except the current admin.
3. Type the confirmation word it asks for, and run it.
4. Log in again, usually with your existing admin account, and reconfigure.

The site title, permalinks and discussion settings return to defaults. Re-save **Settings, Permalinks** at the end.
### WP-CLI
If you have SSH access, WP-CLI is fast and explicit.

```
# From the WordPress root, check you are in the right place
wp option get siteurl

# Drop all tables in this site's database, and recreate nothing
wp db reset --yes

# Reinstall a clean site
wp core install --url="https://example.com" --title="My Site" \
  --admin_user="siteadmin" --admin_email="you@example.com" --prompt=admin_password
```

Replace `example.com`, the title and the email with yours. `--prompt=admin_password` asks you to type a password so it does not end up in shell history. `wp db reset` drops all tables the database user can see, so check `DB_NAME` in `wp-config.php` and use a dedicated database per site. A softer option is `wp site empty --yes`, which removes posts, comments, terms and links but keeps users and settings, and `--uploads` also deletes media.
### Manual
For full control:

1. Back up as above.
2. In phpMyAdmin or your host's database tool, select every table in the site's database and use **Drop**. Use the right database.
3. Delete the contents of `wp-content/uploads/` if you want no media. Delete unused folders in `wp-content/plugins/` and `wp-content/themes/`, keeping one default theme.
4. Keep `wp-config.php`, since it holds the database connection. Open the site URL, and WordPress shows the five-minute install screen.
5. Fill in the form and log in.

To guard against old code, replace core files with a fresh download of the same version from wordpress.org, leaving `wp-config.php` and `wp-content/` alone.

> **Check which site you are on**
Running a reset in the wrong browser tab, between production and staging, is the classic mistake. Check the site URL at the top of the dashboard and use a banner or label to tell environments apart. WooCommerce orders and customers are in the database, so a reset removes them, which can have legal record-keeping consequences for a real shop.

## What should I check afterwards?

1. **Search engine visibility.** Set the discourage-search-engines checkbox correctly in **Settings, Reading**, especially for staging.
2. **Caches.** Clear your host's page cache, CDN and object cache.
3. **Scheduled tasks.** If cron is run by the server, check it still points to the right site.
4. **Email.** Send a test message, since SMTP settings reset with the plugin that held them.
5. **Permalinks and redirects.** Re-save permalinks and test a few URLs.
6. **Old data.** Delete backup copies only when sure you do not need them, and store them securely, since they hold user data.

_Back up files and database before any reset_

## How do I keep some settings through a reset?

Export what you want first: **Tools, Export** for posts and pages, WooCommerce's CSV exporter for products, and your form or SEO plugin's own export. Write down the theme, plugin list and versions, and any custom code in `functions.php` or a snippets plugin. After the reset, install only what you need in the same order and import content last, so the importer does not skip items that depend on an active plugin.

## Need help?

If you want a clean start but need to keep some content, a [migration or restore service](/wordpress-backup-and-restore) can export posts, products and media, reset the build and import them back. See also [how to debug errors in WordPress](/how-to-debug-error-in-wordpress) if you are resetting to escape a problem you have not diagnosed, because a reset will not teach you what caused it.

## What returns to defaults after a reset?

| Item | After a reset |
|:--|:--|
| Posts, pages, comments | Removed |
| Site title, permalinks, discussion settings | Defaults, so re-save Permalinks |
| Users | Removed except the current admin, with a plugin reset |
| Plugin settings, including SMTP | Reset with the database |
| WooCommerce orders and customers | Removed, because they live in the database |
| Media files | Stay on disk unless you delete `wp-content/uploads` |

**Reset on a live store?**
Speak to our team before you press the button.
[WordPress support](/wordpress-support)
[Backup and restore](/wordpress-backup-and-restore)

## Frequently asked questions

### Will resetting WordPress delete my media files?

A database reset removes the records, so media disappears from the library but the files stay on disk unless you also delete wp-content/uploads. Decide which you want before you start.

### Can I undo a reset?

Only from a backup. A reset drops database tables, and there is no recycle bin, so take a full database and file backup first.

### Is it better to reset or to reinstall?

Reset the database when the files are fine. Reinstall everything, including core files, when you suspect a hack, then restore only clean content.

### Should I reset a hacked site?

No. A reset leaves malware in files, so the infection survives. Use a malware removal process instead, or reinstall core files and restore only clean content after the cause has been found and closed.

### What does WP-CLI db reset do?

It drops every table the database user can see while keeping plugins, themes and uploads. Check DB_NAME in wp-config.php first, because on a shared database it also drops another application's tables.

### What is the gentler WP-CLI option?

wp site empty --yes removes posts, comments, terms and links but keeps users and settings. Add --uploads to delete media too.

### What does a reset plugin remove?

Typically content, settings and users except the current admin, with plugins and themes kept but deactivated and uploads kept. Read its options, because most offer checkboxes to delete more.

### What happens to WooCommerce orders and customers?

They live in the database, so a reset removes them. For a real shop that can have legal record-keeping consequences, so speak to support before you press the button.

### How do I keep some settings through a reset?

Export what you want first: Tools, Export for posts and pages, the WooCommerce CSV exporter for products, and your plugins' own exports. Write down the theme, plugin list and versions, and any custom code.

### What should I check after a reset?

Search engine visibility, caches, scheduled tasks, email delivery, permalinks and redirects, and when to delete your backup copies, which hold user data.

### What is the classic mistake?

Running the reset on production when you meant staging. Check the site URL at the top of the dashboard and use a banner or label to tell environments apart.

### Can you help me keep some content and still start clean?

Yes. A migration or restore service can export posts, products and media, reset the build and import them back.
