0

Details and background

The site that I'm working on right now takes 2.8 to 4 minutes to load (this is the initial response from the server, the resource loading time is negligible) when not logged in. If I log in through the admin panel and view the site, it loads in about a second. When the site was initially set up, all pages loads were quick (logged in or not).

Checks and Tests Performed

  • Checked the DNS response time. It's very fast. This is an issue with the server, since the bottleneck is the long time between the request and the response.
  • Checked number of records. There are only 4 posts (all default content) and 20 comments (all spam, deleted them all with no change). Only 2 tables have more than 500 rows, postmeta at ~800, and icl_languages_translations at ~4000. None of these are excessive.
  • Checked for slow queries. There are a few, but the slowest run in seconds and don't account for the minutes of load time.
  • Increased the amount of RAM available to PHP with define('WP_MEMORY_LIMIT', '96M'); in wp-config.php. No change in loading time.
  • Updated all plugins. No change in loading time.
  • Disabled all plugins. No change in loading time.
  • Disabled all caching. No change in loading time.

    Figuring that since caching is disabled when logged in ("Don't cache queries for logged in users" is checked in W3 Total Cache settings), I disabled it to see if this was the deciding factor. It was not. I also enabled debugging for W3TC, and the total load time is ~0.02.

  • Changed themes. This corrects the long loading time and site takes only about a second to load with different themes.
  • Installed the same site locally on a virtual machine. Load time is about a second and a half. This is arguably slow for a site served off a local box, but orders of magnitude faster than the hosted site.

Thoughts and conclusions

It seems like the crux of the issue may lie in the theme. The theme is BERG by Yosoftware. Since I didn't set up the site myself, I don't have access to any login or license and thus cannot check for updates. I've reached out to Yosoftware in order to see if I may be eligible for updates but they have yet to reply (1 work day elapsed).

WooCommerce (used by the BERG theme) complains that "Your theme contains outdated copies of some WooCommerce template files.", but I'm not sure if this is affecting the load time.

Other noteworthy points:

  • Since the site load times were originally fine when it was initially set up, and there has not been any real data added since then, I wonder if this might be an incompatibility between the version of Wordpress, which has been automatically updated, and the version of the theme, which has not.

  • Since the site loads in a reasonable amount of time on my local machine, I can't help but blame the host (JustHost) for their part in this issue. Reaching out to their technical support proved a bit frustrating, since they basically only ran the built-in tests on their site that are already available to clients. Since they were able to show that the load time was fine using the default theme, they declined to accept any responsibility.

  • Since the site loads very quickly once logged in, I am wondering if there is some kind of quick fix or workaround for this.

Step 3... profit?!

Based on the 3 conclusions above, I have a laid out these options as potential next steps:

  • Try to fix this myself. I can install New Relic or some other profiling system and attempt to locate the issue and fix it.
  • Appeal to the developer. Just repurchase the theme and hope that there are updates and that these will resolve the issue, or that the support available to paying users will be enough to fix the issue.
  • Change the host. I can ditch the hosting provider and set this up on the Amazon Cloud and hope that it's fast enough to run smoothly without any other changes.
  • Invest more time in trying to figure out why the site is a lot faster when logged in than not. Maybe my Google-fu is not good enough, but I've had a hard time searching for this, so I feel like this option may turn into the first option, above ("try to fix myself using profiling")

What is the best course of action? Does anyone perhaps know why the site runs so fast when I'm logged in as an admin? Thanks in advance for any help. This is my first experience dealing with a Wordpress site, so I apologise if there is some obvious solution that I've missed.

  • 1
    Can you compare the requests from a logged in visit vs a logged out one and see what is different? Firebug will do this, or WireShark. Can you check the theme for remote request-- say a license validation request? – s_ha_dum Nov 26 '15 at 0:09
  • @s_ha_dum that might be an idea. It's definitely another angle of attack, but I suspect that it will lead me just as far down the rabbit hole as profiling will. I'm still holding out for some SOer to magically have the answer. – Code Bling Nov 26 '15 at 10:49
  • Were you able to figure this out? I'm currently facing the same issue. – user3183717 Sep 18 at 22:24
  • @user3183717 sort of? Switching themes seemed to solve the issue. The site was hosted by a 3rd party and I had limited access to the database or analytics, and was only doing this as a favour to a friend, so couldn't afford to spend a bunch of time on it. – Code Bling Sep 18 at 23:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.