Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Advertise on LowEndTalk.com
how to make a wordpress site fully cached with no sql calls?
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

how to make a wordpress site fully cached with no sql calls?

donkodonko Member

hello i recently got a wordpress site which is causing me troubles because have a 6gb database and when i disable site cache my server crash with 30 load average with only 700 users online on a xeon E31230 32gb ram.

I'm using w3 total cache -page cache- and a widget cache plugin, also tried enabling object cache and db cache but i still receive querys in sql.

These are the queries: https://pastebin.com/b00yHpax

My problem is these queries bump cpu usage to 70% and mysql usage in 200%-400% for some seconds.

I need make this site most static possible since is not being updated month to month

Anyone can tell me if is possible cache in any form completely?

Comments

  • If you are running on LiteSpeed try LSCache.

    Otherwise, CloudFlare -> Page Rules -> Cache Everything

    "They said it's RAID 5" - geekypixal

  • JordJord Moderator, Provider

    Litespeed will be a great help, LSCache is great.

    BaseServ Ltd - UK Shared DirectAdmin Hosting | Litespeed + Cloudlinux + Free Backups + Free Transfers.
    BaseServ Certified to ISO/IEC 27001:2013

  • The post_type = 'episodes' clause in the SQL makes me think that you have some custom theme or plugin... You could try setting up a test environment and check if removing the plugin that implements this functionality makes the bad queries go away.

    Another alternative that you might want to try is a plugin to pre-render your WordPress site into static pages, such as https://wordpress.org/plugins/static-html-output-plugin/ . I haven't personally tried it, but it might be worth a shot.

    Thanked by 2donko Claverhouse
  • WP fastest cache is the simplest out of the box full page cache. W3 is complex, but if set up right the page cache should work fine.

    Most caches are set up to ignore post requests and / or gets with a query string, so its likely you have some js making Ajax requests, or a sort /search feature that's causing the issues.

    Not really possible to diagnose without access to the site though

    Thanked by 1donko
  • quicksilver03 said: Another alternative that you might want to try is a plugin to pre-render your WordPress site into static pages, such as https://wordpress.org/plugins/static-html-output-plugin/ . I haven't personally tried it, but it might be worth a shot.

    That plugin is fantastic. This is the output of my site from the plugin: https://stupefied-rosalind-0bc0da.netlify.com/
    and this is my site running W3 Total Cache: https://unixfy.me

    You can see the static exported version is quite a bit faster.

    Thanked by 1donko

    me // discord: Unixfy#3061

  • You could also go for WP2Static. They have the option to upload your site to BunnyCDN's storage. I've tried this and its totally prem.

    Thanked by 3donko kkrajk raindog308
  • cazrzcazrz Member

    6gb db, is your site e-commerce? If its just blogs then i suggest you check why you have that size. In most cases theme is a big factor in optimizing your site. A lot of themes are horribly coded. Many plugins do also.

    Cache most of your static pages and seldom updated pages, turn them to static then load in cdn. Set some rules what to cache and what not to cache if you have dynamic pages such carts.

  • RickBakkrRickBakkr Member, LIR
    edited January 30

    Use Varnish to serve (more or less) static pages (please: no full page caching plugins..) and use Till Krüss's Redis plugin with a Redis server to offload many repetitive database queries to Redis, which is much more lightweight than MySQL and derivatives. See these two bring joy to an otherwise pretty dark Wordpress world on a daily basis :-)

  • @jahrinc said:
    You could also go for WP2Static. They have the option to upload your site to BunnyCDN's storage. I've tried this and its totally prem.

    WP2Static was already mentioned a few times above

    me // discord: Unixfy#3061

  • Unixfy said: WP2Static was already mentioned a few times above

    ok?

Sign In or Register to comment.