[Resolved] WPML cookie configuration is blocking server caching
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with the dynamic cache not working on their Siteground hosted site. Siteground support identified the
PHPSESSID
cookie and
pragma: no-cache
header as potential causes of the problem.
Solution: We have confirmed that WPML does not create PHP sessions. The code in question from WPML is designed to exclude the
PHPSESSID
cookie from a request, not to generate it. We recommend that the client collaborates with Siteground to determine where the cookie is actually being created, as it might be due to a third-party plugin. Additionally, we suggest deactivating all plugins except for WPML, possibly in a staging environment, to test if the issue persists. This could help narrow down the cause of the problem.
If this solution does not seem relevant or if the problem persists, please do not hesitate to open a new support ticket with us.
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.
The dynamic cache is not working on the client's site hosted on Siteground. Siteground support provided information identifying the PHPSESSID cookie and pragma: no-cache header as causing the issue.
Our development team requested access to a staging version of your website. If you don't have any, please allow me to log in to your live site and make a copy using the Duplicator or All In One WP Migration plugins to analyze it locally.
You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.
IMPORTANT
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
Thank you for sharing. I escalated your issue to our development team, so they can look for a permanent solution to your issue. That usually takes a few days, I'll keep you posted.
I got feedback from our developers. WPML does not use PHP sessions. The function Siteground support pointed to is here wp-content\plugins\sitepress-multilingual-cms\classes\REST\Status.php
Here WPML is only excluding the PHPSESSID cookie from a request, not creating it.
Can you get more details with Siteground to see exactly where the cookie is being created? We suspect this might be caused by another 3rd party plugin.
Also, if you could deactivate all plugins (maybe in a staging environment) except for WPML and test the Cookies again, we could narrow down the possible causes.
Thank you for your response I have shared all info you have provided with team of experts because so far, I did not solve the problem. You may close this ticket for now and if I have something new I will communicate again. Please make sure that everything you may have regarding my site is deleted.
All the data was shared privately, so it won't be available once the thread is closed. Thank you for getting in touch with us, and please don't hesitate to open a new ticket whenever necessary. 🙂
Best regards,
Lucas Vidal
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.