• Resolved raymond621

    (@raymond621)


    Hi Support

    Question about Guest Mode speeding up the site. I noticed the speed scores are much better with this option enabled. Problem is, it takes too long for my crawler to complete caching the entire site. I also have webp images enabled. This adds up to a total of 4 Cron jobs (2 Guests & 2 Guests Webp).

    I want to clarify what exactly is Guest Mode. Information from this link suggests that it only benefits if your wordpress/woocommerce site uses geo locate to serve different content for different users. For example, different language or currency. Majority of my users are not logged in users and I do not serve different content regardless if they are visitor from the past or logged in, does it matter if I use the Guest Mode option?

    https://blog.litespeedtech.com/2021/06/01/guest-mode-for-wordpress-in-lscwp-v4-0/

Viewing 15 replies - 46 through 60 (of 70 total)
  • I installed the lscwpwc_tester.php and it still couldn’t detect wordpress.

    We (you and me) are just testing if solution works, but as long this test isn’t successfull we don’t release a new tester file, so you downloaded a tester without this solution. ??

    Another try, please use this code instead and try again.

    <?php
    if (stripos(basename(__DIR__), "private_html") !== false) { 
        $lcDocRoot = str_replace(basename(__DIR__), '', __DIR__); 
        $_SERVER['DOCUMENT_ROOT'] = $lcDocRoot .'public_html';      
    }
    
    echo $_SERVER['DOCUMENT_ROOT'];

    Thread Starter raymond621

    (@raymond621)

    its showing this:

    /home/samplgpe/domains/sampledomain.com/private_html

    It seems DirectAdmin has a protection that prevents overriding global server variables. That means the test failed and we have no idea how to create a workaround for DirectAdmin.

    Could you do 1 last test, please?

    Try this code:

    <?php
    echo basename(__DIR__);
    Thread Starter raymond621

    (@raymond621)

    the new code now populates this, just one single text:

    public_html

    And this?

    echo $_SERVER['DOCUMENT_ROOT'];
    Thread Starter raymond621

    (@raymond621)

    add both codes together

    <?php
    echo basename(DIR);
    echo $_SERVER['DOCUMENT_ROOT'];

    public_html/home/samplgpe/domains/sampledomain.com/private_html

    —————————————-

    If I just add this code

    <?php
    echo $_SERVER['DOCUMENT_ROOT'];

    /home/samplgpe/domains/sampledomain.com/private_html

    If you use both code together a line break must be added:

    <?php 
    echo basename(DIR);
    echo "<br />";
    echo $_SERVER['DOCUMENT_ROOT'];

    ….Nevertheless DirectAdmin is strange, very strange… and we still need to add DirectAdmin to the exclude list.

    Thread Starter raymond621

    (@raymond621)

    im just curious if this has anything to do with directadmin? If I have cpanel installed, this would work already?

    WHAT? You have cPanel?! We have cPanel too, but cPanel doesn’t use private_html!

    Did you move from other host with DirectAdmin to a new host with cPanel?

    Thread Starter raymond621

    (@raymond621)

    no, I do not have cpanel.

    I was just wondering if it would work if I have cpanel. Cpanel does have additional cost from my vps plan.

    Again, cPanel doesn’t use private_html for https content like DirectAdmin. If $_SERVER[‘DOCUMENT_ROOT’] points to private_html directory instead of public_html there is something wrong if you say that you have cPanel. This actually only happens when transferring using the cPanel Transfer Tool from another host using DirectAdmin, but cPanel fixed this several years ago.

    If you don’t mind, could you ask your host provider why $_SERVER[‘DOCUMENT_ROOT’] points to the private_html directory?

    Are you using an outdated cPanel version?

    Could you please test this? ??

    <?php
    $lcDocRoot = str_replace(dirname($_SERVER["DOCUMENT_ROOT"]), '', $_SERVER["DOCUMENT_ROOT"]);
    $lcDocRoot = str_replace($lcDocRoot, '', $_SERVER["DOCUMENT_ROOT"]) . '/public_html';
    $_SERVER['DOCUMENT_ROOT'] = $lcDocRoot;
    echo $_SERVER['DOCUMENT_ROOT'];
    Thread Starter raymond621

    (@raymond621)

    it is showing as public_html now

    /home/samplegpe/domains/sampledomain.com/public_html

Viewing 15 replies - 46 through 60 (of 70 total)
  • The topic ‘Guest Mode Crawls too long’ is closed to new replies.