I am also having this issue, and it seems that it has generated enough categories to noticeably slow down the post management pages in my tags blog.
Some of our categories are in there 400 times. Since these all get pulled into select elements and other parts of the post management pages, these pages are so large that my browser is nearly crashing on each page load. The HTML source is over 26,000 lines long!
So, I used this query to count how many times each category has been added:
SELECT name, COUNT(term_id)
FROM wp_1_terms
GROUP BY name
ORDER BY COUNT(term_id) DESC;
Thankfully, it is creating these categories but not actually using them. So this query should tell me the number of categories that aren’t being used (in my case, this is currently 8007):
SELECT COUNT(t.term_id)
FROM wp_1_term_taxonomy t
LEFT OUTER JOIN wp_1_term_relationships r ON r.term_taxonomy_id = t.term_taxonomy_id
WHERE t.taxonomy = 'category'
AND r.object_id IS NULL;
This query should delete all of the categories that aren’t being used:
DELETE t
FROM wp_1_term_taxonomy t
LEFT OUTER JOIN wp_1_term_relationships r ON r.term_taxonomy_id = t.term_taxonomy_id
WHERE t.taxonomy = 'category'
AND r.object_id IS NULL;
That cleared things up a lot for me. I hope this helps!
That category issue has been fixed in the dev version. It was inserting the categories without checking to see if the post status was publish.
Hi,
I am having this same issue. I deleted over 3000 categories last night. I also have a grand total of 20,000 tags now listed that I have not gotten to to delete yet. As jlencion stated above it has gotten to the point of slowing down the entire network of sites.
Ron? Are you saying the 3.1.3 version has this issue fixed?
If not is there another solution out there? Or do we just need to keep spending hours deleting the extras?
Thanks for any help.
Ron? Are you saying the 3.1.3 version has this issue fixed?
The latest version has this fixed. You will still have to delete the extra ones. I found that issue on one of our networks and spent 5-10 minutes a day for a week or so deleting the extra tags/categories.
If your site is an upgraded MU install, the extra terms will also be in the sitecategories table.
Hi Ron,
Thanks for the help.
My site is an upgraded MU site. I had no idea they’d be in there, but now I can go get rid of them.
Gene
Ron,
I’ve installed the new version of sitewide tags, but am not seeing the categories or tags transfer to my main site. All else works, except for the tags and categories.
Any advice? Thanks, very much, in advance.
but am not seeing the categories or tags transfer to my main site
Do you mean the new posts that are arriving in the tags blog have no categories & tags associated but they do in the originating site?
Thanks for the prompt response.
That’s correct.
Can you create a new thread for this since it’s unrelated to the original topic of the thread?
Lots of people will find this thread based on the title and use it as a resource to address the issue in their network. Changing to a completely different topic/issue mid way through the thread makes the thread confusing.
Hi, Me Again!
What exactly SHOULD be in the Sitecategories database table? Just the 300 actual categories I have sitewide? Or should there be more than that in there? I ask cause I am about to clean it out and it has 15000 total entries. Many with the aforementioned tag, tag2, tag3 numbers after them and such. Just wondering if I can just scan for my actual categories and delete the rest.
Thanks
The tags also go in there because they are terms. The sitecategories table name is from the days before tags and was never renamed.
But you will have lots that you will be able to clean out.
Thanks Ron,
Yep, I knew there’d be a lot to clean out. Gonna use your little bit at a time strategy rather than sit here for 2 days doing nothing but deleting.
Hi!
jlencion, Where do i put this code?
@notreco: It is SQL, so you would probably want to use some sort of MySQL frontend, like MySQL Workbench, SQLyog, or phpMyAdmin.