Back

How to Fix file and folder permissions problem in WordPress

Spread the love

One of the frequent questions by WordPress users across the globe is “how to overcome the error caused due to incorrect file and folder permissions?”. We will show the method to solve the WordPress permission error easily in this article.

Why File and Folder Permissions are important in WordPress?

Your WordPress site lies in a distributed or a cloud system that is taken care of by the hosting provider. Special software is used to manage the site’s files and folders and serve them when demanded by the browsers.

WordPress needs certain permissions to read, write and modify these files and folders on the server. Because Retrieval and storage of data will not be possible without the appropriate file and folder permission. Incorrect file & folder permission will prevent WordPress from the functioning and even become a threat to the security of the site.

Permission for Folders and Sub-folders

In WordPress, We have certain recommendation to determine what type of permission is to be given for folders and sub-folders. “755” s the right type of permission to all the folders and sub-folders of WordPress. 755 permission allows anyone to read and execute the folder & subfolder. Only the owner has the write access.

  1. Connect your WordPress site using an FTP client such as FileZilla, WinSCP, etc.,
  2. Go to the Root folder of your WordPress site
  3. Select all the folders in the root directory and right-click on your mouse to select “File Permissions
  1. In the permission dialogue box enter 755 in the “Numeric value” field
  2. Select “Recurse into subdirectories” checkbox

This will create the same permission to all the sub-folders present inside the main folders

  1. Select “Apply to Directories only” button and click “OK” button

Now, the FTP client will start to set permission to all the folders and sub-folders in your WordPress directory. It takes some extra time to change the permission in some cases

Permission for Files

In WordPress, Like the folder permission, We also have certain recommendation to determine what type of permission is to be given for files. “644” is the right type of permission to all the files of WordPress. 644 permission allows the owner to read and write the file. Anyone other than owner only has the read access.

  1. Go to the Root folder of your WordPress site
  2. Select all the files & folders in the root directory and right-click on your mouse to select “File Permissions
  3. In the, permission dialogue box enter 644 in the “Numeric value” field
  4. Select “Recurse into subdirectories” checkbox

This will create the same permission to all the files present in the folders and sub-folders.

  1. Select “Apply to Files only” button and click “OK” button

Now, the FTP client will start to set permission to all the files in your WordPress directory. It takes some extra time to change the permission in some cases.

Permission for wp-config File:

Wp-config.php file is a crucial file for the functioning of WordPress. This wp-config file holds all the information about the site’s databases. If the contents of this file is accessed by any intruder, they might take control of an entire website. To ensure maximum security, it is recommended to give “600” permission to this file. 600 permission allows the owner to read and write the file.

  1. Go to the Root folder of your WordPress site
  2. Select wp-config.php file
  3. Right-click on your mouse to select “File Permissions
  4. Enter 600 in the “Numeric value” field of the permission dialogue box
  5. Select “Apply to Files only” button and click “OK” button

Permission for .htaccess File:

The final step in completing the file & folder permission issue is to give proper 644 permission to the .htaccess file. With this permission, anyone on the system can read the file but the owner only has both read and write access.

  1. Go to the Root folder of your WordPress site
  2. Select .htaccess file
  3. Right-click on your mouse to select “File Permissions
  4. Enter 644 in the “Numeric value” field of the permission dialogue box
  5. Select “Apply to Files only” button and click “OK” button

Ensure everything mentioned in the blog is done properly to avoid issues like “Internal server error”, and “404-Page not found” errors etc,

We really hope this article will be helpful to solve your file and folder permission errors in WordPress. Share this knowledge to your friends and colleagues in the social platform and be a hero!

Leave a Reply

Your email address will not be published. Required fields are marked *