Regarding comments- what about the case where a comment older than 90 days has child replies younger than 90 days?
for comment and pingback status, this should do it:
UPDATE wp_posts SET comment_status="closed", ping_status="closed" WHERE post_date < DATE_SUB(NOW(), INTERVAL 3 MONTH) AND post_status="publish";
Related Posts:
- How to Delete Old Comments by Date?
- Resetting comment count
- Would switching to InnoDB from MyISAM improve performance of comments table?
- human_time_diff() returns “48 years ago” for all comments
- Get last seen date/time in wordpress get_comments() [closed]
- Recent comments from my blogs only
- Changing “submitted on date” of comments
- Log file reports SQL Error processing child comments
- Delete all one-word comments
- Control panel loads slowly due to 2 slow queries on comment table
- Placed on + only date (not time)
- How to amend time format of comments, using child-theme?
- comment_date() & comment_time() not working from functions.php
- How do I comment out a block of tags in XML?
- How to enable comments for pending and draft posts?
- A plugin where users can comment with Facebook or Twitter or OpenID [closed]
- Reverse comment pagination numbers
- Comment Count for each Comment Author
- Show comments from multiple post IDs in comment template
- Sticky Comments
- modify all posts of a category to “no comments allowed”
- Whitelisting Commenters
- WP_Comment_Query() displays “password protected” comments?
- Comments number message in password protected post
- Disable Comments Feed
- Use rich text editor in comments?
- Add a custom class to awating comments
- How to add custom comment fields but *only on the comment reply form*?
- Is it possible to move a comment that should be a reply to another comment?
- Show only posts which can be commented
- What should I hook to add extra fields to comments?
- Get a variable field of all comments of current post
- Average Score of all ratings in comments
- Making a Comment on a page without being on that page?
- Let user edit his own comment
- Get the number of comments awaiting moderation
- Comments view limited to 20 results – any way to increase to 50 or 100?
- Changing position of cancel_comment_reply_link and other elements of comment form
- What does the “$depth” parameter in the Walker_Comment stand for?
- Why do comment moderators need to have all create/edit/delete toboth posts and pages?
- Comment pagination – How to show determined number of comments on the first page?
- How to allow a particular role like Contributor be able to only view pending comments and approve them?
- How do I really disable comments?
- Sort comments by karma
- Comment form connection to Gravity Forms
- Add classname comment template from functions.php
- Comments deactivated
- Reject Comments Based on Author Email
- List user comments in author page
- Filter custom posts with / without comments
- Create comments.php form of custom HTML code
- Display comments on homepage of twenty seventeen theme
- Disqus comments and pingback script – how to change the order?
- To whom do emails get sent via the WordPress comments form?
- Is it possible to embed github gists in wordpress comments?
- Comments feed – Undefined named entity: ndash
- warnCommentChanges always being triggered on update
- how get comments only on post of current logged in user?
- How to get comment id in callback function?
- Posting comment returns 404
- How to convert WordPress comments to bbPress replies [closed]
- Get declared variable in single.php to work in comments.php without re-declaring it [closed]
- What is causing wp-comments-post.php to redirect to the browser’s IP address?
- Extra Title field for Comments
- Comments offset
- comments_number not displaying
- Using a static callback on wp_insert_comment
- Insert Ads “into” comments section in Genesis Themework
- WordPress Recent Comments Widget exclude own comments
- How to prevent multiple comments
- How to get comment images stored as serialized comment meta
- Hide comments on specific pages, not just disable future comments
- Add comment_meta to wp_comment_reply
- How do comments work?
- Can’t reply to comments [closed]
- What’s the difference with trash_comment and wp_trash_comment?
- ask and edit an extra comment field
- Refresh individual comment text via API
- How to filter comments by comment_meta
- Prevent users to delete comments from trash
- How to display replies to his comments in user profile of current user
- How do I refresh “Post Last Modified Time”, as long as comment is updated to Approve status?
- Top rated posts Average rating issue
- stop url changing when user comments
- Badges for Guests based on their comment counts [closed]
- How to add a class to comment submit button?
- WordPress Commenting System User access and Security
- WordPress Comments – Only show part of user name
- Broken comments section – WordPress 2014 Theme
- Need an advice about comments
- How do I get the comments section to show up?
- By Default, Turn Comments Off for Pages & Leave Comments On for Posts
- same comment list for two posts
- Replace do_action() with a normal submit form in comments.php
- edit-comments.php in Admin – how to change ‘Comments’ title?
- Comments on pages not appearing, even though I enabled them
- Stop future commenting on specific post
- comment awaiting moderation
- How do you fetch the authors email or IP from /comments? (REST API)
- How can I filter the user avatar displayed in comments? – get_avatar_url filter works everywhere but not in comments