Initial load of website(s) slow, appears to be PHP, what can I do? [on hold]

I have noticed that PHP based websites I have (running Joomla, Grav CMS, WordPress) tend to be slow on initial request of the site, but then seems to warm-up and runs fine for the page requests afterwards. However if no traffic for maybe a few hours to a day, the slow initial response time problem comes back.

Feels like to me that the hosting company Dreamhost (shared hosting plan) are putting PHP based sites with low / no consistent traffic in a sleeping state or on the back shelf when not used, so get slower initial responses when a request is made.

To back up this hypothesis, I test 3 sites that all had no traffic for over 24 hours and all under the same account with the following results;

  1. HTML static files – response time is fine.
  2. Joomla (PHP & MySQLi) – initial response time bad, then gets better with further page requests.
  3. Grav (PHP & flat file system) – initial response time bad, then gets better with further page requests.

As stated, if no traffic for a while, both PHP based systems above have low initial response times again.

Given that Grav doesn’t use MySQL, but Joomla, Grav and WordPress do use PHP, PHP must be what’s causing the problem, or rather the configuration / throttling / or whatever.

Is there any further tests I can try to pinpoint this problem or prove this problem, or any suggestions on what to do next?