To delete all posts by a specific meta key and optionally meta value I run the following SQL query:
When using lots of plugins and different themes or when testing your own custom made theme or plugin, a lot of post meta can remain in your database that is not linked to a post. By applying the following query to your database, you can delete all meta data that is no longer linked to […]
To add post meta to all posts (posts with post type “post”) in your WordPress database you should use the following SQL query: To add post meta to another post type, simply change the post type in the WHERE clause.
Almost every WordPress developer had some annoyance with the basic search functionality of WordPress. Today I customised the search functionality for one of my projects so I am able to add a list of comma separated search query strings to a post where I want it to be found on. So for example a product like “bicycle” needs to […]
To delete posts with the same post title via SQL I run the following query on the database:
Update site url in wp_options: Update guid: Update all urls in post content: Update all urls in meta fields:
With this SQL query you can select all the posts from a specific term (and post type): With this query you can delete all these posts: