[Solved] W3 Total Cache Error: FTP credentials don’t allow to write to file .htaccess

  • Reading time:2 mins read
  • Post last modified:January 19, 2021
  • Post author:
You are currently viewing [Solved] W3 Total Cache Error: FTP credentials don’t allow to write to file .htaccess

Cache functionality is essential for performance and SEO optimization. W3 Total Cache is my favorite plugin for caching and minifying needs. Thanks to their customizability and powerful options. In this article, we’re going to solve a W3 Total Cache error related to writing the .htaccess file.

This error is not an outcome of the W3 Total Cache plugin, albeit this is a consequence of a Security Plugin. For example, an iTheme Security plugin has the option to deny access to core files including .htaccess, upload directory. Which might hinder the operation of dynamic websites. Whereas static websites might feel comfortable with the utmost level of security by these security plugins. However, you can manage the plugin smartly to match your need.

W3 Total Cach error

At the first time, the error may look very terrible and that’s why some users might try to access manually to the .htaccess file. It’s very time-consuming. The roots of this error in the file permission. Normally, most WordPress files have 644 levels of permission. This means the file readable by the owner, group, and public, but writable only by the owner.

FileZilla-Changing File Permission

Here, you must change the file permission to 644. And what magic, after refreshing the page there no bad notification. Everything goes smoothly.

For this, you can use cPanel or FileZilla, or another FTP client. Following is the screenshot of FileZilla.

FileZilla File Permission

This Post Has 18 Comments

  1. Praveen

    This solved my W3 . htaccess issue!!!

  2. mir omar

    Thanks!!

  3. Hitesh Dobariya

    i changed as per your instruction.
    but error remains same

  4. Lucky Bhumkar

    Make Sure public_html directory has right permission (i.e. 750 or 755). Let me know whether it has solved or not.

  5. eraxe

    Nice work, worked one hand…

  6. Stephen

    Still getting this error, as my htaccess was already like this, the public_html is also 750 and writable. Any help would be great.

    1. Lucky Bhumkar

      Check spelling, file permission level and path of .htaccess

      1. asha

        hii lucky,
        how to i fixed don’t have permission to access this resource. Server unable to read htaccess file, denying access to be safe

      2. Lucky Bhumkar

        Hi Asha,

        • It simply means the folder containing .htaccess has not a sufficient permission (i.e. 755) or
        • The .htaccess file missing an adequate permission (i.e. 644).

        You can try check permission level through Control Panel > File Manager or FTP Client (i.e. FileZilla).

  7. Simon McKenna

    Does this only work on a self-hosted site? Mine is hosted by a 3rd party who designed it

    1. Lucky Bhumkar

      It will work in the case, you have access to files via FTP or control panel (i.e. cPanel, Plesk, etc.)

  8. Lili

    Like others wrote before – I have the correct permissions (for .htaccess and for public_html), but still get the error. What do you mean by checking the path of .htaccess and were could spelling be wrong? Thanks in advance!

    1. Lucky Bhumkar

      The path of .htaccess means, it should belong to the root directory where index.php located. Or in other words, the path where WordPress is installed.
      The spelling of .htaccess might sometime mistyped as .htacess or .htacces or sometime htaccess (without dot). So, it the spelling of the file .htaccess should be reviewed.

  9. James

    I’m getting the same error. How does one use this plugin for a windows environment, with no htaccess file using the plesk environment manager?

  10. Giap

    Thank you! This solves my issue exactly, magic indeed haha!

Leave a Reply