Site slow on first load if it hasn’t been loaded for a while.

[ad_1]

I’ve got a weird situation with a site I’m developing at the moment. It is contained within a “test” folder on the main domain. It’s a Woocommerce site. It runs on fairly cheap shared hosting, and is a handcoded theme, with a few, but not too many, lightweight plugins. It won’t be massive.

Just to note – I have made a few other sites that are similar (handcoded Woocommerce) and they are on the same hosting plan, and they run really fast, even on first load, and with cache cleared. Around 0.5s per page, including initial load of home page. Just on cheapo hosting plans.

The site in question actually runs really fast as well (approx 0.5s for each page to load), but if the site hasn’t been visited for a while, the initial load time (to browser render) is horrific – around 10 seconds! But then after that, the site is lightning quick. Including if a hard refresh is done. This usually happens if the site hasn’t been visited for about half an hour or longer.

The first answer may be – “Because of the cheap hosting”, but I’m not sure about this, like I say, the site runs lightning fast after initial load. I don’t really have any complaints about the hosting.

Perhaps I need to set up some kind of server-side caching? Again, I’m not sure it’s caching that’s the issue, seeing as after initial load the rest of the pages are quick, including the shop and cart pages.

Seems it kind of “Goes to sleep” after about half an hour, and once loaded in again, kind of “Wakes up”.

I have also tested it by disabling all plugins and reverting to the twenty twenty three theme, but I get the same results.

Could it be something to do with it being currently served from a subfolder?

First time I’ve encountered this anomaly.

Any ideas?

Edit – sorry, can’t share the url with you as it’s currently a private client site.

[ad_2]
1 Comment
  1. Perhaps your hosting does caching underneath, but is actually very slow or wrongly configured. Consider Cloudflare with a supporting cache plugin, like `WP Fastest Cache`, or `Super Page Cache for Cloudflare` by Optimole.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer