Transients are a simple and standardized way of temporarily storing cached data in the database by giving it a custom name and a timeframe after which it will expire and be deleted. But sometimes, transients set by WP and countless plugins can take a lot of space in your database. Using a simple SQL query, you can easily getting rid of them.
Even if you’re careful when approving new comments, sometimes you might just forget to visit the commenter url and detect a long time after that the linked site is spammy. Here is a very easy way to bulk delete all comments with a specific url, using a simple SQL query.
By default, WordPress allows you to sort results of a query by one meta value, but what if you need to sort results by two meta values (For example date and time)? Here ‘s a working example.
After an intensive use of your WordPress blog (creating posts, editing posts, and deleting posts) your database will contain thousands of rows of useless meta data. Here is a simple SQL query to delete orphaned post meta on your database.
Using the “Categories to Tags” tool, WordPress allows you to easily turn categories into tags. But if you have lots of categories to convert, this will take a while. Here is a simple SQL query that will turn all your categories into tags in a second.
For some reason you sometimes need to add a custom field to all your existing posts. You can do it manually, but if you have lots of posts, the process will take a while. Here is a simple way to add a custom field to all posts quickly and easily.
As a WordPress user, you probably had the infamous “Error establishing a database connection” error at least once. This error occurs when your database can’y handle a request. On cheap hosts, this can happen often. Today, I’m showing you how to give a custom style to this error page.
If you need to change your WordPress login, the easier is to use PhpMyAdmin and execute a simple SQL query to update it. Here’s a quick recipe to show you how to proceed.
Do you use trackbacks and pings? Many people find them useless and asked me how they can get rid of them. Sure you can close trackbacks post by post, but this will consume a lot of time. Or you can use a good old SQl query, as shown in this article.
WordPress shortcodes are great, but they have a bad point: When you decide to stop using them, their code stay in your post content. Here is a fix: A simple SQL query to run on your database to get rid of unused shortcodes.