How to Fix WordPress File Permission Issues
Fix upload, plugin, and theme errors caused by incorrect file permissions.
Before you start
Step-by-step instructions
1. Check current permissions
Check file and folder permissions in your WordPress directory.
ls -l /var/www/html
2. Set correct file permissions
Apply standard permissions for WordPress files.
find /var/www/html -type f -exec chmod 644 {} \;
find /var/www/html -type d -exec chmod 755 {} \;
3. Fix ownership
Make sure WordPress files belong to the correct web server user.
chown -R www-data:www-data /var/www/html
4. Test WordPress functionality
Try uploading files or installing a plugin again.
Test media upload and plugin installation to confirm the issue is resolved.
Common issues
Check wp-content/uploads permissions specifically.
Deployment tools or hosting panels may override permissions.
Check file ownership and PHP user configuration.
Final check
Correct permissions and ownership ensure WordPress can manage files safely without exposing security risks.