How to, using PHP scripting or WordPress overwrite all of the posts (permamently, so it takes effect on database) with some static text such as "Content removed."?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
Do not run this on a live site until you're tested it on a backup or local installation and confirmed valid results, i won't take any resposibility for lost data, should that occur. SQL QueryTo run from PhpMyAdmin
Inside WordPressTo use inside a plugin or your functions file (run once)
|
|||||
|
|
Another option, if you need further control of the query or the replacement function, is to use more of the WP APIs, like this:
Bear in mind that this is much more resource-intensive than the SQL queries t31os proposed, so use with caution if you're modifying a large number of posts. See also: How to apply content filter permanently? |
|||
|
|