• Resolved vinceaggrippino

    (@vinceaggrippino)


    What are the required file and folder permissions for W3 Total Cache? Are they documented somewhere?

    I’d love to see something like this in the following before and during W3TC installation and configuration as well as on any screens which will need to make changes:

    During installation and configuration, W3 Total Cache needs to create and modify files in your wp-content directory and modify wp-config.php and .htaccess in your WordPress base directory. For these changes to take place, we need read and write permissions for the files and folder. After initial configuration, we recommend we change the file permissions back to their more secure defaults.

    I thought installing this would be easy. I guess that was naive.

    As I encountered each problem I would search the web and, more often than not, the solution was to change the permissions for a file on the web server.

    Okay. No problem. But the actual required permissions aren’t clear. Most thread responses seem to say 777. That doesn’t seem like a good idea and it’s definitely not a good idea to leave them that way.

    I made sure the group associations were correct and set the permissions to 664 for .htaccess & wp-config.php and 775 for the wp-content directory. Then I set them back to 644 and 755 when W3 was done doing its thing, but I’m a disgruntled former Unix admin. I don’t appreciate having to learn this through trial and error and I imagine the average WordPress user never even wants to see the command line on their server.

    So I guess I figured out the answer for me, but I’m requesting a documentation change to make it easier for others.

    Now I have to figure out what all these other Unavailable options are and whether or not it’s worth installing/configuring them.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @vinceaggrippino

    Thank you for reaching out and I am happy to assist you with this.
    The default WP files and folder permissions are 644 for the files and 755 for folders.
    W3TC needs to have permission to write to wp-config.php (adding the constant fore caching), .htaccess/nginx files in wp-content, creating and writing in the wp-content/cache/ directory (cached files if caching to disk), and adding dop-in files in wp-content like advanced-cache.php for Page Caching.
    So the W3TC needs the default permissions as mentioned above, and the majority of users do not change the files and folder permission unless some security plugin does that for them.
    Be that as it may, we’ll make sure to add more notifications and the information about the WP files and folders permission needed for the W3TC to be installed and used.

    Let me know if you have any other questions or suggestions.

    Thanks!

    Thread Starter vinceaggrippino

    (@vinceaggrippino)

    I think the file and folder permissions for WordPress are a little more complex than that: https://wordpress.org/support/article/changing-file-permissions/#permission-scheme-for-wordpress

    I don’t understand how people who never touch the command line do it 🤔

    644 wouldn’t work. The installed files would normally be owned by the user who installed them (e.g. vince) and the group, associated with the web server process (e.g. web), wouldn’t be able to write to the files. At least wp-config.php wouldn’t be writable and the documented recommendations would make it even less writable:

    Do most hosting providers set the user and group to the web server process’ user and group?

    I’m sorry to be so focused on minor details. I just want to understand all of this better so I don’t have to spend so much time on it in the future. I really appreciate your correspondence. I’m too poor/stubborn to pay someone else to handle server configuration for me 😅

    I probably installed WordPress manually and followed the instructions for file and folder permissions either from .org or my hosting provider (they probably match), but I did it a long time ago. I’m in the process of trying to revive an old neglected blog. I steered myself away from Ops in favor of Frontend Development awhile ago 😁

    I’m going to check “Reply and mark as resolved”. It’s just things to think about / refer to during installation. I really appreciate your time.

    Thank you,
    — Vince

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Required File and Folder Permissions’ is closed to new replies.