Notifications
Clear all

wpForo 1.x.x Clearing posts "older than"

5 Posts
2 Users
0 Likes
349 Views
seemaxrun
Posts: 5
Topic starter
(@seemaxrun)
Active Member
Joined: 2 years ago

Hi. Thanks for the great forum.

Is there a way to clear posts from a specific forum that are "older than," for example to clear all posts in a forum that are older than 90 days?

 

4 Replies
Robert
Posts: 9256
Admin
(@robert)
Support Team
Joined: 6 years ago

You should be deleted from the database.

Please use your Hosting cPanle > phpMyAdmin database manager. Open your website database, navigate to SQL Tab and execute the following queries. If your table prefix is different please change the red marked wp_ part.

 

Removes topics which have been created or have been replied more than 90 days ago:

DELETE FROM wp_wpforo_topics WHERE modified < (CURDATE() - INTERVAL 90 DAY) AND forumid = X;

 

Removes posts older than 90 days:

DELETE FROM wp_wpforo_posts WHERE created < (CURDATE() - INTERVAL 90 DAY) AND forumid = X;

 

The blue marked X is the forum ID where you want to delete. The forum IDs can be found in Dashboard > Forums > Forums admin page.

 

Then navigate to Dashboard > Forums > Dashboard and click the following buttons:

  1. [Update Topics Statistic]
  2. [Update Forum Statistic]
  3. [Update Users Statistic]
  4. [Delete All Forums]

 

IMPORTANT:

In any case please backup the wp_wpforo_posts and wp_wpforo_topics tables using some Backup plugin or the Export Feature of phpMyAdmin Tool.

 

Reply
seemaxrun
Posts: 5
Topic starter
(@seemaxrun)
Active Member
Joined: 2 years ago

That is way too complex and involves going into cpanel mucking about in the database. I can't have a forum admin in the database cpanel for the entire site mucking about. They'll break something and take the whole site down.

In a simple machines forum, this was pretty easy from the forum control panel, I'd select a forum, tell the board to delete posts older than 90 days in a specific forum, and it would clear out the old posts in that specific forum.

There is no similar way to clear old posts in wpforo other than going into the database executing commands or going into the forum and opening and deleting each individual topic manually?

Reply
1 Reply
Robert
Admin
(@robert)
Joined: 6 years ago

Support Team
Posts: 9256

@seemaxrun,

I think executing of two SQL queries is not "too complex". You can use a simple SQL executing  or phpMyAdmin WordPress plugin and do all these in your WP Dashboard: https://wordpress.org/plugins/tags/phpmyadmin/

Reply
seemaxrun
Posts: 5
Topic starter
(@seemaxrun)
Active Member
Joined: 2 years ago

It is too complex for me — and my forum admins — Robert. I'm tired. I just learned five new software programs. My brain is too fried to start messing with sql and blow up the forum or something.

Thank you anyway. I'm guessing the answer is no. The forum doesn't have a version of this clean old posts command.

Reply
Share: