Last active
December 18, 2015 17:39
-
-
Save jasperf/5819653 to your computer and use it in GitHub Desktop.
Replace WordPress content in posts when the post is not empty using a MySQL query. This I sometimes use to replace dummy content with Lorem Ipsum content to make it easier for clients to focus on the layout and style and not so much on the text, #wordpress #posts
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
//NB Replace wp with your own prefix | |
//see http://stackoverflow.com/questions/17099905/replace-old-wordpress-post-content-with-new-if-not-empty | |
//For Lorem Ipsum Content see http://www.blindtextgenerator.com/lorem-ipsum | |
UPDATE wp_posts SET post_content = 'NewText' WHERE post_content > '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment