Export a list of all pages or posts containing content in WordPress

Last Updated: April 18, 2019

Recently, I needed to obtain a list of all WordPress pages or posts to which a Gravity Form had been published, in order to ensure that our caching plugin wasn’t interfering with them.

SELECT * FROM `wp_posts`
WHERE post_content LIKE '%[gravityform%'
AND post_status = 'publish'
AND post_type IN( 'page', 'post' )
Posted in ,

Chris Aram

I'm a developer who specializes in whipping your technology into shape so that it makes your professional and personal life better.