• I’ve been working to cleanup and optimize our WordPress site and noticed that after removing WP Rocket from my plugins list (We’re using SG Optimizer for our primary caching plugin), the homepage load time ballooned out to 10 seconds. After contacting the webhost, they ran an HTTP GET request against the site, which returned the following info:

    Antonia-Nikolova:~ antonianikolova$ curl -IX GET https://www.midstory.org
    HTTP/2 200
    server: nginx
    date: Thu, 07 Jul 2022 15:29:23 GMT
    content-type: text/html; charset=UTF-8
    vary: Accept-Encoding
    access-control-allow-origin: https://www.midstory.org
    set-cookie: PHPSESSID=5e46dc3d2372c4aa67bf732d8ea1177e; path=/
    expires: Thu, 19 Nov 1981 08:52:00 GMT
    cache-control: no-store, no-cache, must-revalidate
    pragma: no-cache
    x-cache-enabled: True
    link: <https://www.midstory.org/wp-json/>; rel="https://api.w.org/"
    link: <https://www.midstory.org/wp-json/wp/v2/pages/4766>; rel="alternate"; type="application/json"
    link: <https://www.midstory.org/>; rel=shortlink
    x-httpd-modphp: 1
    x-endurance-cache-level: 0
    x-nginx-cache: WordPress
    host-header: 6b7412fb82ca5edfd0917e3957f05d89
    x-proxy-cache: MISS
    x-proxy-cache-info: 0 NC:000000 UP:SKIP_CACHE_NO_CACHE

    They told me that this indicates that my homepage is not being cached, and later, I checked in the “Test URL Caching Status” section of the SG Optimizer plugin and confirmed that the homepage is not being cached. To troubleshoot this, I confirmed that the SG Optimizer plugin has no exceptions for caching made for the homepage. I also disabled all but the plugins for my theme (Newspaper) and confirmed that none of the other plugins I’m using are responsible. Are there any simple ways to determine what is preventing the front page from being cached? Is there a simple setting somewhere in WordPress that I’m just missing?

    • This topic was modified 2 years, 4 months ago by jdo300.
    • This topic was modified 2 years, 4 months ago by jdo300.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Check your .htaccess file for this:

    cache-control: no-store, no-cache, must-revalidate

    htaccess

    Also, I am sure SG support can help with this if you are unsure how to handle this.

    The rule(s) likely are left over from some plugin.

    Thread Starter jdo300

    (@jdo300)

    Thanks for the tip. I did check the .htaccess file and did not find anything like that line in it. I also posted on the SG Optimizer plugin forum for help but no reply yet so far.

    If you own the hosting account you should contact them at their site. When you procure their services, you also pay for support. If not, ask whoever does to do so.

    Thread Starter jdo300

    (@jdo300)

    Thank you for the feedback. I have followed up with my webhost and they are recommending that I speak with a WordPress dev to iron out the issue. But before I go that route, I’m hoping there is something I can do on my end to try and isolate the issue myself. I am the WordPress dev on my team so it would be good to know how to properly investigate and correct the issue myself.

    I can see the session cookie being applied when I check the applications tab of the developer console and I tried SSHing into the server to search for the name of the cookie to find out what php file could have generated it (so far, the only reference I found was in the main php.ini file) but I’m not sure what to do to isolate the source. Would you have any thoughts or suggestions on what I can do? NOTE: I did try disabling all the plugins except for the ones related to my theme (Newspaper + TagDiv). But no obvious culprit found yet.

    For your concern about the php session, my guess is the sessions are used for UNPKG which I see loaded in your site or are part of your theme/or a plugin used by or included with it.

    WordPress Core does not use them.

    <link rel='dns-prefetch' href='//unpkg.com' />

    Did you develop the site? If not, you need to consult who did or find a developer who can take the amount of time that would be needed to study and solve your issue.

    That said, you should turn off all caching when running any tests.

    I would encourage you to clone the site so you have a development environment to further test. Then switch to a default theme, deactivate all plugins, and check the site for such issues.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Front page of my site is not being cached’ is closed to new replies.