Back to Top

How to Delete Taxonomies from database in WordPress

To Delete Taxonomies from database in wordpess

Basically, Latest version of WordPress has 2 categories by default

1. Tags
2. categories.

Categories and tags are ways to organize and find posts within a blog and across blogs. Categories are like topics whereas tags are more like keywords.

Few days back my friend asked me, How can I delete terms from WordPress.yes, You can delete manually from WordPress admin panel but when you have a lot of terms in hundreds or thousands of value then it takes a lot of time.

As a developer, manually delete which is not the good way so you need to apply query which can delete the terms from the database.

So I have written one script to delete terms/taxonomies from database, just a few minutes and your all taxonomies removed from database like Magic 🙂

You need to create one custom file and put it into WordPress root folder. place below codes into it.

Here is the code for that.Let’s dive into it.

NOTE:Make Sure You Have the backup of the entire database so that you can get back to a known state if things go wrong.



Copy above code and place it.That’s it you’re done,I have tested it with latest version of wordpress 3.5.1 too.

Thank you for reading.Feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular Posts

Step by step Node JS Tutorial for Beginner

Posted on 2 years ago

Bhumi

How to convert RGB to Hex color PHP?

Posted on 4 years ago

Bhumi

How to use Ajax in WordPress

Posted on 4 years ago

Bhumi