Support » Plugin: WP Super Cache » WP Super Cache .htaccess section is empty, download.gz is served

  • Resolved qaws

    (@qaws)


    I recently deactivated and then reactivated WP Super Cache. Now, whenever I access any page on my site by URL, it downloads a “download.gz” file instead of serving me the page.

    I checked in my .htaccess file and for WP Super Cache it has the following:

    # BEGIN WPSuperCache
    # END WPSuperCache

    I’m pretty sure it used to have lots more stuff in it than that.

    I have some code in my .htaccess file which does the gz compression (it’s been there for 2 years with no issue), and the compression option in WP Super Cache is disabled.

    I’ve removed the code from my .htaccess and enabled compression in WP Super Cache. This has fixed it for all pages I’ve accessed except for the homepage, which still gives a download.gz. If I disable compression in WP Super Cache and delete the cache, I still get a download.gz for my homepage, which is odd because now there’s no compression active on the site either through .htaccess or WP Super Cache. If it’s in my browser cache, I can’t Ctrl-F5 to force a server refresh because accessing the URL downloads the file.

    My Google Adwords have also been deactivated by Google because accessing my homepage URL downloads the file, which they class as “invalid link” and have deactivated my campaign.

    I’ve deactivated then deleted WP Super Cache, then installed and activated again. I started the cache preload but nothing happened – it usually tells me what post count it’s currently caching. So I cancelled the preload, and it said it’s currently generating posts 100-200 so will take a few minutes to stop. 15 minutes later, if I refresh the page it says it’s still generating 100-200, but if I access the list of cached pages, it’s empty. Using a cron manager I’ve confirmed the preload hook is not running, does this mean the preload is not running? I’m unable to manually restart the preload because when I refersh the Preload page, the only option I have is “cancel preload” because it’s still doing posts 100-200.

    I will need to do the gzip through my htaccess because I also serve json from my site and WP Super Cache doesn’t compress this.

    Questions:
    1. Why is my .htaccess empty for the WP Super Cache section?
    2. Why is my homepage serving a download.gz file?
    3. How do I restart the preload?

    • This topic was modified 3 years, 1 month ago by qaws.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Saša

    (@stodorovic)

    Hi @qaws,

    It’s possible that compression is already activated by your hosting. In this case, “double compression” is possible and side effect could be that browser can’t decode content. You should enable “Expert mode” after activation because default is “Simple mode” which doesn’t use mod_rewrite (.htaccess doesn’t contain WPSC rules as in your case).
    You should try to delete entire cache directory (via FTP if it’s possible) and disable compression. Then you should test compression (you can find more details in other posts) and see is server already doing compression.
    Try to manually run cron (put in browser website/wp-cron.php and refresh this URL few times at some intervals). When preload is stopped (in dashboard) then you could start it again.

    Thread Starter qaws

    (@qaws)

    Compression is not activated by my hosting.

    If I try to load my homepage now, it is successful, so I guess I just had to wait an hour or so for something to make it start working again.

    Interestingly, the preload cache is now at posts 400-500, after 4 hours, so it obviously hasn’t processed the previous cancel requests.

    Thread Starter qaws

    (@qaws)

    Setting WP Super Cache to Advanced mode and hitting the “Update Rewrite Rules” button has repopulated my .htaccess file with the WPSC rules.

    Sometime between me raising this question and now, the issue has fixed itself and I no longer get a download.gz file served when I access my homepage. I’m still not sure what caused it, because when I tried yesterday (before I updated the rewrite rules), it started working correctly again and served my homepage after I started preloading the cache again. One of my other pages still had the issue, but that seems fixed now too.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP Super Cache .htaccess section is empty, download.gz is served’ is closed to new replies.