9000 articles, website crashes

I’m creating an archive website for an old news site. So far I uploaded 9.000 news articles. I’m using the Tablog theme, which uses Twig.

I’ve noticed that when Kirby has to generate a list of news items of about 1,000 items, things go wrong:

When I upload more than 9.000 news articles, the whole site crashes. I have 14.000 articles in total.

Does anyone what to do?

I doubled the php memory limit to 256 and now it works. But for how long?

Are there ways to solve this without upping the memory?

What about using pagination instead of loading over 1.000 articles at one time? I guess that would encase speed and performance.

When it comes to speed and caching, @bnomei is also a specialist :wink:

One idea would be to implement the pagination with a filter and group the articles first by year and then by month. This would give you a visually appealing structure for this quantity of articles.

This is more of a PHP/Server issue.
The question is if you really need to show all those items at once?
Caching can also help but only gets you so far. It really depends on what you are trying to accomplish.

The easiest option would be as mentionend by @GB_DESIGN to paginate your list.


If you really need to show that many items at once you could implement your own children collection using yield to reduce memory usage. This should work but never had to go down that route yet and you would need to take a deep dive to make it work I guess.

Thanks for the replies. Together with my friend ChatGPT4 I added pagination.