PDA

View Full Version : How to delete all vBulletin tags (mysql query)



Fli
03-02-2015, 02:01 PM
Got some warnings from my firewall that tags.php page eats alot of memory and runs long time

Run Time:39(secs) Memory:219540(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/username/public_html/tags.php

So i tried to open that page myforum.com/tags.php and indeed very long time to open, so probably put high load on server. When looken on mysql tables rlated to tags:

tag
tagcontent (~1 151 434 rows!!)
tagsearch

They used around 10% of all mysql database data (150Mb out of 1,2gb)

so i decided to delete all tags on my forum (backup first)

To do it i accessed PHPMyAdmin mysql manager, picked my forum mysql database and run this SQL query:


DELETE FROM tag;
DELETE FROM tagcontent;
DELETE FROM tagsearch;
UPDATE thread SET taglist = '';

it failed with Internal Error 500 because of too big tagcontent table, so i had to execute above commands without tagcontent command. And do that command from server command line instead (mysq -u root -p prefix_myforumtablename)

above commands deleted around 1 200 000 of lines from above tag related mysql tables

One can also empty table instead of "Delete from" command (TRUNCATE TABLE tagcontent;)

Then i choosen to disable thread tagging from AdminCP / Options / Tagging Options