TABLE OF CONTENTS
- What are File Permission Numbers?
- Recommended File Permissions in WordPress
- How to Change File Permissions on WordPress
On computer file systems, different files and directories have permissions that specify who and what can read, write, modify, and access them. This is important because WordPress may need access to write to files in your /wp-content/ directory to enable certain functions. If these permissions are set incorrectly, they may cause problems on your website. For example, if the permissions are set too loosely, unauthorized users and hackers might be able to access your site; and if you set the permission too tightly, WordPress might be unable to access files that are critical to their operations.
What are File Permission Numbers?
File permissions are a combination of three numbers:
From left to right, the numbers are in order of the permissions granted to the type of WordPress user – user, the group, and the world. Each number denotes a specific level of permission granted to the corresponding user:
0 – No access
1 – Execute
2 – Write
4 – Read
The rest of the numbers are a combination of 1, 2, and 4.
3 – (2+1) Write and execute
5 – (4+1) Read and execute
6 – (4+2) Read and write
7 – (4+3) Read, write and execute
You don't want all file permissions to be set to 777 and grant the whole world access to read, write, and execute your files. At the same time, you can’t set everyone’s permission to 000 or 444 either. This is because WordPress often requires permission to execute files or modify them. When you install plugins and themes, they need access to certain files and folders for you to be able to use them.
So what are the recommended WordPress file permissions?
Recommended File Permissions in WordPress
Here are the recommended file permissions that you can set for your WordPress site.
All other files – 644