WordPress runs on a web server, and every file on that server has rules about who can read it and who can change it. If you want the right file and folder permissions for WordPress, the short answer is 755 for folders, 644 for files, and a stricter 440 or 400 for wp-config.php. Never use 777. This guide shows you what those numbers mean, how to set them with FTP or the command line, and how to check them from your dashboard.
We checked every step on November 21, 2026. We looked at the Site Health screen on a fresh WordPress 7.1.5 test site in WordPress Playground, and we ran the chmod commands on a test folder in a terminal. Let us have a look at how permissions work first.
Related Articles:
- WordPress Security Checklist
- How to Access Your WordPress Website via FTP
- Fix the "Upload: Failed to Write File to Disk" Error
What Are File and Folder Permissions?
Linux servers give every file and folder three separate sets of permissions: one for the owner, one for the group, and one for everyone else. Each set can independently allow three operations, which are read, write and execute.
Each permission has a numeric value: read is 4, write is 2 and execute is 1. You add them together for each set, so 7 means read, write and execute, 5 means read and execute, and 4 means read only, which is how you get a three-digit mode like 755.
| Mode | Letters | Owner | Group | Everyone else |
|---|---|---|---|---|
| 755 | rwxr-xr-x | Read, write, open | Read, open | Read, open |
| 644 | rw-r--r-- | Read, write | Read | Read |
| 640 | rw-r----- | Read, write | Read | Nothing |
| 440 | r--r----- | Read | Read | Nothing |
| 400 | r-------- | Read | Nothing | Nothing |
| 777 | rwxrwxrwx | Everything | Everything | Everything |
For a directory, "execute" means you can open it and access the files inside, which is exactly why folders need the extra 1 and ordinary files don't.
The Right File and Folder Permissions for WordPress
The Hardening WordPress guide in the official handbook gives one simple scheme. All files should be owned by your user account and be writable by you. Folders get 755 and files get 644. The handbook also notes that WordPress itself sets files to 0644 and folders to 0755 when it runs an automatic update.

Here is what each part of your site needs:
- Root folder, /wp-admin/ and /wp-includes/: writable only by your user account. Use 755 for folders and 644 for files.
- .htaccess: 644. The server must be able to read it. WordPress also needs to write to it if you want it to update permalink rules for you.
- /wp-content/: this is where your uploads, themes and plugins live. It should be writable by your user account and by the web server process.
- wp-config.php: this configuration file contains your database credentials, so the handbook recommends that only you and the web server can read it, which generally means 400 or 440.
If your host uses suEXEC on shared hosting, PHP runs as your own user. The Changing File Permissions page says folders should be 755 or 750 and files 644 or 640 in that case, with wp-config.php at 440 or 400. It also says no folder should ever be 777, not even uploads.
Why You Should Never Use 777
A 777 mode means every user account and every process on the server can modify that file. The official handbook explains the danger clearly: if an attacker can upload or change a file in a world-writable folder, they can run their own code and take full control of your site, including your database details.
Some old tutorials and plugin forums still tell you to "just set it to 777" when uploads fail. Thankfully, there is almost always a better solution. Check who owns the folder first, and then increase the permission only one step at a time. If a plugin really asks for 777, contact its author or your host and ask for a safer way.
How To Change Permissions With an FTP Client
Most FTP applications, including FileZilla, can modify permissions directly. Follow our simple steps:
- First, connect to your site with FTP or SFTP. Our guide on accessing WordPress via FTP shows how.
- Next, open the folder where WordPress is installed. You will see wp-admin, wp-content and wp-includes inside it.
- Now, select all the folders, right-click and choose File permissions…
- Enter 755 in the Numeric value box. Tick Recurse into subdirectories and choose Apply to directories only. Click OK.
- Select everything again and open File permissions… once more. Enter 644, tick Recurse into subdirectories, choose Apply to files only and click OK.
- Finally, right-click wp-config.php on its own and set it to 440 or 400. If your site stops loading, use 640 and ask your host which mode they support.
Files that start with a dot, like .htaccess, are hidden in most FTP clients. In FileZilla, open the Server menu and choose Force show hidden files to see them.
How To Change Permissions With the Command Line
If your hosting account includes SSH access, the command line is much faster. These are the two commands from the official hardening guide, followed by one for wp-config.php. Replace the path with your own WordPress installation folder:
find /path/to/wordpress/ -type d -exec chmod 755 {} \;
find /path/to/wordpress/ -type f -exec chmod 644 {} \;
chmod 400 /path/to/wordpress/wp-config.php
We tested this on a small copy of the WordPress folder layout in a macOS terminal. Every folder and file started at 777. After the two find commands, the root folder and uploads showed 755 (drwxr-xr-x), and index.php and .htaccess showed 644 (-rw-r--r--). A final check found zero folders or files left with the wrong mode.
We then simulated two actions a malicious script might attempt. With uploads set to 555, writing a new file failed with "permission denied". With wp-config.php set to 400, adding a line to it also failed. That is exactly the protection you want.
How To Check Permissions in Your Dashboard
You don't need FTP just to verify that WordPress can write to the directories it depends on. Go to Tools > Site Health, click the Info tab and open Filesystem Permissions.

On our WordPress 7.1.5 test site, this panel listed the main WordPress directory, wp-content, uploads, plugins, themes and must-use plugins as "Writable". The fonts folder showed "Does not exist", since no fonts had been installed on the fresh test site. If uploads shows "Not writable" on your live site, image uploads will fail, so fix that folder first.
Common Mistakes We Found While Testing
- Copying modes from a local or test site. Playground is a test copy of WordPress that runs inside your browser. Our check there showed folders at 0777 and files at 0666, and an upload still worked after we set uploads to 0555. So you can't use it to test permission errors. Always check on your real server.
- Fixing modes but not owners. The handbook says files should be owned by your user account, not by the web server user. A 755 directory owned by the wrong user account can still prevent uploads.
- Locking wp-config.php too hard on some hosts. If your PHP runs as a different user, 400 can stop the server from reading the file. Try 440 or 640 and ask your host.
- Forgetting .htaccess. If its permission is 600 or lower, the server process can't read it and your website may display an error.
Frequently Asked Questions
What permissions should the uploads folder have?
Use 755, the same as other folders. WordPress needs to write to it, so the web server must own it or share a group with you. Don't set it to 777.
Why does WordPress ask for FTP details when I install a plugin?
This means WordPress can't write to your files directly, usually because the files belong to a different user than PHP. Ask your host to fix the ownership instead of loosening permissions.
Should I also stop file editing in the dashboard?
Yes, it is always advisable. Add define( 'DISALLOW_FILE_EDIT', true ); to wp-config.php. The handbook says this removes the built-in theme and plugin editors for every user. See our guide to disabling theme and plugin file editing.
Do I need a plugin to fix permissions?
No. An FTP client or the two find commands handle everything, and Site Health confirms the result afterwards.
Wrapping Up
Correct permissions take only a few minutes to configure, and they close an easy opportunity for attackers. Set folders to 755 and files to 644, lock wp-config.php to 440 or 400, and keep 777 off your server. Then check Site Health and read our guide to WordPress vulnerabilities for the next steps.
Let us know in the comments if your host asks for different file and folder permissions.
Sources
- WordPress Advanced Administration Handbook: Changing File Permissions (checked November 21, 2026)
- WordPress Advanced Administration Handbook: Hardening WordPress (checked November 21, 2026)
- WordPress Advanced Administration Handbook: Editing wp-config.php (checked November 21, 2026)
- WordPress.org version check API: latest version 7.1.5 (checked November 21, 2026)
- WP Thinker test: file and folder permissions checked with chmod in a macOS terminal and in Site Health on WordPress 7.1.5 in Playground (November 21, 2026)




