Did I figure the correct way to to mass empty a subforum with PhpMyAdmin, please?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Registered User
Posts: 69
Joined: Thu Jul 14, 2011 12:38 am

Did I figure the correct way to to mass empty a subforum with PhpMyAdmin, please?

Post by oliverfr »


I want to slim down a phpBB database, this is one of the required steps in my larger project to repair a broken phpBB 3.0.14 forum.
But, the forum being broken, I am *also* not able to use the administration CP to prune the one largest subforum: the Recycle Bin.

At this point, I'm going to purge it with PhpMyAdmin, since the STK doesn't mention the option apparently. But let us not screw up, right? ;)

I think I got it right, could you please give me a confirmation/infirmation?

First, I should run

Code: Select all

DELETE FROM phpbb3_posts WHERE forum_id = 15
My forum's recycle bin ID is 15, precisely.

I tested it with care, running

Code: Select all

SELECT COUNT(*) FROM phpbb3_posts WHERE forum_id = 15
returns a count of 99302: apparently, it finds something at least :D

(Honest confession, calculating the actual byte result size of this query, Stackoverflow style, is beyond my abilities)

I think I should continue with the phpbb3_topics category, to remove references to the titles, also?

Code: Select all

DELETE FROM phpbb3_topics WHERE forum_id = 15
Testing with SELECT COUNT(*) returns 31987, so here too, contents are found.

In the end, even if we end up with orphaned elements for some reason, as long as they are weightless and I managed to greatly reduce the size of my database, it will count as a victory.

Do you think those queries would do the work?

Or wouldn't it be enough, should I perform more?

Or is it folly to try to do that, it would only wreak havoc in the database?

Thanks to share your thoughts :)
User avatar
Lumpy Burgertushie
Registered User
Posts: 68305
Joined: Mon May 02, 2005 3:11 am

Re: Did I figure the correct way to to mass empty a subforum with PhpMyAdmin, please?

Post by Lumpy Burgertushie »

it would be much better to fix whatever the problem is that keeps you from accessing the admin panel.

exactly what is the problem there?

also, all of the tables in the database are interconnected. If you do not make the changes to all of the affected tables you will have more problems than you have now.

I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

Return to “[3.0.x] Support Forum”