Sometimes, things seem complicated when you are a newbie to any domain, especially, the WordPress world. One of the biggest problems that bloggers find is how to change WordPress file permissions. It’s not easy if you’ve just started with your blog, and terms like Linux permissions, looks like from another world.
Don’t worry, every blogger, even, the most popular webmasters forget that one day, they were unable to do things easier than changing the file permissions. However, most of them forget to help others who need the help in a step by step guide. In this post, you will learn how to change the WordPress file permissions in easy steps, and you will be able to help others.
The main reasons to open your WordPress files and edit permissions is when you can’t upload images, get the white screen of death or in other cases to set up and correct some issues in your blog. Before starting, it is better to know that every file in your blog has its own permissions setting.
This is a safe method to secure your site and never allow people and scripts from the outside of your blog to edit and change files and especially PHP files.
Changing WordPress file permissions
Using the cPanel file editor
Every web hosting company has a file editor option or similar function to let you view, edit, and update your blog files. All you have to do is to login into your cPanel account, (it’s the software that lets you manage your blog files, your login information are sent the first time when you signed up for a web hosting account).
In your cPanel dashboard, you have too many icons and settings, just find the ”Legacy File Manager” icon as the screenshot below:
As you can see there is another “File Manager” icon, but I highly recommend the second one with the green arrow. The reason is that, with that legacy file manager, you are guaranteed to edit, and change the file permissions.
The problem that we’ve found with the first one is that you can change permissions, but when saving the file, the change will back to the old settings. So, you see the changes, but when you refresh the page it turns back. Please note that this issue is special for some server settings that you can’t see. So, use the legacy file manager, as above and avoid problems, it is easy and fast.
When clicking on Legacy File Manager, a pop-up window will be opened, select the “Documents Root” option and you need to check the “Show Hidden Files (dotfiles) box as below:
After clicking the “Go” button, you can see all your WordPress and blog files in the next window.
Let’s suppose that we’re going to change the ”Uploads” WordPress directory permissions, which is a common issue in. Sometimes, you get an error with permissions messages caused by the ”Uploader” wrong settings.
The file “Uploads” is located in the “wp-content” which itself located in the public HTML files, so find the “wp-content” file first as below:
As in the screenshot, you need to click the small file icon at the left of any file that you need to open. Then, find any sub file you want to edit, in this case, we want to edit the “Uploads” file. Click the wp-content icon and you get the next window:
Now, you will get the new window in the same page, find “Change permissions” and click on it as the screenshot below:
When clicking “change permissions”, you get the below window:
Finally, you have the option to check and change permissions on a file as yo wants. Check all boxes to get 777 permissions, this mean Read, Write and Execute for all, then, save the change. This is an example of a problem with the “uploads” file, you need also to open the month file and change its permissions to 777. Don’t forget to change back your file permissions to 755 to secure it.
Please note that if you still have any problem with file permission. The solution is setting 777 for both the wp-content folder and the subfolder (uploads in our case) and even more. You have to open the upload file and set 777 for your actual months. This is logical permissions if you set 777 for a subfolder, but, the parent folder is 755. So, you need to set the parent as 777 also and change it back to 755 when the problem solved.
Now, you just learned how to change WordPress file permissions, but, with an easy method through cPanel. It’s easier than using the FTP method, and best of all, most, if not all the modern web hosting providers have a file editor option.
That way, changing file permissions is easier, but only, if you got an error and you should change them. Another important thing to keep in mind is that you shouldn’t set 777 permissions for the following directories and files in WordPress:
You can edit them if you need, but only for moments and not letting them opened to the world with 777. That’s a critical security problem and you have to change them back after fixing the problem, and take care of your blog files and security.