Make WordPress Core

Opened 7 months ago

Last modified 5 months ago

#60159 new enhancement

Performance Issues with Large Number of Categories in WordPress Admin Panel

Reported by: rangedpenguin's profile rangedpenguin Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 6.4.2
Component: General Keywords:
Focuses: Cc:


I am currently using WordPress version 6.4.2 on an Apache2 server with Ubuntu. My site has a large number of taxonomies, specifically over 200,000 categories. I've noticed significant performance issues in the WordPress admin panel, particularly when interacting with categories (adding, deleting, or loading in /wp-admin/edit.php).

Through observation and testing, it seems that the issue is specifically related to categories and their association with posts. When all categories are removed, but a similar number of tags is present, the performance of WordPress improves dramatically, leading me to believe that the problem lies in the way categories are handled, particularly in their association with posts.

Here's an example of the SQL query that seems to be causing performance issues while in admin panel:

SELECT t.*, tt.*
FROM notwplol_terms AS t
INNER JOIN notwplol_term_taxonomy AS tt
ON t.term_id = tt.term_id
WHERE t.term_id IN (475407,201837,531747,396102,14876,609708, ..., 211701,211702,211703,211704)

(Note: The list of term IDs in the query is significantly truncated for brevity.)

Steps to Reproduce:
Have a WordPress instance with over 200k categories & 200k posts.
Attempt to add or delete categories, or navigate to /wp-admin/edit.php.
Observe the high server resource usage and slow performance.

Expected Result:
The admin panel should handle a large number of categories efficiently without significant performance degradation, especially when adding or deleting categories or navigating the admin pages.

Actual Result:
High server resource usage and slow performance are observed when managing categories, indicating a potential issue with how categories and their post associations are handled.

Additional Information:
This issue is critical for the management of my site, as it significantly impacts the ability to efficiently manage categories. Insights into optimizing WordPress for handling a large number of categories, or any updates that could mitigate this issue, would be highly appreciated.

Change History (0)

Note: See TracTickets for help on using tickets.