How to reset WordPress – .com

a subscriber (Juan Manuel) You have asked me how to reset (delete everything) our WordPress installation. Let’s see how to do it in different degrees.

I remind you that everyone can make tutorial requests through the “support” tab of the . Learn more about the benefits of becoming a subscriber.

First of all, backup

Even if you want to do a reset, and therefore “delete” certain things, first of all I recommend you make a backup copy, in case you go back and delete something that you did not want to delete.

You can do this very easily with various plugins. In the tutorial I tell you how you can do it manually. And if you want a plugin I recommend one for . Finally, you can also take a look at the class of the

So, once we have the copy, we proceed to delete it. But first we must ask ourselves… What do we want to erase?

What do we want to delete?

Throughout the days, months, and years, our WordPress installation will go through many stages. We will test themes that we will not use later, we will install plugins that we will later uninstall and never use again, or we will even publish content that we will later delete but leave certain files and multimedia elements “orphaned”.

All this can leave a lot of information in the database and files in the FTP that only contribute to “fatten” our WordPress. So, depending on what we want to delete, we can adopt different solutions, which will help us to “thin it down” more or less drastically.

Database cleanup

If you only want to do a general cleanup of the database, I recommend the plugin. There are many database cleanup plugins, but this is the one I recommend, and the one I recommend in the . The developer is very good, reliable, and recognized.

Its operation is very simple. It shows us a list of everything that we can clean from the database, and with a single click we can proceed to do it. But we must also be careful not to delete anything we don’t want.

In the tutorial I tell you step by step what each option is and whether or not I recommend deleting that information. Take a look at it, as it is a highly recommended and safe option to do things, after a backup copy.

See also  Create a membership site - .com

Clear entire database

Sometimes we want to be more radical. For whatever reason, our database is having problems, and we agree to make a “clean slate”. I mean, delete the entire database, but keep the files and plugins.

To do such a thing we have many options. But I will recommend my favorite, very simple, fast and safe. It is neither more nor less than modifying a line of the file wp-config.php.

We simply have to look for the line where there is the “table_prefix” variable and modify it. It usually looks like this:

Although this variable can take any value, there is a good chance that it is “wp_”, since it is the default value in most automatic installations. But as I say, it can be another.

In any case, all we have to do is change it to another value (the one we want)such as “wp2_”, to make it easy:

And that’s it, nothing more! They’re just that subtle change, we’ve just “created” a new WordPress installation. If we go to see our website, we will see the following:

Do you realize how easy it has been? We already have a clean installation of dust and straw to start from scratch. We just have to fill in the data, hit the “Install WordPress” button and that’s it.

As I said, this method does not affect plugins. That means that when we go to the control panel, we will find them all ready. But yes, deactivated, and with all the information blank. As if we had just installed them for the first time. And the same will happen with the images, which will continue on our FTP, since at no time have we deleted them.

But the most interesting thing about this method is that if we repent, we can go back anytime. We just have to put our old prefix back in, and tachán! We will have our website back. It’s like having a “switch” with which we jump from one website to another.

See also  The big problem of Theme Forest - .com

It is important to note that this method does NOT create another database, but adds new tables (with the new prefix) which we already used. That makes the process very fast.

When we have everything as we want, and we have made sure that we have not deleted anything that we did not want to delete, we can delete the tables with the old prefix, since we are no longer going to need them.

What if I want to keep my pages and posts?

Another very classic scenario is if you want”delete all WordPress content except pages and posts“. That happens normally when it happens “something weird” with the database, or you’ve even been hacked, but you don’t know exactly what’s going on.

In those cases you can do exactly the same as we have just seen, but with a difference. Before changing the prefix, we are going to export all the content that we want to keep. We will do it with him.

First we will choose what we want to export:

Thus, we can choose if we want to export all the content, only the pages, or only the entries. , they would also appear there. In any case, that will generate an XML file for us.

Next, we can proceed to change the prefix, to have a new and clean website, as we have seen in the previous section.

And the last step will be to import the content that we have just exported from the old web. We will do that with the same plugin:

If you want more information on how to carry out this export and import process, I recommend the tutorial, in which I explain it step by step.

So, let’s look at the three steps we’ve done:

  1. Export the content we want from the “old” web
  2. Change the prefix to activate the “new” website
  3. Import the content to the “new” website

Although it may not seem like it, with these three steps, what we have done has been “remove everything that is left over”since the WordPress exporter is only limited to the content itself, but we have left behind all the ballast that we could have accumulated over time.

See also  iBooks Author Course - .com

Can I do it with a plugin?

If you are wondering if there are plugins to do these things, of course there are. There are plugins for everything. I personally prefer to do it as I have told you, but in the case that you only want to press buttons, I recommend the plugin, which allows us to selectively delete the databases:

We only have to select the tables that we want to reset from the dropdown, or simply select them all with the “Select All” link:

Then we click on the “Reset Tables” button and that’s it. We already have it done. Obviously, if we select them all, the next thing we will see will be the WordPress installation panel again.

Although it may seem like a more comfortable method, it is also true that it is more dangerous, since there is no going back. If we delete it, we will no longer be able to recover it, unless it is through a backup copy.

Summary and conclusion

sometimes we want reset our WordPress installation, to start from scratch, or only with certain content. We can achieve this in two ways: Cleaning the database, or directly emptying it and then reincorporating certain selected data.

The method can be manual or automatic. If we do it manually, we maintain more control and ensure the reversibility of the process. The automatic method is simpler and more dangerous. But in any case, a backup is always recommended.

And you already know it. If you want to know more about WordPress, its database, its structure and best practices, I recommend that you take a look at . If you will have immediate access to everybody them, yeah 😉

Loading Facebook Comments ...
Loading Disqus Comments ...