Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

No supporters are available to work today on this forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -
- 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Subash Chandra Poudel 1 year, 2 months ago.

Assisted by: Subash Chandra Poudel.

Author Posts
July 7, 2023 at 7:24 am #13964919

mikaelF-5

I have a problem with Cloudflare not being able to cache my site to reduce the # dynamic requests.

Apparantly it is both the hosting plugin and WPML plugin that block cache in the headers. We have tried to inactive the plugins on a test page and then the cloud flare cache works fine.

When loading the page with plugin WPML installed the Cache-control Response headers are set for no cache, if we disable the plugin the headers are OK (Cloudflare cache works). When these headers are present the cloudflare cache does not work so we need to prevent them from disabling the cache. How can we solve this?

July 8, 2023 at 10:04 am #13971173

Subash Chandra Poudel

Hello,

To provide you with the quickest and most accurate support, please provide your debug information. You can find it in WPML > Support > click on the "Debug information" link. For more information, you can visit this link: http://wpml.org/faq/provide-debug-information-faster-support/

As far as I know, WPML does not control the "Cache-Control" HTTP header. However, I conducted some tests on a test site with a cache plugin and WPML installed. From my observations, the site only sends the "Cache-Control" response header with the value "no-cache" when logged in as an admin. When testing the site while logged out, I did not see "no-cache" set for the "Cache-Control" header. This behavior seems to be normal and should not cause any cache issues.

Could you please check and verify, if the "no-cache" cache-control is set on your site when logged out or for normal users also? if that is the case then it might be an issue.

You mentioned that the issue is resolved when you deactivate WPML. Is my understanding correct? If you are testing this, please ensure that you load a few pages and allow the site to cool down and build its cache after deactivating WPML before verifying the results. Additionally, you mentioned that this issue is related to a "hosting plugin." Does it get resolved only when you deactivate both the hosting plugin and WPML, or does deactivating either one of them solve the problem?

If you need further assistance, I will need to examine your site in more detail. Could you please provide me with the URLs on your site where I can see the "Cache-Control" response header set to "no-cache"?

Regards,
Subash

July 11, 2023 at 5:54 am #14009981

mikaelF-5

Hi Subash

Thanks for your quick reply.

I attach the debug information here above.

This is happening for logged out users - the headers that are being set when WPML plugin is activated are:
no-store,no-cache,must-revalidate

Please see attached video, its from local test enviroment but is the same on live with logged out user (we can't disable on live enviroment because it would break the site).

1. WPML plugin is activated - we visit the page (logged out) and look at the response headers
no-store,no-cache,must-revalidate is set
2. WPML plugin is deactivated (with wp cli)
3. We visit and reload the page again - the headers no-store,no-cache,must-revalidate is not set in response headers

The URL of my site is hidden link and then you can see for example as per pictures URL hidden link

I hope this information helps to further investigate what the issue might be.

Thanks
//Mikael

konst-wpml-no-cache-2_2.jpg
konst-wpml-no-cache-2.jpg
July 13, 2023 at 6:46 am #14029263

mikaelF-5

Hi Subash, did you receive the debug information?

Brgds
Mikael

July 13, 2023 at 1:00 pm #14033323

Subash Chandra Poudel

Hi Mikael,

Thank you for the details.

First of all can you please try updating WPML plugins to the latest version from wp-admin -> Plugins -> Add New -> Commercial ( tab at the top ) and see if it helps? Also, if possible please try upgrading PHP to the new version 8.X and see if it helps.

On your live site yes, I see the header set to "max-age=0,no-cache,s-maxage=0" which I was not able to see on a test site so probably this is an issue only on your site and not with general WPML, due to some interference from third-party plugin/theme/code on your site.

I see you were testing on a local environment, is the issue on your site there even with normal setup without Cloudflare? If yes can you please test the following and see if it helps finding the cause of the issue:

- Deactivate all plugins except main WPML plugin on your test local site.
- Activate a default theme like twenty twenty three.
- Now see if the issue is still there or not.
- If not please activate original theme and plugins one at a time to see which one starts the issue.

If it still happens only with WPML plugin activate and a default theme we will need to troubleshoot the issue further. As explained in the document linked next will it be possible for you to provide a site copy for us to test it further?
https://wpml.org/faq/provide-supporters-copy-site/

I have enabled a private reply for you to share the details securely.

Regards,
Subash

The topic ‘[Closed] I have a problem with Cloudflare not being able to cache my site to reduce the # dynamic requests.’ is closed to new replies.