WordPress File Permission Issues: What They Are and How to Fix Them

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.

Wrong permissions = Broken site or hacked site

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.

What Are File Permissions?

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:

  • Owner — The user who owns the file (usually your FTP/SFTP user or the web server user)
  • Group — Users in the same group as the file owner
  • Others (World) — Everyone else

For each category, three types of access can be granted or denied:

  • Read (r) — View the file or list the directory contents
  • Write (w) — Modify the file or add/remove files in a directory
  • Execute (x) — Run the file as a program, or access a directory

Permission Numbers Explained:

Number Permission Meaning
0---No permissions
1--xExecute only
2-w-Write only
4r--Read only
5r-xRead + Execute
6rw-Read + Write
7rwxRead + 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.

Correct WordPress File Permissions

Here are the correct permission values for a standard WordPress installation:

Location Correct Permission Why
WordPress root directory755Web server needs to read and execute; owner can write
All subdirectories755Same as root
wp-content/755Must allow web server to read themes and plugins
wp-content/themes/755Theme files must be readable and directories accessible
wp-content/plugins/755Plugin files must be readable and directories accessible
wp-content/uploads/755Web server must be able to write uploaded files here
All PHP files (.php)644Web server reads and executes them; no writing needed
wp-config.php600 or 640Only owner should read this — contains DB credentials
.htaccess644Web server needs to read; WordPress needs to write
CSS, JS, image files644Read-only for everyone except owner
The golden rule: Directories = 755. Files = 644. wp-config.php = 600. Never 777 on a live site.

What Goes Wrong with Incorrect Permissions

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:

  • Another customer's compromised site could write malware to your files
  • Attackers who gain any server access can modify your WordPress files
  • Uploaded malicious files in your uploads directory can be executed
  • This is one of the most common ways WordPress sites get hacked on shared hosting

Too Restrictive (e.g., 400 or 500):

  • WordPress can't write cache files
  • Automatic updates fail with "Could not create directory" errors
  • Media uploads fail — images can't be written to wp-content/uploads/
  • Plugin and theme updates fail
  • WordPress can't regenerate .htaccess after permalink changes
  • You see "Permission denied" errors in the admin dashboard

How to Check Current File Permissions

Via FTP (FileZilla):

  1. Open FileZilla and connect to your server
  2. Navigate to your WordPress root directory
  3. Right-click any file or folder → Select File Permissions
  4. You'll see the current permission value
  5. To view permissions for all files: View → Column → File Permissions

Via SSH:

Bash
# 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:

  1. Log in to cPanel → File Manager
  2. Navigate to your WordPress root
  3. Select a file or folder — permissions are shown in the details panel
  4. Right-click → Change Permissions to view and modify

How to Fix WordPress File Permissions

01
Fix via FTP (FileZilla)

Fix directory permissions:

  1. Right-click your WordPress root folder → File Permissions
  2. Set numeric value to 755
  3. Check "Recurse into subdirectories"
  4. Select "Apply to directories only"
  5. Click OK

Fix file permissions:

  1. Right-click your WordPress root folder → File Permissions
  2. Set numeric value to 644
  3. Check "Recurse into subdirectories"
  4. Select "Apply to files only"
  5. Click OK

Fix wp-config.php specifically:

  1. Right-click wp-config.php → File Permissions
  2. Set to 600
  3. Click OK (do NOT recurse — only apply to this file)
02
Fix via SSH (Fastest)

If you have SSH access, these commands fix permissions across your entire WordPress installation in seconds:

Bash
# 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
03
Fix via cPanel File Manager
  1. Log in to cPanel → File Manager
  2. Navigate to your WordPress root
  3. Select all files and folders (Ctrl+A)
  4. Click Change Permissions in the toolbar
  5. Set directories to 755 and files to 644
Pro Tip: cPanel File Manager doesn't always handle recursive permissions as cleanly as FTP or SSH — for thorough fixes, SSH is preferred.
04
Fix via WordPress Plugin

iThemes Security / Solid Security can check and fix file permissions:

  1. Go to Security → Site Check → File Permissions
  2. The plugin scans and shows any permission issues
  3. Follow the recommendations to fix

Specific Permission Scenarios and Fixes

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:

PHP — 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:

Bash
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:

Bash
find wp-content/uploads -type f -exec chmod 644 {} \;

Plugin or Theme Updates Failing

Cause: Plugin/theme directory isn't writable by WordPress.

Fix:

Bash
chmod -R 755 wp-content/plugins
chmod -R 755 wp-content/themes

Special Case: Uploads Directory Security

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:

Apache — wp-content/uploads/.htaccess
<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.

Understanding File Ownership vs. File Permissions

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:

Bash
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):

Bash
# 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.

Frequently Asked Questions

Q: Is 777 ever acceptable for WordPress?
A: No — not on a live production site. On a local development environment where security isn't a concern, 777 is technically harmless. On any internet-facing site, 777 is a significant security risk. Even if you're "temporarily" setting 777 to fix an issue, change it back immediately.
Q: My hosting provider set up WordPress for me. Do I need to check permissions?
A: It's worth verifying, especially if you migrated from another host or installed WordPress manually. Permissions can be inadvertently changed by file operations, migrations, and some plugins. A quick SSH check takes 30 seconds.
Q: Can wrong permissions cause a site to look normal but have security issues?
A: Absolutely. Overly permissive permissions (especially 777 on directories) create security vulnerabilities without any visible symptoms. The site works perfectly — but is vulnerable to cross-site file contamination on shared hosting. This is why security audits check permissions even on "working" sites.
Q: My file manager shows permissions as letters (drwxr-xr-x) not numbers. How do I read them?
A: The 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.

Final Thoughts

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
Views: 193