Support » Plugin: WP Fastest Cache » High TTFB Multilingual site

  • Hi there,

    Love your plugin. Using WP Fastest Cache + preload + custom cronjobs + Autoptimize. This setup has significantly increased the speed of my websites. A truly stable and consistent solution.

    However, while deploying the setup on some of my multilingual websites (using Polylang), I encountered a significant increase in TTFB. 600-800ms additional waiting time measured by GTmetrix etc.

    I investigated this further and found the solution/issue within the HTaccess code created by WP Fastest Cache. More specifically, these lines:

    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f [or]
    RewriteCond /home/volt/public_html/wp-content/cache/all/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/all/$1/index.html" [L]

    I checked the support topics, your website and many forum posts, and found out that using Polylang means that WP Fastest Cache creates a multisite setup. The cached files are now located in cache/www.domain.com/all/…

    When changing the htaccess code to correspond the exact location of the cached files, the TTFB reduced back to normal, 400-600ms instead of 1000-1200ms.

    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/www.domain.com/all/$1/index.html -f [or]
    RewriteCond /home/volt/public_html/wp-content/cache/www.domain.com/all/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/www.domain.com/all/$1/index.html" [L]

    My questions:

    Is this a known or new issue?
    Is the fix above a good solution to the issue?
    Does a future update of WP Fastest Cache erase custom changes to the htaccess code?
    And can this issue be permanently fixed in an upcoming release?

    Thanks in advance!

    Mathias

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Emre Vona

    (@emrevona)

    probably the pages are not served via cache. the problem could be this.
    by the way, I see that cache does not work in your site now. did you disable wp fastest cache?

    Thread Starter mcoom

    (@mcoom)

    Hi Emre,

    Thanks for the quick reply!

    Did you visit teamvolt.be ?

    The cache setup is working fine. Caching is on, pages are cached (example in homepage code this moment: WP Fastest Cache file was created in 1.9354841709137 seconds, on 10-12-21 3:46:09). I also double checked via FTP, all pages are cached.

    Problem is (I think), that the cache is built in a new multisite folder cache/www.teamvolt.be/all/… and htaccess still points to the default cache/all/… directory.

    As stated in the first post, I fixed the high TTFB by editing the paths in the htaccess code. (the fix is not live on the site at the moment, as I would like your advise)

    Any thoughts on this?

    Thanks in advance!

    Mathias

    • This reply was modified 5 months, 2 weeks ago by mcoom.
    • This reply was modified 5 months, 2 weeks ago by mcoom.
    Plugin Author Emre Vona

    (@emrevona)

    ow sorry. wp fastest cache works now.
    are you using the WPML plugin for Multilingual site setup?

    Thread Starter mcoom

    (@mcoom)

    Thanks. I’m using Polylang.

    Plugin Author Emre Vona

    (@emrevona)

    but if the Polylang is used, the rules are set as /wp-content/cache/www.domain.com/all/$1/index.html

    https://plugins.trac.wordpress.org/browser/wp-fastest-cache/trunk/wpFastestCache.php#L1007

    Thread Starter mcoom

    (@mcoom)

    Hi Emre,

    Great to hear this is included in the plugin! But it seems this rule is not working unfortunately.

    I quickly tested it again on another site: http://www.matico.be (testing site), installing Polylang and installing WP Fastest Cache, checking the htaccess file. But it always seems to generate the default paths, no inclusion of /www.matico.be/ , no matter what I do:

    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f [or]
    RewriteCond /home/matico/public_html/wp-content/cache/all/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/all/$1/index.html" [L]

    I disabled all plugins, themes etc, same result.

    Thanks you for helping!

    Mathias

    Plugin Author Emre Vona

    (@emrevona)

    please contact me via email: https://www.wpfastestcache.com/contact-us/

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.