How to remove Yoast SEO from database in WordPress?

Have you uninstalled or deactivated Yoast SEO from your site but still find traces and entries of it in your database? That’s because uninstalling the plugin doesn’t remove all Yoast SEO files. So in this guide, we’ll show you how to completely delete Yoast SEO from your database.

Yoast SEO is one of the most popular plugins for WordPress. Having an SEO management tool is crucial for any website, and Yoast SEO is one of the most powerful ones out there. This plugin guarantees more traffic and SEO optimization. Besides, it helps you have better social media integration, easier means of managing your website, and all your content. And that’s just the tip of the iceberg. If you consider the pro features and add-ons, the functionalities that Yoast SEO offers are excellent.

However, sometimes you may need to uninstall or deactivate the plugin because you want to try a different SEO tool. If that’s your case, you should know that uninstalling the plugin doesn’t remove all the Yoast SEO data from your database making it bigger and heavier than it needs to be.

Why remove Yoast SEO from the database?

remove yoast seo from database - yoast SEO

Now, the reason for removing Yoast SEO from your site is up to you. Maybe you find some other SEO plugin that you like better, you find it hard to use, or you just want to have fewer plugins on your site. Whatever it is, there are significant reasons as to why you should completely remove Yoast SEO from your database.

For one, even if you remove the plugin, it leaves some rows in the wp_postmeta table in your database. Additionally, Yoast SEO also saves some columns (such as SEO, SEO Title, Meta Desc) in your WordPress Admin Post and Page listings, which are not removed after you uninstall the plugin. This can clutter your admin screens, and some users may not like having them around.

The main goal is to remove all the stored elements that Yoast SEO saves in your database. This is crucial for any power WordPress user so we recommend you remove all the unnecessary data and entries from your database to keep it clean.

Finally, keeping your database clean is essential so it doesn’t get needlessly bigger and heavier, and it doesn’t affect your website’s position in SERP.

So let’s go ahead and have a look at how to completely remove Yoast SEO from the database.

How to remove Yoast SEO from your database?

There are two ways to remove Yoast SEO from your database: you can either choose to do it manually via PHPMyAdmin or automatically using a plugin.

  1. Manually via PHPMyAdmin
  2. With a plugin

Both methods are very effective and give you the same results.

1. How to manually remove Yoast SEO from the Database via PHPMyAdmin

First, let’s take a look at the manual method. Note that you need to have access to your CPanel or your web host so you can access your PHPMyAdmin page. Even though this method is very simple, it’s recommended that you have some level of knowledge about managing your website database.

NOTE: As you’re going to delete some codes from your database, it’s always a good idea to do a backup of your site so you don’t lose any data in case something goes wrong. If you’re not sure how to do it, you can check out our step-by-step guide on how to do a full backup

So, to remove all traces of Yoast SEO from your database, simply follow these steps:

1. First, you need to login to your web host or CPanel and go to PHPMyAdmin.

2. Then, go to your WordPress database. Open the SQL tab for your WordPress database and refer to the input field provided to you.

remove yoast seo from database - featured image

3. Now, you’ll enter some SQL commands into this input field. These commands are Delete commands you’re going to use to remove certain codes from your database. All you need to do is place the following codes in the SQL tab:

DELETE FROM wp_postmeta WHERE meta_key = '_yoast_wpseo_focuskw';

DELETE FROM wp_postmeta WHERE meta_key = '_yoast_wpseo_metadesc';

DELETE FROM wp_postmeta WHERE meta_key = '_yoast_wpseo_title';

DELETE FROM wp_postmeta WHERE meta_key = '_yoast_wpseo_canonical';

DELETE FROM wp_postmeta WHERE meta_key = '_yoast_wpseo_redirect';

4. Then, click Go on the bottom right.

remove yoast seo from database - SQL commands GO

5. That’s it! All the Yoast SEO database entries should be completely removed from your WordPress Database.

2. How to remove Yoast SEO from the Database with a Plugin

remove yoast seo from database - uninstall yoast SEO

If you don’t want to code anything, you can use a dedicated plugin that removes all the Yoast SEO entries and thus completely removes Yoast SEO from the database. This plugin is called Uninstall Yoast SEO and it’s extremely easy to use. Even though it hasn’t been updated in a while, it worked well for us but may not work for some WordPress versions.

1. First, download the plugin. Place it somewhere handy because we’ll use it again.

2. Then, open your WordPress Admin dashboard and go to Plugins > Add New. On the top left, you should see an Upload Plugin option.

remove yoast seo from database - install plugin

3. Click it, then press Browse and find the .zip file you have just downloaded on the browser. After that, click Install Now.

4. After installing the plugin, Activate it.

Once you activate the plugin, it will automatically remove all Yoast SEO data from the database and then disable itself. So after that, you can go ahead and delete the plugin from the Plugin page.

Concluding

And that concludes our guide on how to remove Yoast SEO from your database in WordPress. Both the manual and the plugin methods are very effective and quite easy to apply.

If you’re going for the manual method, the process can be summarized as follows:

  • Open your PHPMyAdmin from your CPanel/web host panel.
  • Open your WordPress Database.
  • Enter the SQL delete commands that we’ve listed above.

As for the plugin, there’s not much to do besides installing it and activating it. Do note that the plugin has not been updated for over three years, and it may not work for some WordPress Installations. However, if it doesn’t work for you, you can always refer to the Manual section of this guide.

Finally, if you run into any issue while following our guide or you’re nervous about messing around with your WordPress databases, feel free to ask us for help in our comments section. We would love to help you out to the best of our abilities.