Table Of Contents
Just like any other Content Management System (CMS), WordPress comes with a few quirks. One of the most annoying is the ‘file and folder permissions error’, which can prevent you from interacting with your site. That includes creating folders and modifying files – basically everything you need to run your WordPress website.
The good news is this particular problem has a quick fix. It’s all a matter of configuring your file and folder permission settings. However, before we dive into how to do it, let’s go over how permissions work in WordPress and why they’re important.
What You Need to Know About File and Folder Permissions in WordPress
Every file and folder on your computer comes with its own set of permissions. These are rules governing who can interact with them and what they can do with those files. For example, you might set a folder as read-only for non-admin users – while you can make changes to that folder’s files, everyone else will still be able to view them.
In short, the file and folder permissions error in WordPress is an access issue. If you run across this error, you’ll know what the problem is right away. WordPress will return a warning message when you try to access your website (something similar to Unable to create directory).
Making sure your permission settings are on point is critical to keeping your WordPress site safe. After all, you don’t want regular users to have access to your WordPress core files. You might not even want your collaborators to either. As far as we’re concerned, only WordPress administrators should have the necessary permissions to modify your site, beyond posting new content and other small additions.
However, it’s also important to give WordPress itself the necessary permissions so the platform can fulfill its duties. That involves creating folders, posts, pages, creating files, and so on. Without them, the CMS won’t work as intended, and you’ll run into a myriad of errors – including ones relating to your files and folders.
How to Quickly Fix the File and Folder Permissions Error in WordPress (In 2 Steps)
The quickest way to troubleshoot this issue is to access your site using an FTP client (we recommend FileZilla). However, before you go looking into your WordPress files and folders, we recommend backing up your site manually in case the unthinkable happens and you need to restore your site.
When you’re ready, open your FTP client and log into your server.
Step #1: Fix Your Directories’ Permission Settings
Firstly, find your WordPress root folder, which is usually named either public_html, www, or after your site’s title. Open it, and you should find three folders (wp-admin, wp-content, and wp-includes) along with several loose files:
Select those three folders, right-click on them, and pick the option that reads File Permissions:
You should see the Change file attributes screen, containing Read, Write, and Execute permissions for three types of users: the file’s owner, the owner’s group, and the regular public. The first number represents your permissions, the second number represents your group, and the third is your user’s permission level. Each type of permission is also represented by a numerical value. Read equals four, Write is two, and Execute is one.
The maximum number you can give is seven, which represents Read, Write, and Executable access for a user – you can see the numerical representation in the Numeric Value field:
Back to the three folders, we want to set a numerical value of 755 and tick the option that reads Recurse into subdirectories > Apply to directories only:
That means you get full access, WordPress can read and open folders (but not delete them), and the same goes for your users. However, your files will remain unaffected, which brings us to step number two.
Step #2: Change Your WordPress Files’ Permission Values
Now you’ve changed the permissions levels for all of your directories, it’s time to do the same for your files. However, we won’t be using the same numerical value as we did with folders.
For this step, return to your root directory and select every single file and folder within, including the ones we used during the last step. Now, right-click on them and choose the File Permissions option again:
This time around, you’re going to replace the existing number within the Numeric value field with 644:
In this case, you (as the owner) get to both read and modify every file. As for your visitors and your group, they only get reading access since they don’t own the files. This is the perfect setting from a security standpoint, as it limits the points of entry for potential attacks.
Before you update the permission settings for your files, make sure to tick the option that reads Recurse into subdirectories > Apply to files only. That way, you’ll only apply the 644 value to your WordPress files, and your folders will keep the settings you specified during the last step.
All that’s left now is to try accessing your site again. If you followed the above steps, the file and folder permissions error should be gone, and your website should be fully operational once more. However, if you’re still experiencing an issue, there could some an underlying reason for the error. In this case, we recommend getting in touch your your hosting provider to help solve the issue.
File and folder permission settings can be an intimidating topic, and with good reason. Using the wrong settings can seriously mess with your site – so a thorough grounding in the WordPress file structure is a must.
Once you’ve au fait with that – and you’ve accessed your site via FTP – fixing the file and folder permissions error only takes two steps:
- Change the permission settings for your WordPress folders.
- Repeat the process for all of your files.
Do you have any questions about how to fix the WordPress file and folder permissions error? Ask away in the comments section below!
Article thumbnail image by Trivalium / shutterstock.com.