Query block, list big amount terms taxonomies(tag), page exhausted

i have more than 10 thousands tags(wordpress core tag), i want list some of them out( for example, list 100 of them), by Query block.
now if i do this, the page will show " Fatal error : Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /www/wwwroot/*/wp-includes/wp-db.php on line 2135"

i know. most people are small site, not everyone have so many tags need to manage, but i think this is still a issue need to care and fix.

1 Like

@qiang814k Increase php memory limit.

“Increase php memory limit” is a way, but it’s not the right way, i guess.

as my understanding, page exhausted, because the code fetch all the data , since the data is huge, so it cause the problems.

in this situation, i think “fetch all the database” is NOT a right way here. i am not a programmer, i do not know exactly.

i think we need Louis’ feedback here

@qiang814k How are you to trying to fetch the 100 out of those 10K tags? Post screenshot of the query.

Have you manually specified / selected 100 tags in the query inclusion? Share some more details.

i have no ability to go through the detail of this, it’s out of my ability , sorry, my friend

i give a thought on this topic, i have more than 100 thousand posts, but it is still can list them out smoothly in pages one by one, is it possible, can we can list the WordPress tags taxonomies like posts?

Yes. You can list the tags taxonomy like posts. WP 6.1 will also some bring perf improvements which will also benefit Cwicly as it queries WP native way and not in a custom way.


Hello @qiang814k,

Apologies for the trouble you’re experiencing.

Unfortunately, what @anon32808828 says is correct.

If this is a query using the Query block, then this is most definitely an out of memory issue that we cannot fix on our side without knowing the exact architecture of your installation. Indeed, we use the default WP Query (and other official classes) to query the database, thus this would necessitate custom attention.

If this is using the Taxonomy Query block, then there might be adjustments we can make if you are using specific arguments in the block.

Please let me know if possible. Thanks!

what i mean is “Taxonomy Query block”,

firstly, for default posts post type:
Taxonomy Query block" is working very well in backend(cwicly block editor), after setting change, it will list the tags smoothly. but on frontend, it will take a lots of time for response. i can send you the testing link, if you need, please let me know. by the way, in the “order” setting, missed the “random” option(post query have random order option),

secondly, what i want to do is:
list out the Taxonomy( core tags) from specific post type posts(i assigned the core tag to different custom post type with CPT UI)/or you may also think about list tags from specific category posts, but Taxonomy Query block seems do not have a post type option. Query posts do have but taxonomy query do not.

i think this may be have some related topic as “tags(wp core) archive template does not work CPT tags” which i mentioned before
Custom archive template does not work for CPT when assign tags(wp core) to it - Tips - Cwicly

here is a article about CPT category and tag archives, i am not sure, it will helpful:
How to add your new post type to WordPress category and tag archives - Pluginize Docs