wp-rocket
wp-rocket copied to clipboard
Compatibility with Plesk
Opening an issue so that we can learn and explore how we can be auto-compatible with Plesk.
What we know so far:
$_GETis not empty even when there are no query strings.- Since pages with query strings are not cached, WP Rocket does not serve the cache.
- A minor config update in Plesk can fix this - available here: https://secure.helpscout.net/settings/saved-replies/26583/
HS tags: plesk, plesk onyx
Could you share here the improvement that needs to be done in plesk to test? Thanks @arunbasillal
Guys, could you please share clear steps to reproduce it on Plesk Server? Please specify: Plesk Version OS The website configuration (Apache/Nginx/php-version and mode) WordPress version Steps to verify that cache is not working (step by step guide with examples if possible) A trial key for the plugin.
I can try to take a look when I have a bit of free time.
@arunbasillal Do you know how to replicate the issue?
@GeekPress Hello, can you share the improvement that needs to be made in plesk to see the problem? so I can help
@GeekPress Hello, can you share the improvement that needs to be made in plesk to see the problem? so I can help
I personally have no idea ;)
This is what was reported to us by the customer:
We have Plesk Onyx installed on the server and it seems that there is a problem with their suggested nginx configuration file for wordpress. On their official website they suggest to put such code to nginx directives:
if (!-e $request_filename) {
set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
set $test "${test}C";
}
if ($test = PC) {
rewrite ^/(.*)$ /index.php?$1;
}
This code works (permalinks are OK) but it seems that it breaks the WP Rocket caching mechanism that You described. So, we used different directives from another source: https://gist.github.com/VirtuBox/a8781a7cf53a9a72447cac5acec11b1c
if (!-e $request_filename){
rewrite ^(.*)$ /index.php break;
}
This should be shown when using wp rocket + plesk, in my case it wasn't shown, in the google sitekit web if I see that it shows
I don't work with those directives either.
If you don't have plesk I can give you access to a panel for testing :)
@Camilo517 Are you referring to GZIP compression? That is unrelated to this Issue. Please open a support ticket if you need help with that (although it's probably not related to WPR, and more related to your Plesk config and you need to enable compression there). This thread is not to help with that particular issue. This Github issue is specific to when only the homepage is cached and no other pages are cached when using Plesk Onyx.
@arunbasillal Do you know how to replicate the issue?
@GeekPress These happened on customers who were on Plesk Onyx based on our ticket history. Only homepage was cached and the inner pages were not.
@movergan Hello Alex, thanks for your offer to take a look. Here is what we know so far and the cause.
- In all the cases that were reported, the global variable
$_GETcontained thepathof the url. - For example, if the url was
domain.com/sample-page/the$_GETarray will look like:
$_GET = Array
(
[sample-page/] =>
)
- WP Rocket by design does not cache pages with a query string. (example if the url is
domain.com/?query=1 - When the array isn't empty, this is exactly what it looks like to WP Rocket. And thus cache isn't served.
Do you know why the path is added to the $_GET variable on Plesk?
Have you tried in plesk obsidian?
@wp-media/qa Could you plan a test to be able to reproduce the issue? Do we have a test account on Plesk?
related: https://secure.helpscout.net/conversation/1258616326/188413?folderId=3864740
Related ticket: https://secure.helpscout.net/conversation/1271451821/191700?folderId=2135277
Related ticket: https://secure.helpscout.net/conversation/1306610438/201629
Related: https://secure.helpscout.net/conversation/1334513895/210829/
Can I help with this? I can give you access to a website with Plesk if you need it
Looks like related: https://secure.helpscout.net/conversation/1392306436/230194?folderId=3864740
New issue https://secure.helpscout.net/conversation/1665530712/301926/ (NGINX, not Plesk)
Related ticket: https://secure.helpscout.net/conversation/1780475154/324697?folderId=2135277
Possibly related: https://secure.helpscout.net/conversation/1949978825/356080
Related https://secure.helpscout.net/conversation/2015904468/370037/