Fix For Weird Characters Displaying On Your Web Page

Do you see strange characters displayed on your site like the image below?

Character salad

If so, it could be related to one of these possible causes:

A
the ob_gzhandler() function
B
GZIP plugins such as Check and Enable GZIP Compression, Force GZIP or others
C
Specific themes' features/settings or other plugins that offer a caching feature ( Themify Page Builder for example)

NOTE: If you use Themify's Page Builder, make sure to disable its' caching option.

If you run a GZIP-related plugin on your site, deactivate it, then clear WP Rocket’s cache and see if the problem is resolved.

If you don’t use such a plugin, the solution would be to find and remove these lines anywhere in your active plugins or the theme:
ob_start( 'ob_gzhandler' )
-OR-
ob_end_flush()

Generally, either one of those lines would be added in your wp-config.php file, or in the header.php, footer.php, or functions.php of your active theme.

If you cannot find either one of them, you can try adding this snippet as a  custom MU plugin, or in your theme’s functions.php:

add_filter( 'rocket_force_gzip_htaccess_rules', '__return_false' );

After adding this snippet, deactivate and then reactivate WP Rocket once.