WordPress is the world’s most widely used content man­age­ment system (CMS). Using WordPress makes building a website much easier. From a vast selection of plugins and themes, you can put together the desired func­tion­al­ity and the right look. Within five minutes you can have your own site online.

Despite its apparent sim­pli­city, it is easy to get bogged down when creating a WordPress site. Then the site stops loading properly or just doesn’t work at all. When you’ve had enough, you’ll want to reset the WordPress site and just start over from scratch. What options are there for resetting WordPress and when does it make sense to do so?

Cheap domain names – buy yours now
  • Free website pro­tec­tion with SSL Wildcard included
  • Free private re­gis­tra­tion for greater privacy
  • Free Domain Connect for easy DNS setup

Why reset a WordPress site?

WordPress is a flexible Content Man­age­ment System (CMS). Because the software is so flexible, it’s possible to create com­pletely different sites and apps based on the CMS. Whether it’s a single page scroller, an online shop or a social network, you can find suitable plugins for almost any un­der­tak­ing. However, the flex­ib­il­ity of WordPress is both a blessing and a curse. If you’re a layman getting entangled in the thicket of mutually in­com­pat­ible plugins, you might wish for a reset button.

Even as part of the regular ad­min­is­tra­tion of a WordPress site, it is sometimes useful to be able to reset at least part of a WordPress site. Most of the time, the need arises when major changes are to be made to the site. There are some common scenarios where it is re­com­men­ded to reset WordPress. These include moving a WordPress domain to a new host provider (migration), creating a new design (redesign) or re­launch­ing the site under the existing domain (relaunch).

There are also certain cir­cum­stances that require a WordPress site to be reset, for example, if the site has been hacked or stops loading after an update (restore/recovery). Sometimes it is also useful to reset parts of WordPress as part of a 'spring clean'. Peri­od­ic­ally removing idle legacy files increases site security and can lead to improved WordPress per­form­ance.

Reset WordPress page by Meaning
Migration Moving a site to a new host
Redesign Creating a new design
Relaunch Re­start­ing the site under the existing domain or a new domain
Restore/recovery Site was hacked or corrupted
Clean-up Removing unused con­tam­in­ated sites
Reset Com­pletely resetting WordPress

Resetting is most useful in the context of de­vel­op­ment and test workflows. Ideally, you’d work on a staging site or local dev site. This way you don’t have to worry about any damage the site might sustain.

Note

Here we are ex­clus­ively dis­cuss­ing how to reset a normal WordPress site. In case of a multisite, the process is more complex.

What happens when you reset WordPress?

What do we actually mean when we talk about resetting WordPress? It can actually mean several things. WordPress is made up of four fun­da­ment­al com­pon­ents:

  1. WordPress core files and data
  2. WordPress con­fig­ur­a­tion data
  3. WordPress database
  4. WordPress site data in wp-content files

If you want to reset WordPress, you have to be clear about what exactly you want to achieve. Do you want to remove only the content, or do you want to reset the settings or the WordPress theme to its initial state? Has the site been hacked or moved? Depending on the scenario, different com­pon­ents of the site must be reset.

It’s important to un­der­stand that the com­pon­ents are in­ter­locked. If you delete only the database for example, plugins, themes, and uploaded files (uploads) will remain. However, due to the loss of the database, the uploads will no longer show up in the WordPress media library. You will then no longer be able to delete them from WordPress. In this case, it would be ap­pro­pri­ate to reset the WordPress uploads folder.

Resetting WordPress core

'Word­Press core' refers to the folders and files that make up WordPress 'at its core'. These are created during the in­stall­a­tion of WordPress and changed during updates if necessary. The WordPress de­velopers at iThemes con­trib­ute a plausible defin­i­tion:

Quote

'Word­Press core is a way of referring to all the 'found­a­tion­al' files that are required for WordPress to work. WordPress core is what you download from WordPress.org in the form of a zip file.' – Source: https://ithemes.com/blog/wordpress-core-explained/

Let’s look at the names of important WordPress core files and folders in the WordPress root directory as an example. As a user, don’t touch these folders and files, otherwise you can easily corrupt your WordPress in­stall­a­tion:

  • index.php
  • wp-login.php
  • wp-admin/
  • wp-includes/
  • etc.

If the WordPress core has been corrupted, a reset can be useful. WordPress core cor­rup­tion is usually caused by improper user access or in­tro­duced malware. If the WordPress core was changed by a hacker, it is better to rebuild the site com­pletely from a backup. This guar­an­tees that the malware is elim­in­ated.

Resetting WordPress con­fig­ur­a­tion data

WordPress con­fig­ur­a­tion files are a handful of files located in the root directory of the WordPress in­stall­a­tion. These store special con­fig­ur­a­tion settings outside the database. The following WordPress con­fig­ur­a­tion files are found in most WordPress in­stall­a­tions:

Con­fig­ur­a­tion data De­scrip­tion Changes Risik of damage
wp-config.php Sets basic con­fig­ur­a­tion settings; created during in­stall­a­tion and links the WordPress in­stall­a­tion to the WordPress database Changes to this file are unusual. Page no longer loads: 'White Screen of Death' 'Error es­tab­lish­ing a database con­nec­tion'
.htaccess Controls the Apache web server; defines WordPress redirects and sets access to dir­ect­or­ies from the web; can be used to create basic password pro­tec­tion of a site; popular for pro­tect­ing staging sites from access by regular users. Plugins write in .htaccess, e.g., for security settings, SEO, or caching. Page no longer loads: 'White Screen of Death', '500 Internal Server Error'; loss of SEO potential due to corrupted redirects; release of con­fid­en­tial page areas
robots.txt Tells search engines to index only certain areas of the site; used to hide staging sites from search engines SEO plugins write this file. Loss of SEO potential; indexing of con­fid­en­tial page areas

Modi­fic­a­tions to WordPress con­fig­ur­a­tion files quickly cause damage to the site. This damage is often immediate; the site stops loading properly. However, subtle damage can also occur that only becomes no­tice­able after a long time, for example, when the Google ranking of the site drops dra­mat­ic­ally.

If there is any damage to the WordPress con­fig­ur­a­tion files, it is highly re­com­men­ded to restore them from a backup. If you try to trace the damage and repair it manually, you may make it even worse. In such cases, it is possible to reset a corrupted WordPress con­fig­ur­a­tion file to its initial state. However, all page-specific settings will be lost.

Resetting the WordPress database

The WordPress database contains most of the site’s content and con­fig­ur­a­tion settings. These are stored in in­di­vidu­al database tables. Two basic types of tables are used:

  1. WordPress core tables, including:
    • wp_posts
    • wp_options
    • wp_users
    • wp_comments
  2. Tables from plugins and themes
    • What these are called exactly depends on the re­spect­ive plugin or theme.

If you remove parts of the database, this may affect WordPress like a reset. It should be noted that there are two ways to reset the WordPress database:

  1. Delete database entries (DELETE * FROM <table>)
  2. Delete database tables  (DROP TABLE <table>)

It is essential to create a database backup ('Database Dump') before modifying the WordPress database. Usually, a database dump results in a com­pressed text file with SQL statement. To reset the WordPress database to a previous state, the Database Dump is imported. In this process, the SQL state­ments contained are executed se­quen­tially and the data is re­con­sti­t­uted.

There is a pitfall when restoring the WordPress database after reset: If only in­di­vidu­al entries were removed during the reset, the database dump must have been exported with DROP TABLE IF EXISTS entries. Otherwise, the restore will fail.

Resetting the WordPress site data

Unlike WordPress core, site data is change­able over time. The site data includes all folders and files in the wp-content folder. Let’s take a look at the most important folders and their relative paths:

  • Site data: wp-content/
    • Installed plugins: plugins/
    • Installed themes: themes/
    • Uploaded data: uploads/

Each plugin and theme is in its own folder. If you delete one of these folders, the re­spect­ive theme or plugin will be removed. If necessary, however, tables and entries should remain in the WordPress database. If you remove the complete wp-content folder, you reset the WordPress site data. You can then start from scratch in­stalling plugins and themes.

Managed Hosting for WordPress
Create your site with AI, we manage the rest
  • Stress-free, no matter your skill level with easy AI tools
  • Full cus­tom­isa­tion with themes and plugins
  • Hassle-free updates and less admin

What are the methods of resetting WordPress?

There are three basic ways to reset a WordPress site. We’ll discuss these in detail as we go along:

  1. Reset WordPress page manually
  2. Reset WordPress site using plugins
  3. Reset WordPress page using WP-CLI
Note

Resetting a WordPress site brings de­struct­ive changes to the WordPress in­stall­a­tion and content. If you have valuable content on the site, it is essential to create a WordPress backup. It often makes more sense to create a new, clean WordPress in­stall­a­tion than to clean up an existing version. This is es­pe­cially true if the existing version has been hacked. Malicious code can survive cleanup attempts well hidden in a WordPress in­stall­a­tion.

Reset WordPress page manually

Many WordPress reset guides found on the web recommend a manual approach with a series of in­di­vidu­al steps. Work on the server or the backend of the hosting en­vir­on­ment, deleted targeted files and folders and change con­fig­ur­a­tion settings of the WordPress in­stall­a­tion as well as the hosting en­vir­on­ment. Adjust DNS settings, create a new database or delete tables in the existing database. If necessary, you can make use of special scripts.

In most cases, doing it manually is not the optimal way to reset a WordPress site. Most of the time it is easier to create a new, clean WordPress in­stall­a­tion. This is because a WordPress site should ideally be in­dis­tin­guish­able from a freshly installed WordPress after a complete reset.

The manual approach is the most powerful and allows you to reset parts of WordPress with surgical precision – provided you have the right know-how. If you lack the necessary knowledge and ex­per­i­ence, it is easy to crash your site. Therefore, it is essential to create a backup before starting work. Even better would be to work on a WordPress staging site. Let’s look at a few scenarios where the manual approach comes into play.

Relaunch with existing domain and fresh WordPress

Let’s imagine we have an existing WordPress site under the domain www.example.com. Now we want to start from scratch with a fresh WordPress. Of course, we want to keep the existing domain and the as­so­ci­ated search engine authority. A commonly shown approach is to reset the existing WordPress site and then rebuild it under the existing domain. However, this approach is based on an error in thinking.

Remember, a com­pletely reset version should ideally be in­dis­tin­guish­able from a freshly installed WordPress. Therefore, it is better to install WordPress fresh and then direct the existing domain to the new in­stall­a­tion. To do that, adjust DNS settings in the hosting backend or domain registrar to associate the domain with the server’s IP address. Then adjust the WordPress site URL and replace all instances in the database with the new URL.

It is often practical to leave the old site in place when re­launch­ing. This way, you can still view content and settings later and transfer them if needed. A good approach is to host the existing site under a subdomain like old.example.com after the relaunch. Similarly, before the relaunch, build the new site under a subdomain like dev.example.com. At the time of the relaunch, swap the two sites:

Site Domain before relaunch Domain after relaunch
Existing site www.example.com old.example.com
New site dev.example.com www.example.com

If you choose this approach, it is essential to create a robots.txt file in the root directory of the old site to hide it from search engines. Otherwise, the duplicate content problem remains, which can have negative con­sequences for the ranking of the new and old site. In the old site’s robots.txt file, make the following entry:

User-agent: *
Disallow: /
Tip

Register your desired domain at a low price with IONOS.

Reset WordPress theme when re­design­ing the site

If you use a com­mer­cial or free theme for the design of a WordPress site, you should ideally create a child theme when you build the site. All changes to the theme will then apply to the child theme. Once this approach has been taken, it will be easy to develop a new design in the future.

For the redesign, simply create a new child theme and test it on a staging site until you are satisfied with the result. Then copy the finished child theme into the existing WordPress in­stall­a­tion. If you now activate the child theme, you start over with a fresh theme.

But what if no child theme was created? In this case, all changes were made directly to the theme. How to reset the WordPress theme then depends on the theme.

Reset WordPress site com­pletely

This method is most often found on the web when looking for in­struc­tions to reset a WordPress site. This involves manually removing the com­pon­ents of the WordPress site that are variable over time but leaving some (in theory) un­change­able com­pon­ents in place. The site is ef­fect­ively 'gutted' in order to fill it with new content af­ter­wards.

We will show this procedure here for the sake of com­plete­ness. The process is no less time-consuming than com­pletely re­in­stalling WordPress. However, since some WordPress com­pon­ents survive the reset, there is a risk that com­pon­ents from the old in­stall­a­tion will cause problems later. Let’s take a look at the process:

  1. Create a complete backup of the existing site.

Backup WordPress database and WordPress directory!

       2. Create new database and save access data of the new database.

Create the new database in the hosting backend or use the mysql command on the command line.

It is often re­com­men­ded to delete the existing database at this point. This is actually un­ne­ces­sary. It is often better to hold onto the data a little longer. Remove the old database only when you are sure that everything is working.

       3. Empty all content in the wp-content/ folder.

At this point, it is often re­com­men­ded to delete the wp-content folder com­pletely. On the Linux command line, the following command does this, as long as you are in the WordPress root directory:

rm -rf wp-content/

It is more practical to rename or move the folder:

mv wp-content/ _wp-content/
mv wp-content/ ~/quarantine/_wp-content/

WordPress is then no longer able to find the folder and creates a new, empty wp-content folder. At the same time, the original content remains in the _wp-content folder. So, you can still access them to view files and transfer them if necessary.

       4. Reinstall WordPress

To do this, bring up the WordPress address in the browser and add the following suffix: /wp-admin/install.php

Enter the access data of the new database and continue the in­stall­a­tion process.

Reset WordPress site using plugins

The manual process of resetting a WordPress site is laborious and prone to error. It is better to limit potential influence. If there are only a few, well-defined paths, it’s harder to make mistakes. WordPress reset plugins do just that. We present 'WP Reset' plugin in detail here.

For most users, WP Reset is the easiest and most direct way to reset a WordPress site. The plugin has an intuitive web interface and offers a good level of func­tion­al­ity. The plugin con­veni­ently allows you to create a snapshot of the WordPress database. This is how you can undo a reset. Beware: The snapshot contains only the database; files are not backed up! So, you still have to make a complete backup be­fore­hand.

Tip

Auto­mat­ic­ally secure your data with MyDe­fend­er by IONOS – including pro­tec­tion against malware and easy recovery.

WP Reset allows you to reset a WordPress site to its initial state. Con­veni­ently, the plugin allows you to retain important values after the reset. This includes the name of the site and the site URL, as well as the admin user and password. Let’s take a look at a few examples of how to use the plugin below.

Note

There are other plugins with similar func­tion­al­ity. However, most of them only allow you to reset the database. In isolation, this is not very useful, since most of the time op­er­a­tions on the WordPress files are also necessary.

Reset WordPress page with WP-CLI

The 'Word­Press Command Line In­ter­face' WP-CLI is a good tool for WordPress admins. You can control WordPress from the command line with it. The software combines op­er­a­tions on file system and database under one con­sist­ent interface. This can be used to reset a WordPress site with WP-CLI, among other things.

Command line tools are useful because they allow you to stand­ard­ize work steps. Using the command line makes processes re­pro­du­cible and allows them to be en­cap­su­lated as scripts. Using WP-CLI is quicker and less risky than doing it manually.

Using WP-CLI requires SSH access to the server running WordPress. A solid approach to working with WP-CLI is to first try out each step on a staging site. You can execute commands and document them in a text file. If the result is suc­cess­ful, the tested commands will be executed in the correct order on the live site.

Tip

In Hosting for WordPress plans from IONOS, WP-CLI and SSH access are already included.

Let’s consider some useful WP CLI commands that help to reset a WordPress site:

WP CLI commands Outcome
wp site empty Deletes posts, comments, cat­egor­ies, and keywords; es­pe­cially useful directly after in­stall­a­tion before starting the actual work
wp site empty --uploads Like site empty command; removes ad­di­tion­al uploads folder
wp config create --dbname=<dbname> --dbuser=<dbuser> Creates a new wp-config.php file; enters the database access data
wp core download --force Download WordPress core files fresh; over­writes existing files in the process
wp core download --force --skip-content Like wp core download --force; does not install default plugins and themes in the process
wp core install --url=<url> --title=<site-title> --admin_user=<username> --admin_email=<email> Complete WordPress in­stall­a­tion: creates database tables and set the required entries
wp db export <file> Exports WordPress database and writes to file
wp db export <file> --add-drop-table Like wp db export <file>; inserts DROP TABLE IF EXISTS
wp db export - /gzip > ~/wordpress_backup.gz Exports WordPress database and writes to com­pressed file
wp db tables Display the tables contained in the WordPress database
wp db clean Deletes all tables with the WordPress database prefix from the database
wp db drop Deletes the entire WordPress database
wp db reset Deletes the WordPress database and recreates it af­ter­wards
wp option update siteurl <url> Resets the site URL
wp search-replace <old-url> <new-url> Replaces all instances of the old site URL in the database with the new site URL.

What is the best method for resetting WordPress?

Using a plugin is easiest but it requires a working WordPress. Plugins could stop working, for example, if the database is un­re­spons­ive, the WordPress core has been corrupted, or there is a server error. In addition, the use of a plugin allows for less detailed potential influence than the other two methods.

Using WP-CLI offers a good com­prom­ise between power and user-friend­li­ness. However, to use WP-CLI, the software must be present on the server. You also need SSH access to the server. WP-CLI may also refuse service in some cir­cum­stances. This happens, for example, in the case of a version conflict between the WordPress in­stall­a­tion and the installed WP-CLI or if PHP fails com­pletely on the server.

The manual method is powerful and always works as long as you have access to the server or the resources located on it. Besides SSH, access can be made via (S)FTP, cPanel, and phpMy­Ad­min. As powerful as the manual method is, it also requires the greatest skill. If you lack the necessary knowledge, you can quickly cause a lot of damage.

To summarise, we will assess the three ap­proaches as follows:

Reset WordPress User-friendly Powerful Reliable Low risk
Manual + +++ +++ +
Using a plugin +++ + + ++
With WP-CLI ++ ++ ++ +++
Con­clu­sion

If you want to com­pletely reset WordPress, it is usually better to restart with a fresh WordPress in­stall­a­tion. If only certain parts of a WordPress site are to be reset, non-pro­fes­sion­als are best off using a plugin. For ex­per­i­enced admins, WP-CLI is the gold standard for WordPress ad­min­is­tra­tion. The tool offers multiple pos­sib­il­it­ies to reset com­pon­ents of a WordPress in­stall­a­tion as part of de­vel­op­ment workflows. In any case: Be sure to create a backup before resetting WordPress!

Go to Main Menu