WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to revert many/all posts to the closest revision to a particular date, all at once?

The specific use case I need it for is to remove all the spammy viagra links from the content on a briefly-infected blog.

Any solution welcome.

share|improve this question
up vote 2 down vote accepted

Probably is a way with an SQL query.

But another solution is to use Search RegEx, which is a good plugin to be able to search and replace with grep and regular expressions through all posts and pages. And I'd delete all your revisions to make sure the links aren't hidden in old revisions that might get restored at some point.

If you need to develop a regex search string to find spammy href links, check http://stackoverflow.com/questions/tagged/regex

And you can search for text strings with phpmyadmin in your Cpanel, or better yet, adminer, which is simpler and more secure. WordPress › Adminer « WordPress Plugins.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.