Skip to main content

How to Fix WordPress File and Folder Permission Errors

Correcting file and folder permissions ensures that your WordPress site can properly read, write, and execute the necessary files to function. This guide helps a Site Administrator identify and resolve permission issues within a WordPress installation.

Correcting file and folder permissions ensures that your WordPress site can properly read, write, and execute the necessary files to function. This guide helps a Site Administrator identify and resolve permission issues within a WordPress installation.

Before you begin

You will need:

  • Administrator access to your WordPress site.

  • Access to your hosting control panel (such as cPanel or Windows Control Panel) or an FTP/SFTP client.

  • A current backup of your website files and database.

Fix file and folder permissions

Incorrect permissions can prevent your site from updating plugins, uploading images, or displaying content correctly. Standard WordPress installations typically require specific permissions for folders and files.

Set standard permissions via File Manager or FTP

  1. Connect to your server using an FTP client or log in to your hosting control panel's File Manager.

  2. Navigate to the root directory of your WordPress installation (usually public_html or www).

  3. Select all folders within the directory.

  4. Set the permissions for these folders to 755.

  5. Select all files within the directory.

  6. Set the permissions for these files to 644.

  7. If you have a specific folder for your WordPress configuration, such as wp-config.php, ensure it is set to 644 or 640 depending on your server's specific requirements.

Warning: Incorrectly setting permissions can create security vulnerabilities or cause your site to become inaccessible. Always verify the numbers before applying them to the entire directory.

Fix permissions via a WordPress plugin

If you are uncomfortable using an FTP client or File Manager, you can use a plugin to automate the correction of permissions.

  1. Log in to your WordPress dashboard.

  2. Navigate to Plugins > Add New.

  3. Search for a "File Permissions" plugin.

  4. Install and activate the plugin.

  5. Follow the on-screen instructions to scan and fix your site's permissions.

  6. Once the process is complete, deactivate and delete the plugin to keep your site lean.

Confirm the result

  • Your website should load correctly without "permission denied" errors.

  • You should be able to upload images to the Media Library.

  • You should be able to update or install plugins and themes from the dashboard.

If you still see "Permission Denied" errors

If permissions are set correctly but you still encounter errors, the issue may be related to the ownership of the files rather than the permissions themselves.

  1. Verify that the web server user (e.g., www-data or your specific account username) owns the files.

  2. Check if a security plugin or a Web Application Firewall (WAF) is blocking specific actions.

  3. Contact Hostek support to verify if the file ownership is correctly assigned to your account.

Limitations

This procedure addresses standard permission issues. It does not resolve issues caused by incorrect file ownership, server-side security restrictions (like mod_security), or faulty plugin code.

Did this answer your question?