Let me guess – when you’re logged in, your website loads just fine, but when you log out and reload your website, it looks like a wall of gibberish? That’s due to overlapping compression, most likely between your cPanel’s zlib compression and a compression plugin on your WordPress site.
How to fix this
You’ll be surprised how easy it is to fix this. Simply:
- Login to your WordPress admin
- Enter the settings page of whatever compression plugin you’re using (e.g. I’m using Swift)
- Disable GZip
Alternatively, you can disable the one in your cPanel:
- Login to cPanel
- Either:
- Enter the “Optimize Website” page
- Do not compress anything
OR - Enter the PHP Options
- Disable zlib_compression
Let me know if it works for you too. Alternatively if you have any other suggestions, feel free to add to comments!
Special thanks to Johnny Nguyen for the fix!