New Video - How to run SQL Queries in WordPress using WPCodeBox
In this video, I show you how to run SQL Queries using snippets that run manually in WPCodeBox. To exemplify this, I use a few examples from Jeff Starr's new book about SQL in WordPress.
In this video, I show you how to run SQL Queries using snippets that run manually in WPCodeBox. To exemplify this, I use a few examples from Jeff Starr's new book about SQL in WordPress.
First Example: How to replace an URL (or any string) in the post content
In this example, I show you how to run a snippet that will replace a URL or any other string in the post content. This is super-useful when you want to batch edit multiple posts.
Second Example: How to find all the posts that have been modified in the last month
In this example, I show you how to find all the posts that have been modified using an SQL query. This example can be modified to load posts based on any number of conditions.
Conclusion
The ability to run SQL queries in WordPress is a very powerful skill to have. If you wnt to read more about SQL in WordPress in general, do check Jeff Starr's new book: