Created
April 6, 2016 21:16
-
-
Save robwent/9db8579c177f6e08ad2ba9928d5e77f7 to your computer and use it in GitHub Desktop.
Select Wordpress posts that contain a string in PhpMyAdmin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Change wp_ to your database prefix | |
-- Change domain.com to your domain | |
-- Change string to the text you want to search for | |
SELECT | |
ID as 'Post ID', | |
post_title as 'Title', | |
CONCAT('http://www.domain.com/',post_name) as 'URL' | |
FROM `wp_posts` | |
WHERE post_type = 'post' | |
AND post_title != 'Auto Draft' | |
AND post_content LIKE '%string%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment