wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Compatibility with Plesk

Open arunbasillal opened this issue 6 years ago • 20 comments

Opening an issue so that we can learn and explore how we can be auto-compatible with Plesk.

What we know so far:

  • $_GET is 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

arunbasillal avatar Feb 01 '19 05:02 arunbasillal

Could you share here the improvement that needs to be done in plesk to test? Thanks @arunbasillal

Camilo517 avatar Feb 08 '19 11:02 Camilo517

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.

movergan avatar Oct 21 '19 13:10 movergan

@arunbasillal Do you know how to replicate the issue?

GeekPress avatar May 15 '20 12:05 GeekPress

@GeekPress Hello, can you share the improvement that needs to be made in plesk to see the problem? so I can help

Camilo517 avatar May 15 '20 14:05 Camilo517

@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 ;)

GeekPress avatar May 15 '20 15:05 GeekPress

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;
}

webtrainingwheels avatar May 15 '20 15:05 webtrainingwheels

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 Screenshot_4 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 avatar May 16 '20 00:05 Camilo517

@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.

webtrainingwheels avatar May 17 '20 00:05 webtrainingwheels

@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 $_GET contained the path of the url.
  • For example, if the url was domain.com/sample-page/ the $_GET array 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?

arunbasillal avatar Jun 11 '20 15:06 arunbasillal

Have you tried in plesk obsidian?

Camilo517 avatar Jun 11 '20 15:06 Camilo517

@wp-media/qa Could you plan a test to be able to reproduce the issue? Do we have a test account on Plesk?

GeekPress avatar Jun 26 '20 10:06 GeekPress

related: https://secure.helpscout.net/conversation/1258616326/188413?folderId=3864740

NataliaDrause avatar Sep 02 '20 12:09 NataliaDrause

Related ticket: https://secure.helpscout.net/conversation/1271451821/191700?folderId=2135277

vmanthos avatar Sep 04 '20 12:09 vmanthos

Related ticket: https://secure.helpscout.net/conversation/1306610438/201629

vmanthos avatar Oct 12 '20 08:10 vmanthos

Related: https://secure.helpscout.net/conversation/1334513895/210829/

NataliaDrause avatar Nov 16 '20 10:11 NataliaDrause

Can I help with this? I can give you access to a website with Plesk if you need it

Camilo517 avatar Jan 11 '21 12:01 Camilo517

Looks like related: https://secure.helpscout.net/conversation/1392306436/230194?folderId=3864740

NataliaDrause avatar Jan 13 '21 10:01 NataliaDrause

New issue https://secure.helpscout.net/conversation/1665530712/301926/ (NGINX, not Plesk)

camilamadronero-zz avatar Oct 28 '21 20:10 camilamadronero-zz

Related ticket: https://secure.helpscout.net/conversation/1780475154/324697?folderId=2135277

vmanthos avatar Feb 08 '22 10:02 vmanthos

Possibly related: https://secure.helpscout.net/conversation/1949978825/356080

joejoe04 avatar Jul 15 '22 18:07 joejoe04

Related https://secure.helpscout.net/conversation/2015904468/370037/

camilamadronero-zz avatar Oct 03 '22 16:10 camilamadronero-zz