WP Rocket - Best WordPress Caching Plugin

WP Rocket - Best WordPress Caching Plugin v3.18.3

No permission to download

nctx

New member
May 2, 2022
25
3
3
Anyone else here has the problem that the TTFB is extremely slow? Even after implementing the changes to the files from the last page.
 

ariel

Active member
Jul 23, 2020
102
33
28
Nothing to see here!
Hi guys

I have problems with the new Wp Rocket on the smartphone.
The menu won't pop up when I enable "Remove unused CSS".

But if I enable the "extra cache for mobile devices" function, everything works great. Should I always have extra cache created for my mobile display? Can it hurt to somehow affect CWV? I don't see any problems at least.
 

DCDev

Active member
Apr 14, 2021
108
101
43
Hi guys

I have problems with the new Wp Rocket on the smartphone.
The menu won't pop up when I enable "Remove unused CSS".

But if I enable the "extra cache for mobile devices" function, everything works great. Should I always have extra cache created for my mobile display? Can it hurt to somehow affect CWV? I don't see any problems at least.
The mobile cache is supposed to be used if your site has a different build for mobile that is separate to your main site . If your website is responsive and mobile-friendly, then you don't need this turned on

Remember that using "Removed unused CSS" can break custom CSS or 3rd party css if it relies on media queries or JS that change how the page/tool is generated on different media screens. Or just in general.

Both mobile cache and unused css is turned off for me based on how they handle how the site is built. Cool features but with one being a beta feature I wouldn't rely on them.

You might also find your page speed isn't any different. Sometimes these add bloat as they inject CSS /JS on each page to save on loading in the files.
 
  • Like
Reactions: GadaG and ariel

ariel

Active member
Jul 23, 2020
102
33
28
Nothing to see here!
The mobile cache is supposed to be used if your site has a different build for mobile that is separate to your main site . If your website is responsive and mobile-friendly, then you don't need this turned on

Remember that using "Removed unused CSS" can break custom CSS or 3rd party css if it relies on media queries or JS that change how the page/tool is generated on different media screens. Or just in general.

Both mobile cache and unused css is turned off for me based on how they handle how the site is built. Cool features but with one being a beta feature I wouldn't rely on them.

You might also find your page speed isn't any different. Sometimes these add bloat as they inject CSS /JS on each page to save on loading in the files.
Thank you for the detailed answer.

I use generatepress. The funny thing is that I have another site with 1:1 the same settings and there everything works as usual.

You can omit class, id or styles in the "Remove Unused css" function. I have tried this but somehow no attention is paid to the generatepress theme.
 

GadaG

Active member
Mar 19, 2021
399
194
43
The mobile cache is supposed to be used if your site has a different build for mobile that is separate to your main site . If your website is responsive and mobile-friendly, then you don't need this turned on

Remember that using "Removed unused CSS" can break custom CSS or 3rd party css if it relies on media queries or JS that change how the page/tool is generated on different media screens. Or just in general.

Both mobile cache and unused css is turned off for me based on how they handle how the site is built. Cool features but with one being a beta feature I wouldn't rely on them.

You might also find your page speed isn't any different. Sometimes these add bloat as they inject CSS /JS on each page to save on loading in the files.
that's right i also got he trouble when i activated this (my post could'nt be clicked) but when it's turned off, it's back to normal
 
  • Like
Reactions: ariel

DCDev

Active member
Apr 14, 2021
108
101
43
Thank you for the detailed answer.

I use generatepress. The funny thing is that I have another site with 1:1 the same settings and there everything works as usual.

You can omit class, id or styles in the "Remove Unused css" function. I have tried this but somehow no attention is paid to the generatepress theme.
You're welcome. Odd to say you have the exact same setup but one works over the other. The only answer to this that I can think of is browser caching. Maybe you are seeing it working because the browser still has old CSS cached. Clear/reset your browser cache. Check in Incognito mode, or use a phone that isn't on the same network you are viewing the site on.

This is guess work but can only assume it is this if all your plugins, generatepress setup is identical.

Try to omit class's and ID's that are affected on one site over the other and replicate it.

Let me know how you go, Hopefully you figure out why both are different.
 

DCDev

Active member
Apr 14, 2021
108
101
43
that's right i also got he trouble when i activated this (my post could'nt be clicked) but when it's turned off, it's back to normal
It's a nice feature but find it is still in Beta mode, or that it works really well if your site isn't heavily reliant on 3rd party plugins. Depending on that plugin sometimes it can break a function it relies on.
 

GadaG

Active member
Mar 19, 2021
399
194
43
Chace option is not beta test, the beta test is CSS option
It's a nice feature but find it is still in Beta mode, or that it works really well if your site isn't heavily reliant on 3rd party plugins. Depending on that plugin sometimes it can break a function it relies on.
 
  • Like
Reactions: DCDev

ariel

Active member
Jul 23, 2020
102
33
28
Nothing to see here!
You're welcome. Odd to say you have the exact same setup but one works over the other. The only answer to this that I can think of is browser caching. Maybe you are seeing it working because the browser still has old CSS cached. Clear/reset your browser cache. Check in Incognito mode, or use a phone that isn't on the same network you are viewing the site on.

This is guess work but can only assume it is this if all your plugins, generatepress setup is identical.

Try to omit class's and ID's that are affected on one site over the other and replicate it.

Let me know how you go, Hopefully you figure out why both are different.
That's what I thought at first.

At this point I have to mention that the problem only occurs with the mobile view on my smartphone.

I have done all these steps before and tested like crazy. So that can't be it.

It must be somehow related to the processing of Wp-Rocket. Soon comes the new update from the plugin, then I hope everything will be fixed :)
 

andmanx

Member
May 2, 2022
53
41
18
While this has been discussed before, it's not actually the solution but more of fooling thy self. The real issue isn't about looking nice on dashboard; I discovered if not properly null, the UserClient() kept calling to API for verification with return of 404 response on each load. SO, I just add the code below:


delete_transient('rocket_check_key_errors'); $consumer_data = [ 'consumer_key' => '********', 'consumer_email' => '[email protected]', 'secret_key' => hash('crc32', '[email protected]'), ]; update_option('wp_rocket_settings', array_merge(get_option('wp_rocket_settings', [] ), $consumer_data)); add_filter('pre_http_request', function($pre, $parsed_args, $url) { if (strpos($url, 'https://wp-rocket.me/valid_key.php') !== false) { return [ 'response' => [ 'code' => 200, 'message' => 'ОК' ], 'body' => json_encode([ 'success' => true, 'data' => $consumer_data ]) ]; } else if (strpos($url, 'https://wp-rocket.me/stat/1.0/wp-rocket/user.php') !== false) { return [ 'response' => ['code' => 200, 'message' => 'ОК'], 'body' => json_encode([ 'licence_account' => '-1', 'licence_expiration' => 1893456000, ]) ]; } else { return $pre; } }, 10, 3);

in wp-rocket.php main plugin file right below #line 21 which reads 'defined( 'ABSPATH' ) || exit;' and above '// Rocket defines.'

It uses transient for checking key almost everywhere, so just delete it and feed what it wants to get before the plugin starts.
step 1: insert code
delete_transient( 'rocket_check_key_errors' );

$consumer_data = [
'consumer_key' => '********',
'consumer_email' => '[email protected]',
'secret_key' => hash( 'crc32', '[email protected]' ),
];

update_option( 'wp_rocket_settings', array_merge( get_option( 'wp_rocket_settings', [] ), $consumer_data ) );

add_filter( 'pre_http_request', function( $pre, $parsed_args, $url ) {
if ( strpos( $url, 'https://wp-rocket.me/valid_key.php' ) !== false ) {
return [
'response' => [ 'code' => 200, 'message' => 'OK' ],
'body' => json_encode( [
'success' => true,
'data' => $consumer_data,
] )
];
} else if ( strpos( $url, 'https://wp-rocket.me/stat/1.0/wp-rocket/user.php' ) !== false ) {
return [
'response' => [ 'code' => 200, 'message' => 'OK' ],
'body' => json_encode( [
'licence_account' => '-1',
] )
];
} else {
return $pre;
}
}, 10, 3 );

step 2: wp-rocket\inc\Engine\Admin\Settings\Page.php
find and edit
---------------------------------------------------------
public function customer_data() {
$user = $this->user_client->get_user_data();
$data = [
'license_type' => __( 'Infinite', 'rocket' ),
'license_expiration' => __( 'Lifetime', 'rocket' ),
'license_class' => 'wpr-isValid',
];
step 3:/wp-rocket/inc/functions/options.php
find and edit
---------------------------------------------------------
function rocket_valid_key() {
return true;
}

It's perfect

View hidden content is available for registered users!
 

DCDev

Active member
Apr 14, 2021
108
101
43

*** Hidden text: cannot be quoted. ***
We need a better solution for this plugin. It looks like we are manually nulling it but not sure if the attached is already in a condition that people are suggesting through the post. I would touch base with @bobsmith and @Tomz. Or even @NullMaster to see what they think is best for this plugin.
 
  • Like
Reactions: ariel

8bitMario

New member
May 25, 2022
1
0
1
Some days ago, I saw that someone shared a, Best configuration settings(import file) to get a 90+ score. Cant find it now. Does anyone have that import file?
 

ariel

Active member
Jul 23, 2020
102
33
28
Nothing to see here!
Some days ago, I saw that someone shared a, Best configuration settings(import file) to get a 90+ score. Cant find it now. Does anyone have that import file?
Wp-Rocket accounts for maybe only 40% of site speed for me.
The combination of theme and formatting of images are more important.

Just turn on minify css, async css + and the last two settings on JS (no minimize JS files).
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu