How to reset a WordPress installation safely
Reset WordPress to a clean install with a plugin, WP-CLI or by hand. What each method deletes, what to back up first and how to avoid the wrong site.
At a glance
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.
Updated November 29, 2026 · For site owners and developers starting a WordPress site over
- 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
On this page
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 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.sqlThen 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?
A plugin such as WP Reset is the easiest route:
- Install and activate it on the site you intend to reset.
- Open its tools page and read what the reset covers. It typically removes content, settings and users except the current admin.
- Type the confirmation word it asks for, and run it.
- 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.
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_passwordReplace 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.
For full control:
- Back up as above.
- In phpMyAdmin or your host's database tool, select every table in the site's database and use Drop. Use the right database.
- Delete the contents of
wp-content/uploads/if you want no media. Delete unused folders inwp-content/plugins/andwp-content/themes/, keeping one default theme. - Keep
wp-config.php, since it holds the database connection. Open the site URL, and WordPress shows the five-minute install screen. - 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.
What should I check afterwards?
- Search engine visibility
Set the discourage-search-engines checkbox correctly in Settings, Reading, especially for staging.
- Caches
Clear your host's page cache, CDN and object cache.
- Scheduled tasks
If cron is run by the server, check it still points to the right site.
- Email
Send a test message, since SMTP settings reset with the plugin that held them.
- Permalinks and redirects
Re-save permalinks and test a few URLs.
- Old data
Delete backup copies only when sure you do not need them, and store them securely, since they hold user data.
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 can export posts, products and media, reset the build and import them back. See also how to debug errors 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 |
Speak to our team before you press the button.
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.
Link to this answerCan 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.
Link to this answerIs 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.
Link to this answerShould 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.
Link to this answerWhat 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.
Link to this answerWhat 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.
Link to this answerWhat 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.
Link to this answerWhat 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.
Link to this answerHow 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.
Link to this answerWhat 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.
Link to this answerWhat 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.
Link to this answerCan 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.
Link to this answerKeep reading
Want an engineer on it?
Tell us what is wrong in plain words. A person reads it, today.