Home User profile
tagDiv Member
Regio Online is a newssite with over 62 regional news-subpages, covering all regions of the Netherlands.
regio-online
tagDiv Member

Hi Simon,

Thank you for the detailed explanation and clarification regarding the current category filter behavior inside Cloud Templates and Flex/Grid blocks.

Your explanation actually helped me better understand the design philosophy behind the system and also why our setup behaves differently from what Newspaper normally expects.

I think part of the reason is that I still approach content structures from a more relational/database-oriented mindset. My background goes back to older database systems like dBase II/III/IV, BASIC, DOS scripting, Excel VBA/macros, etc. Because of that, I naturally tend to think in layered logical relationships rather than purely in single-category archive structures.

So in my head, the logic becomes something like:

IF current category = Regio Gouda
THEN include:

Regio Gouda (the regional page + the region category)
Zuid-Holland (one of the 12 provences of the Netherlands + the region category Gouda)
regional/national shared pool (one category showing on all regionpages)

AND exclude:

Binnenland (the general page and category for nationwide news without a specific regional topic)

rather than simply:
“display current category archive”.

That is probably where my expectations differed from how Newspaper internally handles Cloud Template category logic.

Our setup is also somewhat unusual in scale and structure for a single-site WordPress installation:

1 VPS-based installation
Ubuntu + Apache2 + Plesk Obsidian
16 vCPU / 60 GB RAM / 2 TB storage
single WordPress site
67 main sections/pages
57 dynamically related regional structures
55,000+ news posts since 2017
40,000+ featured images through Google Drive (WPMF Cloud addon)
database approx. 740 MB
site files approx. 600 MB
WP Rocket + Redis Object Cache
approx. 79,000 unique visitors monthly
approx. 325,000 pageviews monthly

Performance remains extremely stable:

GTMetrix A / 100%
Core Web Vitals all green
SEO 100/100
average TTFB around 55ms

So for us, the discussion was never really about performance gains. The static regional pages already perform extremely well.

The real motivation behind the Cloud Template migration was primarily:
maintaining one centralized template instead of maintaining 57+ manually structured regional landing pages.

Your explanation now makes it much clearer why our relational regional/province logic does not fully align with the intended behavior of _current_cat inside Cloud Templates.

To be honest, I actually appreciate the clarification because it confirms that the behavior we observed was not random or broken, but simply outside the normal archive-oriented design philosophy of the system.

Thank you again for the insights and technical clarification.

Best regards,

Egbert van den Bosch
Regio Online Nederland

regio-online
tagDiv Member

Thanks Calin. That easy. I need to check my eyesite again I guess 😉

Thanks for explaining! Can be closed!

regio-online
tagDiv Member

Thanks Calin. Maybe in the next update the link can point directly to the changelog instead of the homepage? It a big changelog this time. You all have done a lot of work. Thanks for that.

Topic can be closed.

regio-online
tagDiv Member

Thanks Calin,

I implemented everything on our live site today. At first, after removing several known rows of data, it seemed the postmeta table (viewing on tab Structure) had an overhead of 1.6GB. Something told me that could be the issue, after finding out that this is realy on reserved space in the database I optimised the table as adviced and 20 minutes later my postmeta table went from 2.6GB to 283,54MB. And everything is still working… (fingers crossed). I took me a few month, but finaly have seem to solve it ;-). Thanks you so much for your patience and assitance Calin. Again very much appreciated! You may also close this ticket!

regio-online
tagDiv Member

Hi Calin,

Thanks for the helpfull insight. But I believe I have solved the proble regarding the database. It has someting to do with the theme but more so with wp Heartbeat API.

In figuring out witch rows that are left are the largest in WP I ran an SQL query:

SELECT meta_key, COUNT(*) AS number_of_rows
FROM wp_postmeta
GROUP BY meta_key
ORDER BY number_of_rows DESC;

This gave met the following list:

post_views_count
64288
rank_math_internal_links_processed
50282
_edit_last
48835
_edit_lock
47508
rank_math_focus_keyword
47228
rank_math_seo_score
38447
tdc_dirty_content
37281
tdc_icon_fonts
37271
post_view_7days_last_day
32308
post_views_count_7_day_last_date
32308
post_views_count_7_day_total
32308
post_views_last_24_hours
32120
post_views_last_48_hours

As you can see there are a lot post_views wich we don’t use. Can this be disabeled through the themepanel also? For now I delete all the rows starting with post_view

But two other elements are just as important _edit_last; and _edit_lock; Edit lock should only be used by wp for a short while preventing for several authors to work on the same post. Those rows should delete itself, but as you can see, there are over 47.000 rows of it. It seems that a wrong or non presint Heartbeat API was responsible for that. So I also delete _edit_last and _edit_lock

Th datbase witch was 3.1GB large with a postmeta of 2.6GB is now a 1.09GB database with 898MB postmeta.

Installed WP Rockect again with preload. Installed and enabled Redis Object cache and am testing the staging sites performance It all seems to work fine after several hours and is ligtning fast again.

Thanks for yur every positive support and patience Calin. Hope I realy tackeld the issue once and for all this time.

regio-online
tagDiv Member

Hi Calin,

Thanks for your tips regarding the recommanded thumbs settings. Your suggestion to regenerate would works if those thumbs where on the sae server in our uploads folder. That is however not the case.

Simply put: we have no thumbs. We only have one size (full or 1920) on Google Drive. Inside the _wp_attachment_metadata rows in our postmeta each thumbnailsize for our theme is described and shown if needed, but it does not fysicly exsist anywhere. It is just the one Google Drive image served in different sizes described in that table. There are about 13 sizes and each size is described twice in one row. There is one row for each image and there about 35.000 images. You can do the math for that is over 910,000 seperate rules in postmeta,

Example of _wp_attachment_metadata (first few lines of one row only):

a:7:{s:5:”width”;i:2560;s:6:”height”;i:1394;s:4:”file”;s:40:”Isolatie-Foto-gemeente-Altena-scaled.jpg”;s:8:”filesize”;i:317478;s:5:”sizes”;a:19:{s:6:”medium”;a:6:{s:4:”file”;s:79:”https://drive.google.com/thumbnail?id=1425AFrPRIGp9vQy9TsJIg8W9A1X2G1vo&sz=w300″;s:5:”width”;i:300;s:6:”height”;i:163;s:9:”mime-type”;s:10:”image/jpeg”;s:8:”filesize”;i:10721;s:3:”url”;s:79:”https://drive.google.com/thumbnail?id=1425AFrPRIGp9vQy9TsJIg8W9A1X2G1vo&sz=w300″;}s:5:”large”;a:6:{s:4:”file”;s:80:”https://drive.google.com/thumbnail?id=1425AFrPRIGp9vQy9TsJIg8W9A1X2G1vo&sz=w1024″;s:5:”width”;i:1024;s:6:”height”;i:558;s:9:”mime-type”;s:10:”image/jpeg”;s:8:”filesize”;i:71200;s:3:”url”;s:80:”https://drive.google.com/thumbnail?id=1425AFrPRIGp9vQy9TsJIg8W9A1X2G1vo&sz=w1024″;}s:9:”thumbnail”;a:6:{s:4:”file”;s:79:”https://drive.google.com/thumbnail?id=1425AFrPRIGp9vQy9TsJIg8W9A1X2G1vo&sz=w150″;s:5:”width”;i:150;s:6:”height”;i:82;s:9:”mime-type”;s:10:”image/jpeg”;s:8:”filesize”;i:3789;s:3:”url”;s:79:”https://drive.google.com/thumbnail?id=1425AFrPRIGp9vQy9TsJIg8W9A1X2G1vo&sz=w150″;}s:12:”medium_large”;……… etc.

So, you see that the image sizes need to be cleared inside the database and can not be regenerated.

regio-online
tagDiv Member

In the meantime I also figured out that it is the plugin WP Media Folder that creates the largest amount of db rows in postmeta, wich have everything to do with the set image sizes in the themepanel of Newspaper and WP Core.

In have a question regarding those imagesize settings.

The WPMF Google Drive addon or the theme creates a db row _wp_attachment_metadata, wich holds references to the image file on Google Drive, but does so many different times in many different sizes (se below. I only mention the image size not the whole code. Every size is mentioned twice):

————

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w300

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w1024

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w150

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w768

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w1536

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w2048

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w150

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w218

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w300

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w324

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w485

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w696

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w1068

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w1920

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w1600

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w2200

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w2800

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w3400

https://drive.google.com/thumbnail?id=19EI*************ZWn&sz=w4000

——————-

This looks generated by WPMF, but it are the themepanel block settings => Thumbs on Modules/Blocks and I quess the WordPress thumbnail, meium, large and full settings.

At the moment I have all the thumb sizes turned on (except the retina), but I use 3 blocks in my pages, Beginning with one Big Grid Flex Block 6, several Big Grid Flex Block 1 and several Flex Block 1. With Flex Block 1 I use different views and image sizes to show.

However if I fill out ‘full’ or ‘1920×0’ the images fit in every Block in any size. It is good to know that before I upload an image through the WPMF Google Drive folder in WP Media Library, I first resize every image to max 1400w x 600h in jpg format and compressed to on everage 120Kb an image. At the moment there are over 35.000 images on Google Drive (about 3.5GB total in size).

Question (at last): if I can set every block in my pages to the full or 1920 setting, could I then disable all other thumbnail size settings? There is only one size image on Google Drive, but is delivered (as seens in the db row) in different size.

That is accumulating a lot of unnessary data it seems making my postmeta table very large and prone to disrupption of service.

If it is possible as I asked, I will have to contact WPMF for a way to get rid of the bloat of information no longer needed.

Hope you can make some sense om my message, because even writing it down was complex for myself.

regio-online
tagDiv Member

Hi Calin,

After backup I have removed two rows of tdc_history on my staging site. It reduced the database a little bit, but the site keeps on working just fine. So it seems that there was no issue with this.

I also encoutered the following row: tdc_dirty_content

Is this pointing to revisions, temporary data etc? In other words, can this row be deleted?

regio-online
tagDiv Member

Thanks Calin for advising me on this issue. I think it would be a start in beginning to solve the issue. Ofcourse I have also set out support tickets at all (important) plugin builders, hoping to find some more answers. I personally think it is a combination of things, wich makes all the more difficult to solve, but I move forward with more knowledge then I had before your answer 😉

Anyhow, thanks again for the fast support and clear answers Calin. Much appreciated. If you don’t mind could you keep this ticket open for now, while I investigate further on my staging site. Also trying your earlier suggestions.

regio-online
tagDiv Member

Hi Calin,

Thanks for that insight. I have create a clone of my website, since the livesite is updated every day a staging site with ability to push to live is the right choiche.

I created a subdomain as domain and put cloned the livesite to that domain. Works great.

Now I am troubleshooting the datbase, mainly concentrating on postmeta since that is a 2.6GB table. Using an SQL query I listed the top 200 of heaviest rows (in datasize) from postmeta.

The largest by far are 2 rows called tdc_history with combined 259766.0000 of bytes. Do I read this as only 0,25MB or are it realy 2597660000 bytes (not point used) wich would be 2597.66MB.

But since it is the largest row, could this row be deleted? I also see a lot of rows starting with _oembed_ scoring high as well. Although I have no clue if they are theme related, could these rows be deleted as well?

Awaiting you answer eagerly this time!

regio-online
tagDiv Member

Okay Calin. Thanks for your insights. I will try your recommendations. It will take a while I think, but I am curious if things will improve.

Now I only need to figure out how to make a staging site. Never done that before, but I will work it out.

I also learned there are double query’s made (sometimes 1200) so that can not be good. The main plugins (beside your theme) contributing to this are WPMF (+cloud addon+gallery addon), Rank Math and FS-Poster. I will get back to you if I have some results Calain. Thanks for pointing me in a direction to investigate further.

regio-online
tagDiv Member

Thanks Calin. That helps. You can mark this as solved!

regio-online
tagDiv Member

Aha, I’m sorry I missuderstoof Calin. I thought there was a revisions of the original page (regio Delfzijl, the same as regio Breda), but as I now understand if you import a cloud template there is no going back to the original page it was before that.

I will remove the page of regio Delfzijl, duplicate the page of regio Breda and rebuild it for regio Delfzijl.

Just one other question that was not quiet clear to me: does having a page cloud template reduce the load on the database query’s?

Thank again for your patience and time Calin.

regio-online
tagDiv Member

Hi Calin,

I am so sorry, but iI provided wrong links to the webpages the page with the template (wich I can not undo or find anywhere) is https://regioonline.nl/regio-delfzijl and one of the ‘normal’ pages is https://regioonline.nl/regio-breda

I fogot to put the word ‘regio’ after the last backslash.

regio-online
tagDiv Member

Hi Calin,

Thanks for the response. The website is https://regioonline.nl. It uses most cloud templates (but not everything), and has about 70 subpages. 62 of them have about the same layout as the homepage.

Query Monitor shows at Queries per component for td-composer

Plugin: td-composer 10 (SELECT) – 1 (SHOW) – 0 (UPDATE) – 3 (INSERT) – 0,0061 (TIME)

That seems not to be a lot. The plugin WP Media Folder however has 457 (SELECT) queries.

If you need more info or access please let me know

regio-online
tagDiv Member

https://prnt.sc/UGOnhRMO1Y0l

It seems the img code did not work.

regio-online
tagDiv Member

As you suggested i used Query Monitor and Code Profiler. I would like to share the image of the last because it shows that td-composer is by far the largest in use.

Please see Code Profiler image

Maybe you can give me some insights in this?

Thanks Calin!

regio-online
tagDiv Member

Thank you so much Calin. This is realy helpfull in tagling this issue, although I don’t think Newspaper is the real culpritt here, but it is an assembly of plugin data combined with theme data that makes the database grow so large. That said, some plugins you just can’t do without as a newssite, such as SEO and auto posting to social media.

Maybe I could consider a renewed site with a fresh look and less blocks. I already disabled Adsense, because it gave lots of layout shifts and was a bit overwhelming for readers. This way I can focus on the news and my readers too.

Thanks again for your insights Calin and pointing me in the right direction (again I must say).

regio-online
tagDiv Member

UPDATE: it seems I have solved the issue somehow, but I do not want to cheer ahead. For now it is working.

Solution (for possible other readers):
1. restarted my server
2. Accessed Plesk and started SSH
3. used command: sudo systemctl edit mariadb.service
4. located [Service]
5. typed below that: OOMScoreAdjust=-1000
6. Important that you type minus (-) 1000
7. Changed theme from Child theme to Newspaper main theme and that solved the wrong display
8. After an hour testing everything changed the theme back to Child the of Newspaper
9. Display stayed as intended

Hopefully this has resolved the issues I’ve encoutered. Can you leave this ticket open for a few weeks in case the issue reappears?

I don’t think it is a real Nespaper issue in hindsight.

I am however curious if anyone knows what that alexusMailer_v2.0.php etc can come from. As far as I good figure out it is a programm to send anonimous emails, probally missusing our domain.

Any other insights on all above issues are very welcome. Thanks for your time spend anyway!

regio-online
tagDiv Member

Update: I tried reinstalling theme and plugins, but that did not solve the current issue. Then I remembered I am using the the Newspaper Child-theme. I activated the main theme and deactivated the child theme. Now it seems to work both in backend and frontend.

I can not find anything strange in the childtheme, only some settings for RankMath SEO plugin that I know are there.

Still could use your professional advice dough regarding the database issue.

Sorry for the long read!

regio-online
tagDiv Member
regio-online
tagDiv Member

Thanks simchris for making an obvious but valid point regarding the versions mentioned. I will let our tech guy investigate if the update went correctly and if the Plesk toolbox is still needed or just creates a lot of ‘noise’.

Bettina thanks for adding it to your investigation list. Besides the stated above to simchris, we will ingnore this for now.

regio-online
tagDiv Member

Send you a mail at contact@tagdiv.com

regio-online
tagDiv Member

Hi again. I have an addition to mentioned problem witch might clear up some questions (or not).

The homepage is working and showing in frontend, but can not be edited in the backend with tagdiv Composer. It generates following message https://imgur.com/Gr1kPrp

But it gets a bit stranger. I can edit any other page in tagdiv Composer, EXCEPT when I duplicate a page. The duplicate of a page (any page) can not be edited in tagdiv Composer and generates the same error as shown in the screenshot. That doesn’t make much sense to me. It can not be a wrong code or something like that, else the original page would also not be editable with tagdiv Composer, but is.

Hope you can make sense out of this. The homepage is not editable at all in tagdiv Composer.

regio-online
tagDiv Member

Great offer Anamaria. Mayby could benefit others aswell. Thanks!

Viewing 25 posts - 1 through 25 (of 54 total)