Browser downloads file when opening a page

Problem

When trying to visit pages on your website, instead of the page opening normally, you get a popup asking you to download a file. 

On Firefox it looks like this:

On Chrome, you will be prompted to open a file named: Download

Cause

We do not yet know the exact cause of the problem. We have seen this issue more often on LiteSpeed and OpenLiteSpeed servers than others.

The server seems to be setting the mime type of the GZIP-ed HTML cache file to application/octet-stream. This kind of file cannot be opened in a browser and therefore the download is prompted.

We have found that it is often related to a conflict with the htaccess rules.

Solution

The quick fix is to install this helper plugin which removes all the htaccess rules. WP Rocket will still function correctly.

📥   Download (.zip):  WP Rocket | Remove All .htaccess Rules
Developers: You can find the code for this plugin on GitHub.

If you want to isolate the specific block of rules causing the issue, you can use the process of elimination described here.

If this solution does not work for your site, it means the issue is related to how the server is configured to handle _gzip files. In this case you will have to contact your host to resolve it.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.