• Resolved hungvuviet

    (@hungvuviet)


    Is there any document for setting Worker mode? Currently it works with page rule but if I type the domain to address bar (hence, no swcfpc=1 parameter) then when I click to an internal link, it shows unloggedin page (I don’t know if there is a solution for this issue). So I’d like to try Worker mode.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    If you check the FAQ section of the plugin description page here: https://wordpress.org/plugins/wp-cloudflare-page-cache/#faq or the FAQ tab inside the plugin settings – it is clearly mentioned that the ?swcfpc=1 is a cache buster which is only shown to the loggedin users and normal users will not see it. This is needed when using the page rule mode.

    If you do not like the cache buster query parameter, inside the plugin settings under the Cache tab enable the worker mode. This will remove the page rule the plugin created and instead handle the cache behaviour via Cloudflare worker which does not require the cache buster query parameter.

    Thread Starter hungvuviet

    (@hungvuviet)

    Yeah, I understand the cache buster logic. Only the inconvenience is that when loggedin user come back to the page by typing the domain or by the bookmark link, they need to re-login. The remembered session not work anymore. I hope we have solution for that with page rule mode.

    For worker mode, when enabling I see the section Bypass cache for the following cookies – Do I need to do any action here?

    Plugin Contributor iSaumya

    (@isaumya)

    If your site has logic where normal users cal also login, you should use the worker mode.

    For worker mode, when enabling I see the section Bypass cache for the following cookies – Do I need to do any action here?

    – No. you can keep that section blank. That section is only for the cookie names (if you want to add) which are notly already covered by the worker code by default.

    In 99.99% cases that field will remain blank.

    Thread Starter hungvuviet

    (@hungvuviet)

    @isaumya thanks, I turn on worker mode. It works for a while then my site down. I need to delete the plugin to recover. It’s thrilling. I may need to test it on staging carefully first. Maybe there are some conflicts. I will update this thread when I have something new or you can close it.

    Thread Starter hungvuviet

    (@hungvuviet)

    But I wonder when I delete the plugin like that, the cloudflare configs still there. How should I clean them? Reinstall plugin to clean?

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @hungvuviet,
    is not supposed to make your site down. Maybe you have exhausted the free worker limit for that day which caused it. Look into your worker usage to see what happened. Cause the worker code didn’t do it – I am sure of that.

    In terms of deleting the plugin, you need go to the wp admin > plugin section > from there you need to deactivate and delete the plugin. This will invoke the necessary code to also remove the worker and the leftover stuff in the database.

    But if you delete the plugin via FTP or SSH, the plugin won’t be able to do it’s job.

    P.S.: Take a look at the worker limit and pricing here: https://workers.cloudflare.com/#plans

    Thread Starter hungvuviet

    (@hungvuviet)

    After some research, I down PHP version from 8.0 to 7.4 and reactive the plugin. Everything works well. Thank for your support!

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @hungvuviet,
    I am not sure why that is the case, but I personally use the plugin in PHP 8.0 and 8.1 without any issues. So, not sure what issues you faced with PHP 8.0.
    Did you found something in the PHP error log?

    Thread Starter hungvuviet

    (@hungvuviet)

    yes, I turn on debug and see this warning: mysqli_real_connect(): Headers and client library minor version mismatch. Headers:100038 Library:50564 (line 1756, wp-includes/wp-db.php). This log come from mismatch between database version and PHP version. So I downgrade PHP. I’m not really sure the reason the site down. It just happened after I switched to worker mode a while. Maybe just an accident. As you use the plugin normally with PHP 8.0, I think you have your a good database version that works well with PHP 8.0. My case’s just the problem between PHP and Mysql.

    Plugin Contributor iSaumya

    (@isaumya)

    Not sure. Might be because wrong setup of PHP 8 or you are using an old version of WordPress core. Hard to say, but haven’t faced any such issues on any of my sites running PHP 8.

    Thread Starter hungvuviet

    (@hungvuviet)

    Close this thread. Thank you, @isaumya!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Worker mode document’ is closed to new replies.