Support » Fixing WordPress » wp-config.php File Permissions settings

  • My wp-config.php “permission mode” is currently set to 404, meaning that the world (public) can “Read” that file, right? Since that file has my WP database password, would it be better to set it at 400, which would remove the “Read” permission from the public?

Viewing 4 replies - 1 through 4 (of 4 total)
  • wp-config.php should be 600 to prevent other users on the server from reading it.

    Go through:



    Thanks so much Krishna. Since I had the owner part already set to read only, would it be ok to set the file permission mode at 400?

    Just two more questions if you don’t mind:
    1. When I add wp-config.php (in 404 mode) to my url in my browser, the file does not open. Why not if it’s public? Is there another way for someone to read that file if the permissions were set to read, as it was before this post at 404?

    2. And if “Write” is not allowed for user/owner in 404 mode, why am I able to edit the file and upload it via ftp?

    Thanks so much.



    @ jetskiron

    400 is ideal if it will work with your setup. Only you will know if your site still functions at 400.



    The permissions are explained at the link I provided. A lot more depends on your host also, because these permissions also relate to security issues. So, understand the permissions, look for the permissions at your hosts side and make your own decisions. Without seeing what your host has set for you by default/restrictions, I cannot tell you anything.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp-config.php File Permissions settings’ is closed to new replies.