Hi, I have a blog hosted on an always-free Oracle cloud ARM VM (previously it was hosted on my NAS and I was facing the same issue as I’ll describe).
I am using the wordpress:latest image together with mariadb. I’ve now also set up redis. All is working well.
I have a page with about 30 blog posts with a few images for each entry. The plugins I’m using are: Akismet Anti-Spam, Category Order and Taxonomy Terms Order, Easy Video Player, Jetpack, Ocean Extra, OSM, Post Order By Category, Redis Object Cache, Two Factor Authentication, Ultimate Category Excluder, WP Strava, WPS Hide Login.
My issue is that the page takes a good 10-15 seconds to start displaying anything. Then if I load the page from another browser/device in the following few minutes, things will be alright, but a few hours later it will go back to taking 15 seconds before displaying anything. Using Redis hasn’t helped the situation. I’m not see anything in the docker logs.
Where should I look for logs to get an idea on what’s causing this delay?
Is the web server slow to return static file requests (txt file, css file etc)? If so, this isn’t a wordpress problem, talk to your host.
If static files are fast, then it’s an issue in your application stack – php, mysql, etc.
Create a .php file in webroot, drop in [phpinfo()](https://www.php.net/manual/en/function.phpinfo.php) and load that file in a browser- this will instantiate php but not hit your database. If this is slow PHP is your problem (or one of your problems).
If phpinfo is fast, then it’s likely a database issue. try this plugin-
If it’s a free VM, it might not have the best resources. I would use cloudflare or another CDN on top to cut down on the response
To diagnose where the slowdown is, I would do a waterfall test first to make sure it’s not a rendering issue then if the majority is in server response, I would use something like Query monitor to see what plugins/calls are using the most resources
“My issue is that the page takes a good 10-15 seconds to start displaying anything. Then if I load the page from another browser/device in the following few minutes, things will be alright, but a few hours later it will go back to taking 15 seconds before displaying anything.”
Yeah I’m having the same problem.
If it was a PHP or WordPress problem, one would have thought it would be consistently slow to load, but it’s as if the server “sleeps” after a few hours and then the initial load is really slow again, right?
This happens on a site I’m building. Once the initial load is in, the rest of the site is really quick. And this is before using a cache plugin.
First things first:
Go to [GTMetrix.com](https://GTMetrix.com), run a test on your blog, and then check the “waterfall” tab in the search results. This will tell you which parts of the site are taking the longest to load.
There are inexpensive gigs on Fiverr that will help you with this.
It’s probably not the host. I have a bunch of sites hosted on a Oracle Arm container. How many cups did you assign the container? Mine has all 4 allotted to it and 24G of ram. How is the hosting environment set up? What control panel if any are you using?