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 https://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.
Related Posts:
- revert one revision of a post progmattically via code?
- Is there a way to get a revision count of a post?
- Autosave control in WordPress
- Define maximum number of revisions per post type?
- How can we publish revisions of a post, in addition to showing the latest post?
- Is it possible to set custom post type revision limit inside the theme files?
- Public (Non-Admin) Post Edit/Revision History
- Cannot limit post revisions
- Allow a non-author to see revisions of a post
- Display an old revision of a post in WP front-end theme, are there functions for this?
- Front end URL to restore a post/page
- Schedule Page/CPT Revisions
- Max Number of Post Versions Supported
- Disable revision access for a specific user role
- Is it possible to publish multiple versions of a single post?
- Preview previous revision without restoring it
- Revisions deos not work on the new update of wordpress 2018 ( WordPress 4.9.5.) .Went to Screen Options but does not appear
- Page edit auto-creates blank revision and editor
- Browsing Revisions in Custom Post Types takes me Empty Post Listing
- Revisions function ¿disabled?
- How can I purge all post revisions except the latest 5?
- Compare first and last post revision
- is there a way to see all changes been done on a wordpress site?
- post visibility history
- How is revision works internally?
- Elegantly prune post revisions
- Enable revisions for custom post type
- Safest way to bulk delete post revisions
- How to properly turn off REVISIONS and AUTOSAVE for whole site and optionally for a custom post type only
- How to enable revisions for post meta data?
- How to hook in and modify the new revisions UI (3.6+)?
- Per Post Type Revision Numbers
- Notice: Constant WP_POST_REVISIONS already defined
- Post revisions don’t save or show up only for custom post types
- How to add internal, revision comments to page updates
- SQL Query for getting all posts in their latest revised state
- Adding revision support to WooCommerce product content
- Is it possible to select against a post’s parent’s fields with WP_Query?
- A Blog’s changelog
- Exporting revisions
- Can I strip HTML tags in the “Compare Revisions” screen?
- Will removing revisions positively impact database performance?
- Why is wp_is_post_revision always false?
- Turn revisions off in plugin instead of config.php?
- Is it wise to delete post revisions and autosaves from database?
- how to enable different number of revisions for different blogs when using WPMU?
- Disable revisions for a specific post type only?
- Get the author of the latest revision
- Enabled Revisions to existing custom post type not working WordPress
- Display revision if post status is pending
- wp-types – How to allow custom fields to be saved in the revision
- Support auto-save and revisions for custom fields
- Adding a cancel button to edit post screen
- How do I batch create revisions of all posts?
- Are posts updated or built from revisions + autosaves?
- Enable post revisions for a specific post
- WordPress as a web app – always auto-save post and meta data
- Show history of post revisions on front end
- Will revisions be retained when converting to a multi-site?
- How do I get the intended post type of a revision post?
- Define a wordpress constant through plugin functions?
- How to enable the view of revisions of post in WordPress Api for custom post type?
- Post revisions disappeared (for some posts)
- Get last revision author, author-link and date
- Add last Revision of Post column on Admin Panel
- Getting post revision and printing them on the post content site
- WP Storing postmeta into revisions
- How can i disable auto save & revisions with `function.php` in wordpress?
- Only keep the First and Last Revision of a post
- How to hide html tags on revision comparison pages?
- Updating a page won’t have any effect
- Restose content from revisions – sql query
- Get latest post revision with wp-query
- Visual (non-HTML) display of post revisions [closed]
- How can I make revisions more extensive?
- What happens if I delete all the rows that represents a post revision from the posts table into WordPress database?
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- Display post changelog in post
- Woocommerce altered my homepage, and I can’t figure out how to revert it [closed]
- How to get post revisions in my custom rest API? [closed]
- Delete post revisions only for a single post
- How do I manage custom meta in post revisions in the Block Editor era?
- How to reduce the number of revisions?
- Disable autosave with `function.php` for custom post wordpress?
- Displaying a List of Changes / Updates on the Website Publicly
- Revision featured image
- how long do restored versions take to go live?
- Problem with revisions only returning four results
- Show Post Revisions on front-end
- Getting 401 unauthenticated error in WP Rest API revisions
- How would I see which wordpress posts have a revision history without opening each one?
- Is there a way to determine which user changed a custom field (and when)?
- Clean up customize_changeset in DB
- WordPress doesn’t save a post revision when changing CMB2 custom fields
- revision id is one number behind – publish_post
- Can I check who updated the static front page on WordPress and the time it was done
- Why does uploading a media file a second time restore older version?
- How to Determine a Post’s Last Edited Date?
- How to update the ‘modified_time’ of a post ONLY when content is changed?
- Saving Revision of post meta key/value on each update_post_meta event