WordPress cannot edit files or install plugins due to restrictive permissions.
Wrong File Permissions
Key Points: WordPress fails to update, upload, or save changes due to locked files or directories.
You try to install a plugin, and WordPress says “Update failed: could not create directory.” Or maybe you can’t upload images. File permissions are the invisible gatekeepers here.
🚪 What Causes It
- Files/folders have wrong ownership
- Permissions set too tight (e.g., 400 or 000)
- Security plugins or server lockdowns
🔧 Proper Settings
- Folders:
755 - Files:
644 - wp-config.php:
640(or600on secure servers)
🛠️ Fix Method
Use FTP or your hosting file manager to reset permissions recursively, or run:
find . -type d -exec chmod 755 {} ;
find . -type f -exec chmod 644 {} ;
🧠 Tip
Never set anything to 777 — it works, but invites every bot in town to mess with your files.