I tried the following phpMyAdmin query to merge my category 112747 into my category 112748:
UPDATE `wp_term_relationships` SET `term_taxonomy_id` = 112747 WHERE `term_taxonomy_id` = 112748;
It did not work. What errors does the query contain?
A wordpress website of mine has nearly 300,000 posts, with most categories containing, at least, 5,000 posts. I want, among other things, to merge many of the categories, in an attempt to improve website speed and performance.
I have tried using several different plugins to merge categories from within the wordpress dashboard, but it seems my ability to successfully use the plugins is being adversely affected by various mysql, cpu, and php automatic kill/limiting features of the shared hosting environment(cloudlinux) where my website is located; in other words, the tasks get "killed" before they complete, sometimes, "crashing" the entire website.
I am aware that deleting a category, using the wordpress dashboard, moves that category's posts to the default category; so, I have even tried changing the default category to a category into which I want to merge "another" category and deleted the "another" category, but, apparently, the task still, eventually, gets "killed" or "times out".
What, typically, has been occurring, when I attempt to merge categories, from the wordpress dashboard, using a plugin or by deleting a category, is that the "merge" only partially completes. For example, maybe 30 or 400 posts from a category do get merged, but, then, the task gets "killed" or "times out", sometimes generating an error in the wordpress dashboard, sometimes "crashing" the website, and sometimes doing both.
Typically, if all posts do not get merged, I am able to, incrementally, repeat the task, using the wordpress dashboard, but this may take repeating the task many times, to get a category of 15,000 posts merged into another category. Moreover, if the website "crashes" on a particular "repeat", then, I must wait for the website to "recover" from the crash.
So, considering the aforementioned problems I have encountered, while attempting to merge categories from within the wordpress dashboard, I felt it would be much more efficient and simple to just use phpMyAdmin to merge categories, etcetera.
However, it seems as if the wordpress database structure has become much more complex. I thought I was able to use phpMyAdmin to do this kind of thing 5 years ago, or so, with much greater ease and simplicity.
In this particular instance, I confirm "term taxonomy id's", etc., multiple times, before attempting the actual query; in order to avoid needless mistakes. Some of my forum posts, however, may show incorrect term taxonomy ids, because, in this particular instance, of the manner in which I have copy/pasted from a text file that lists all my failed attempts. Again, when I am actually attempting a query, however, I check such things as "term taxonomy id's" multiple times, before proceeding with the query.