Mysql allows you to run queries that apply to all post, see example :
UPDATE wp_posts SET POST_CONTENT = replace(POST_CONTENT, '<a href="http://mysite.com/my_link">mylink</a>', '');
This code allows you to delete <a href="http://mysite.com/my_link">mylink</a>
on all posts. But in your case I doubt all links are the same so you need a pattern. Perhaps it can be done with [REGEXP].1
Do you need to delete all links in content? That would be easier.
EDIT: make a backup of your database before anything !
Related Posts:
- How to clear the cache?
- How to do a query only on a specific admin page?
- WP_Query pagination not working in admin area
- Use ‘parse_query’ filter to show posts that from multiple criteria
- hide custom post types with specific meta key ON admin backend
- WP CLI can’t delete plugin related table
- How to view all posts of current day as default in admin
- Admin: Custom Query Returning Permissions Error
- WordPress AJAX Request returns 400
- How to use custom page for all posts with custom url, call another directory?
- Is it possible to give a classname to specific comments in the WordPress admin?
- How to set selected attribute on option after filter query?
- order by numeric value for meta value
- numberposts? showposts? posts_per_page?
- $GLOBALS[‘wp_the_query’] vs global $wp_query
- Some doubts about how the main query and the custom query works in this custom theme?
- Set Alias for meta_query arguments in get_posts()
- How can I use order_by to order by two meta_keys without excluding posts that don’t have those keys initialized?
- How to query only for products with status “in stock” in WooCommerce? [closed]
- WP_Query displaying ALL posts
- Does WordPress sanitize arguments to WP_Query?
- WP_Query meta_query where meta value ends in space
- Highlighting Sub topic in a post?
- wp_query for the first sticky, then display the rest of the posts excluding the first sticky
- How to combine tax_query and date_query in WordPress
- How to get any tag ID
- WP_Query with many meta_query arguments taking a long time to load
- Slow speed and high CPU usage for my code. How to improve it?
- Multiple queries on Home Page – page load/site speed issue
- Targeting specific pages in the loop
- WordPress custom archive page
- query attachments of parent page if attachments of current page are smaller than …
- Include Sticky Posts in Page Post Count for custom query
- Query sticky posts with thumbnails
- Show all parents and children in custom post type in right order
- Why is this coming back as null? Thats wrong. There is one post
- Retrieve featured image (thumbnail) url from multiple posts with one query
- WP_Query tax_query problem
- Retreaving all images attached to current post
- wp_query() get_col error
- How to select posts from one category but exclude posts in another category?
- Order a query result by a numeric meta key even if it does not exist, but put the posts with meta key first
- How can you get first post, last post and post count in a category?
- WP_query posts closest to todays date
- Need wp_query to return all children and grandchildren
- How to use offset in WP_Query
- difference between like ‘%%%var%%’ and ‘%var%’
- WP Query Category Atribute Not Working
- new WP_Query to get max price meta value not working
- wp_query should show stickies first
- How to orderby multiple meta fields if some fields are empty
- WordPress custom post type with meta – how to retrieve with wp_query
- Order by meta value (numeric value lower to higher)
- Wp_query calculate points
- WP Query – Outputting JSON and normal loop of posts
- Wp query show post by author name or post title or post content
- get data match with extra field value using wp_query for custom post
- Admin Page Post Id wp_reset_postdata not working
- Multiple queries and performance – wp_query
- WP_Query for a taxonomy with different taxonomy types
- Append URL query to next post link in custom query
- How to compare a date in custom field with today’s date in custom WP_Query?
- Executing query_posts after wp_insert_post
- Redirect Search to Form When No Product Results Are Found
- get_posts custom field
- wp_query posts with custom fields number smaller than
- Related Posts Excluding Certain Categories
- Unlimited Page Sitemap Link
- WordPress | WP_Query does not return anything with s=a
- WP_Query Pagination
- WP_Query orderby
- Using Ajax and WP_Query to load more posts on category page fails
- I have problems with the search query using multiple post types
- Different query result on local and server
- meta_query compare > not working
- 404 page on custom search pagination
- WP_Query about meta_key and its array value
- Query string order by custom field
- Paging works correctly on local version, but not live?
- Combine Tax Archive and Meta_Query in WP_Query
- Get posts by birthday
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- Paginate nested query of child posts
- how to avoid reloading/refresh the page when displaying the post of wp_list_categories
- Pagination not working with WP_QUERY
- Get Current CPT taxonomy category in shortcode
- Display images with same specific value?
- Custom Content Slider stop duplicate
- Sort Posts with custom meta key by default which is currently set as optional
- wp_query pagination links producing 404
- How return normal search result using wp_ajax action for wordpress
- Custom post types loop on a page template
- Pagination problem with multiple loops on the same page
- Carousel slider with WP_Query to show 3 posts on each slide
- how to use transient method?
- WP_Query – meta fields numeric
- How to query posts from single post format on Genesis framework
- Display Featured image from custom post type category (custom taxonomy) wise
- new WP_Query with order args – no more distinction between categories
- How to make OR condition in WP_Query