Why is my site so slow after installing SSL?

10,486

Check out https://www.webpagetest.org/result/180412_67_0e179d6dfd05c65eafcd1bba968d5028/

It shows it's taking almost 4.6 seconds to do the initial page load. If you dig in; Time to First Byte is 4.3 seconds. That's wordpress generating the page.

Wordpress is the problem there, not HTTPS. If you're not using a caching plugin. (w3cache, wpSuperCache, etc) that would be the first thing I'd try.

Share:
10,486

Related videos on Youtube

Michael Lynch
Author by

Michael Lynch

Updated on September 18, 2022

Comments

  • Michael Lynch
    Michael Lynch over 1 year

    I have a Wordpress site that performs fairly well locally. Most pages load in at around 1s. Some are even less at around 800-900ms.

    When I upload my site to my production server, a 2G RAM VPS on Digital Ocean, the load time goes up to about 1.6s, which isn't too crazy, but after I installed an SSL certificate, the loading time is now closer to 4-5s. That is a massive jump! The domain I'm using is:

    https://eightysix.ca

    I've minified all my assets and get a pretty decent score on page speed tests like Google PageSpeed, Pingdom and Gtmetrix, but the overall server response time has ballooned.

    At first I tried using a paid SSL from GoDaddy but after seeing how slow it was, I tried installing a certificate from Let's Encrypt, which seems to be marginally better but still very slow.

    I understand https will always be a little slower than http, but there shouldn't be this big of a difference. What causes the lag? Is there anything in my theme that I should be looking for? I'm using a lot of cURL requests to render SVG icons in PHP. Could this be the problem? Any suggestions would be greatly appreciated.

    Update

    After hearing from a few of you and reading up on it a little more, I've been given the impression that this kind of load time is to be expected when you're using HTTPS with Wordpress and no cache plugin.

    I've had terrible experiences with cache plugins in the past - not being able to turn them off in development - and so I was resisting using one, but I've since caved and installed WP Super Cache. I know this doesn't explain my issue, but it may have solved it. After a few page loads, the site is now loading quite fast.

  • Michael Lynch
    Michael Lynch about 6 years
    Wordpress is not really the problem. The default theme loads much faster, though it's much lighter to begin with. My theme is using Wordpress actions and Twig to render templates. Could that be part of the problem?
  • txyoji
    txyoji about 6 years
    If you tried another theme and it changed the results then you've narrowed it down. If at all possible, add a server-side caching layer on top of that ( wp cache plugin of some flavor ) so wordpress doesn't have to render the page on every page load.
  • txyoji
    txyoji about 6 years
    Also noticed that wordpress is sending cache control headers. (pragma no-cache) That will force all content to be re-loaded on every request. wordpress.stackexchange.com/questions/167128/…