Want to change the WordPress file permissions? And you found a problem and you need to fix it with that file edit? So, keep reading, I’ll show you how to update the file permissions easily using cPanel or FTP.
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 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 reason 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, and your login details 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.
Please keep in mind that when you don’t know what you’re doing, you may cause severe issues and sometimes downtime for your site, so, carefully follow these instructions and always back up your site and save a copy locally. On the other side, consider using managed WordPress hosting services that are fully secure and easy to use at the same time.
The problem that we’ve found with the first one is that you can change the file 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 this example:
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. 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” file. So, find the “wp-content” file first as the next example:
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 subfile 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 on the same page, find “Change permissions” and click on it as the following screenshot:
When clicking “change permissions”, you get the below window:
Finally, you have the option to check and change permissions on a file as you want. Check all boxes to get the 777 file permissions, this means 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 the logical WordPress file 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 it’s popular, and the majority of 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 let them open to the world with 777 file permissions. 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.
If you want to add something about changing the WordPress file permissions, make sure you use the comment section below. Or use the contact page if you have useful tools and you want to recommend for bloggers and website owners.