strange characters in wordpress website displayed for visitors [closed]

Let’s start with the output we got before the fix:

enter image description here

What happened here? My guess: a collision between the plugin W3 Total Cache and your web server LiteSpeed. I found a thread in a Drupal forum about a very similar (or the same) issue.

LiteSpeed seems not to send the appropriate HTTP headers for the compressed cache files W3TC stores. In its changelog for version 0.9.2.4 W3TC says:

Fixed LiteSpeed web server support

So the issue seems to be known, and an upgrade should fix it.

If the upgrade did not help …

  • Ask your web hoster. You pay for support, and nobody knows the internals better.
  • Or add …

    AddType application/x-gzip .gz .tgz
    AddEncoding x-gzip .gz .tgz
    

    … to your .htaccess to see if it helps.

  • Or turn gzip compression off in W3TC. That is the last option if all the other approaches fail.

To test the results, do not rely on browser output. All browsers use different workarounds for broken compression, you cannot work with that. Use a tool like GIDZipTest to see if everything is okay.

Leave a Comment