WP Super Cache giving “headers already sent” error
-
I’ve been trying to implement gzip compression and minify on my site because Google said it was running too slow.
So I installed Super Cache, but ever since I activated it, I get an error message at the top.
Now, the site loads fine, but the error message loads first directly at the top, above the rest of the content. It’s rather unsightly, and I doubt Super Cache is working.
This is the error message:
Warning: Cannot modify header information – headers already sent by (output started at /home/*****/public_html/url.com/index.php:1) in /home/*****/public_html/url.com/blog/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 74
So it says something is conflicting with line 74 of wp-cache-phase2.php. This is what’s on line 74:
header(‘Vary: Cookie’);
To provide some context, this is the condition that contains that command:
if($wp_cache_gzip_encoding)
header(‘Vary: Accept-Encoding, Cookie’);
else
header(‘Vary: Cookie’);Does anyone know how to get rid of this error message, implement gzip compression AND minify onto my site? If so, I would be eternally grateful.
- The topic ‘WP Super Cache giving “headers already sent” error’ is closed to new replies.