How to Quickly Fix the File and Folder Permissions Error in WordPress

Last Updated on September 11, 2022 by 13 Comments

How to Quickly Fix the File and Folder Permissions Error in WordPress
Blog / Tips & Tricks / How to Quickly Fix the File and Folder Permissions Error in WordPress

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.

Configuring the permission levels for a WordPress site.

Unix-based systems use numeric values to represent permission levels.

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:

The WordPress root directory.

Select those three folders, right-click on them, and pick the option that reads File Permissions:

Finding the file permissions option.

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:

Configuring the permission settings for your WordPress folders.

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:

Applying your new settings to every WordPress folder.

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:

Finding the file permissions option for your WordPress files.

This time around, you’re going to replace the existing number within the Numeric value field with 644:

Replacing the permissions value for your WordPress files.

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.

Applying your new permission settings to all your files.

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.

Conclusion

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:

  1. Change the permission settings for your WordPress folders.
  2. 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.

Divi

Want To Build Better WordPress Websites? Start Here! 👇

Take the first step towards a better website.

Get Started
Divi
Premade Layouts

Check Out These Related Posts

Splice Video Editor: An Overview and Review

Splice Video Editor: An Overview and Review

Updated on March 10, 2023 in Tips & Tricks

Video is a valuable form of content for social media. Unfortunately, creating quality videos is usually a long process that involves moving mobile footage to a desktop app for editing. However, mobile editing is on the rise. Apps such as Splice Video Editor make it possible to efficiently create...

View Full Post
How to Use Font Awesome On Your WordPress Website

How to Use Font Awesome On Your WordPress Website

Updated on September 16, 2022 in Tips & Tricks

When given the choice between using a vector icon or a static image, it’s a good idea to go with the vector. They’re small and fast to load, and they can scale to any size without a loss of resolution. Font Awesome is a superb library of vector icons that you can use on your websites,...

View Full Post

13 Comments

    • Hi Michael, thanks for the tip! 🙂

  1. I’ve had few problems with permissions but I have had huge problems with ownership. In other words, a particular folder has the right permissions for Owner/Group/World but the owner of the folder is not what it’s supposed to be and WordPress can’t access it.

    Who should the owner be to allow WP access?

    Thanks

  2. Great article – thanks.

    As someone who is using a windows server rather than linux, it would be great to have an equivalent article.

    My options are limited to using file permissions in plesk, as the ftp option does not change the permissions.

    I have yet to find an article on the web (believe me I have tried) that turns the type of permission settings listed above into a plesk and windows environment.

    Yes I could move to a linux server, but there must be others out there on windows – for whatever reason – and an equivalent article for us would be very much appreciated.

    • You’re welcome! We’ll keep your suggestion in mind. 🙂

  3. Well done. I will try later.
    REgards,

    • Thanks! 🙂

  4. If you have shell access, you can do this:


    find . -type f -exec chmod 664 {} \;
    find . -type d -exec chmod 775 {} \;

    • Hi Brad, thanks for the suggestions. 🙂

  5. WP users should take a course on basic Unix permissions

  6. Hi John,

    Very helpful article.

    Would you like to share any resource or a good reference on how to do the exact thing on a Unix Shell?

Leave A Reply

Comments are reviewed and must adhere to our comments policy.

Get Started With Divi