Even though WordPress is a user-friendly platform, you can still run into errors from time to time. One such problem is an error message saying you don’t have the right file or folder permissions to make certain changes to your site.
Like with many other WordPress errors, the resolution to this problem can be simple. With the help of a File Transfer Protocol (FTP) client, you can adjust a few settings and get back to work on your site in no time.
In this tutorial, we’ll cover why file and folder permissions errors pop up and how they can affect your WordPress site. Then, we’ll take you through three simple steps to fix the problem. Let’s go!
What Is the File and Folder Permissions Error
Permissions are rules that control who has access to the files and folders that make up your WordPress site. They vary depending on the level of security each file requires and define which users can read, run, or modify the contents.
File and folder permissions exist to keep your WordPress site secure. Allowing users to access sensitive files, such as pages that include payment card information, can compromise your site. For instance, loose permissions might provide easy entry to hackers who intentionally destroy or steal data.
However, it’s not only malicious acts you should be concerned about. Even well-meaning users can accidentally change files and break your site in the process. Limiting access to certain files is a preventative measure to avoid such accidents.
In other words, the message that appears in WordPress saying you do not have permission to edit a file is not always an error, so to speak. However, incorrect file permissions can inadvertently prevent you from making necessary changes to your site.
For example, you may have received a permissions error message while trying to install a plugin or theme, which is an action that creates new folders and files. It could also pop up when you’re trying to run a program or upload an image. Regardless of the circumstances, you’ll need to adjust your site’s permissions to move forward.
How to Fix the File and Folder Permissions Error in WordPress (In 3 Steps)
Fortunately, it only takes three simple steps to resolve file and folder permissions issues in WordPress.
The complete the steps below, you will need your FTP credentials on hand. Additionally, we recommend backing up your site before you proceed, as there’s always room for human error when working with your WordPress files.
Step 1: Connect to Your Server Using an FTP Client
To change your file and folder permissions, you’ll need to be able to access them. As such, the first thing you’ll need is an FTP client to help you transfer information from your local computer to your website’s server.
We recommend FileZilla. It’s approved by WordPress, free to use, and a remarkably stable way to upload and download website files:
Set up your FTP client of choice and connect it to your server using the credentials provided by your hosting provider.
If you’re new to FTP, you might want to take some time to get used to your client’s interface. When you’re ready, navigate to your site’s root folder (usually labeled public_html).
Step 2: Change Your Folder and Subfolder Permissions
Once you’ve opened your root directory, you should see all of your WordPress files and folders. Select all of the folders first:
These should include wp-includes, wp-content, and wp-admin. Next, right-click on that selection to bring up an options menu. Select File permissions.
This will open a window where you can adjust your permissions settings. It’ll look something like this:
In the Numeric value field, enter the number 755.
This is a code that specifies which types of users should be able to read, write, and execute files.
The first number (7) gives the owner (you) full permissions. The second number (5) enables select users (such as those with registered accounts on your site) to read and execute the contents of these folders. The last digit (5) specifies your site’s public permissions, which, in this case, are also set to read/execute.
A little further down, be sure to check the Recurse into subdirectories box. This will apply those permissions to all the subfolders within the ones you’ve selected, so you don’t have to individually edit the permissions for each one.
Also check the Apply to directories only option. This will make sure that the permissions you’ve set are only applied to folders but not the files within them. Those require slightly different permissions, which we’ll cover in the next step.
Once you’ve filled out the relevant fields, click on OK to apply the new permissions.
Step 3: Change Your File Permissions
Next, go back to your root directory in your FTP client and select all the folders and all the files:
Right-click on them and select File permissions like in the last step. This will bring up the same permissions window. However, this time, enter 644 in the Numeric value field:
This permission works just like the one we used for folders.
The first number (6) gives you permission to read and write files. It’s stricter than the folder permissions to provide an extra level of security to your sensitive files. The second (4) and third (4) numbers set the group and public permissions to read-only. Again, these are stricter than the folder permissions for security reasons.
Now, you can move on to the checkboxes. Make sure the Recurse into subdirectories box is selected so that the changes will apply to all the files within the top-level directories. Also check the Apply to files only option — otherwise, you’ll undo all the work from Step 2.
Once you’ve set the permissions so that your menu looks like the screenshot above, click on OK to complete the process. You should now have the freedom to edit your site files without having to contend with error messages.
Unexpected error messages can get in the way of a smoothly running site. Fortunately, you’re just a few short steps away from using an FTP client such as FileZilla to set your file and folder permissions straight.
In this article, we covered three steps for fixing file and folder permissions errors in WordPress:
- Choose an FTP client and connect to your server.
- Change your folder and subfolder permissions.
- Edit your file permissions.
Do you have any questions about fixing the file and folder permissions error in WordPress? Let us know in the comments section below!