Hi there at tagdiv,
I am running into some issues of witch I can’t optain if it is theme related or not, but maybe you can help or give a hint.
My newssite is running for over 8 years now with Newspaper and all postst are kept. My wp-postmetatable is very large (about 2,6GB) witch seems to give a lot of issues with stability of the database.
I recently moved from an unmaneged VPS (16 vCpu cores and 60GB RAM) to a shared hosting option with 24vCpu cores and 16GB RAM. I took over the site end 2024 and the previous owner helped with support on the VPS. Because of less time available and not being able to update Plesk to latest version, he stopped with suporting me on the VPS.
For years we used WP Rocket as caching plug-in witch almost never gave issues. Before the move a continues amount of databaseconnection errors was arising. The VPS had to be rebooted every few days because the mariadb service was killed.
Using a cache plugin (any cache plugin) gives Fatal database conetion errors or ‘Post can not be updated’. Tried Varnish cache without any other caching but that did not renew/cleared when I posted a new post. Also tried Redis Object Cache, witch worked at first, but then posting an post kept hanging and Redis didn’t clear anymore.
Because everytime I had to remove caching plugins via FTP to restore my site, I took a closer look at my database.
As far as I know I am only using cloud templates and flex blocks. But the fact that my postmetatable is 2.6GB big concerns me. Maybe you can help me out explaining if td-composer creates a lot of extra row in that table. At current time there are 1071550 totall rows in the postmeta table. I see a lot of the following rows
_vc_post_setting
_edit_lock
_edit_last
slide_template
post_views_count
and this repeats itself many times, but there are also references to other plugins like RankMath, WP Media Folder and FS Poster. It is tricky to get a clear picture of what is eating space unnessessary.
A hint of help would be much appriciated!
Hello,
There are a few theme settings that can increase database and resources consumption.
The largest data table the theme keeps in the database is the theme panel and the backups for it. From what I remember these are called td_010 and td_010_settings. What you could do is to adjust the number of backups, by default there are 5 of them. You could set it to 1 backup here -> https://prnt.sc/qZBjZo2p3bVu Other than this, it will require manually cleaning the rest of the autoloaded options.
Check if you are using ajax pagination, mega menu many blocks (the theme is making a query for each block in part and if you are using mega menu each element as mega menu makes queries, also ajax pagination make quires to database), also make sure that you use lazyload for images.
Also, check if you have enabled the post view count per articles, this is using ajax and request extra resources, also all filters base post view count consume extra resources (all popular filters).
In addition, it’s a good idea to identify what’s consuming your server resources. Tools like Query Monitor and Code Profiler can help you pinpoint high CPU or resource usage caused by plugins, themes, or database queries.
What I will recommend is to create a full backup for your website, in special for database and after that to try to clear the database; for this you can try this guide – https://hostadvice.com/how-to/website-builders/wordpress/how-to-optimize-wordpress-database-using-wp-sweep/
I hope this will help you!
Thank you!
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).
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
Maybe you can give me some insights in this?
Thanks Calin!
It seems the img code did not work.
Hi,
Ok, so the first step is made, the plugin that consume the most resources is tagDiv Composer, can you please check in Query Monitor for example on homepage what are the elements that consume more resources and are from the composer plugin? Can you provide a link to your website?
Thank you!
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
Hi,
I checked the site a little and it doesn’t seem to be using excessive blocks or many ajax options that make a lot of requests to the database, I think that’s why the few results from the Query Monitor plugin are there, but if the WP Media Folder plugin indicates that many queries, you need to see if these are all the site queries made by the plugin or just from this page, if it’s from the site, then it’s ok, but if they are from the page, then something is wrong. If you want, we can investigate further, for this you will need to have a complete backup of the site and the database and only then contact us by email at contact@tagdiv.com where you provide us with wp-admin access to the site and include the link to this topic so we can identify you faster.
Thank you!