File permissions control who can read, write, and execute files on your server. When they're set correctly, WordPress runs smoothly and securely. When they're wrong — either too permissive or too restrictive — you get errors, security vulnerabilities, failed updates, and broken media uploads.
File permission issues are one of those WordPress problems that can be invisible for a long time (if permissions are too permissive) or immediately obvious (if they're too restrictive and things stop working). Either way, getting them right is important for both security and functionality.
This guide explains exactly what WordPress file permissions mean, what the correct values are, what goes wrong when they're set incorrectly, and how to fix them step by step.
Every file and folder on a Linux/Unix server (where most WordPress sites are hosted) has a set of permissions that control who can do what with it.
Permissions are defined for three categories of users:
For each category, three types of access can be granted or denied:
Permission Numbers Explained:
| Number | Permission | Meaning |
|---|---|---|
| 0 | --- | No permissions |
| 1 | --x | Execute only |
| 2 | -w- | Write only |
| 4 | r-- | Read only |
| 5 | r-x | Read + Execute |
| 6 | rw- | Read + Write |
| 7 | rwx | Read + Write + Execute |
Each digit represents one category (Owner / Group / Others): 755 = Owner: rwx, Group: r-x, Others: r-x. 644 = Owner: rw-, Group: r--, Others: r--. 777 = Everyone can do everything. This is almost always dangerous.
Here are the correct permission values for a standard WordPress installation:
| Location | Correct Permission | Why |
|---|---|---|
| WordPress root directory | 755 | Web server needs to read and execute; owner can write |
| All subdirectories | 755 | Same as root |
| wp-content/ | 755 | Must allow web server to read themes and plugins |
| wp-content/themes/ | 755 | Theme files must be readable and directories accessible |
| wp-content/plugins/ | 755 | Plugin files must be readable and directories accessible |
| wp-content/uploads/ | 755 | Web server must be able to write uploaded files here |
| All PHP files (.php) | 644 | Web server reads and executes them; no writing needed |
| wp-config.php | 600 or 640 | Only owner should read this — contains DB credentials |
| .htaccess | 644 | Web server needs to read; WordPress needs to write |
| CSS, JS, image files | 644 | Read-only for everyone except owner |
Too Permissive (e.g., 777):
Setting files or directories to 777 gives every user on the server full read, write, and execute access. On shared hosting where multiple customers share the same server:
Too Restrictive (e.g., 400 or 500):
wp-content/uploads/.htaccess after permalink changesVia FTP (FileZilla):
Via SSH:
# Check permissions in WordPress root
ls -la /path/to/wordpress/
# Check directory permissions recursively
find /path/to/wordpress -maxdepth 2 -exec ls -ld {} \;
Via cPanel File Manager:
Fix directory permissions:
755Fix file permissions:
644Fix wp-config.php specifically:
wp-config.php → File Permissions600If you have SSH access, these commands fix permissions across your entire WordPress installation in seconds:
# Navigate to your WordPress directory
cd /path/to/your/wordpress
# Fix all directory permissions to 755
find . -type d -exec chmod 755 {} \;
# Fix all file permissions to 644
find . -type f -exec chmod 644 {} \;
# Fix wp-config.php specifically
chmod 600 wp-config.php
# Verify
ls -la wp-config.php
iThemes Security / Solid Security can check and fix file permissions:
WordPress Automatic Updates Failing
Error: "Update failed: Could not create directory" or "Permission denied"
Cause: The web server user can't write to the WordPress directory to extract update files.
Fix: Ensure wp-content, wp-content/plugins, and wp-content/themes are set to 755. Check that the owner matches the web server user. On some configurations, add this to wp-config.php:
define( 'FS_METHOD', 'direct' );
Media Uploads Failing
Error: "Unable to create directory wp-content/uploads/ Is its parent directory writable by the server?"
Cause: The uploads directory isn't writable by the web server.
Fix:
chmod 755 wp-content/uploads
chmod 755 wp-content/uploads/2026
Images Returning 403 Forbidden
Error: Images on your site return "403 Forbidden" when accessed.
Cause: Image files have overly restrictive permissions (e.g., 600) that prevent the web server from reading them.
Fix:
find wp-content/uploads -type f -exec chmod 644 {} \;
Plugin or Theme Updates Failing
Cause: Plugin/theme directory isn't writable by WordPress.
Fix:
chmod -R 755 wp-content/plugins
chmod -R 755 wp-content/themes
The wp-content/uploads/ directory needs to be writable (755) so WordPress can save uploaded files. But it also needs to be protected against PHP execution — attackers who upload malicious PHP files shouldn't be able to execute them.
Block PHP execution in uploads:
Create a .htaccess file inside wp-content/uploads/ with:
<Files *.php>
deny from all
</Files>
This allows WordPress to write images and documents to uploads normally, but prevents any PHP files that end up there from being executed via the browser — closing one of the most common malware backdoor vectors.
Permissions and ownership work together. Even with correct permissions, files owned by the wrong user can cause problems.
Common ownership scenarios:
If you uploaded files via FTP, they're likely owned by your FTP user. If WordPress created files (uploads, cache), they're owned by the web server user (www-data on Apache, nginx on Nginx).
When the web server user and the file owner are different, write operations fail even with 755/644 permissions — because the web server user is in the "Others" category which only gets read/execute, not write.
Check ownership:
ls -la wp-content/
# Output: drwxr-xr-x 2 www-data www-data 4096 Jan 1 12:00 uploads/
# ^owner ^group
Fix ownership (if needed):
# Change ownership to web server user
sudo chown -R www-data:www-data /path/to/wordpress/
# Or to your FTP user
sudo chown -R yourftpuser:yourftpuser /path/to/wordpress/
Contact your hosting provider if you're unsure which user your web server runs as.
d means directory (no d means file). Then three groups of three characters: owner / group / others. rwx = 7, r-x = 5, r-- = 4. So drwxr-xr-x = directory with permissions 755.
WordPress file permissions are a foundational security and functionality requirement — not a one-time-setup-and-forget concern. After every migration, major file operation, or server change, it's worth running a quick permission check.
The rules are simple: directories to 755, files to 644, wp-config.php to 600, and never 777 on a production site. Apply these, add the PHP execution block to your uploads directory, and your WordPress installation has one fewer attack surface for hackers to exploit.
Need help auditing and fixing file permissions on your WordPress site? Our development team includes security hardening — including a full permission audit — in every WordPress project.
Contact us today