No doubt WordPress is the most widely used CMS out there, you might be having one or two websites on WordPress, that’s why you are here, right? Sometimes WordPress can give you errors which don’t let you manage or upload files on it, but the best part of WordPress is that most of its errors are easy to fix. Recently I was moving one of my websites to another server, everything went fine and in no time I was ready to publish the post from the new server. But before I can publish and post blogs, I decided to update all pending plugins, as soon as I pushed update button, I was served with a new error. As you can see this error has occurred due to missing or bad file permissions.
Before we can fix this, let us see what happens behind the wall. As you know all of your WordPress files are hosted in a computer which you call server which is managed by your hosting company and this computer uses a special software to manage and run a server, either Apache or NGINX.
File and Folder permission tells the server who can read, write and execute the files which are hosted on your server as per their rights, commands with incorrect file permission will not allow any kind of changes or modifications on the files hosted on your server.
What Is the Default Or Secure File and Folder Permission for WordPress –
By default, you should set 755 permission for Folder and sub-folders whereas files should have 644 permission.
How To Set It –
First of all, you need an FTP client, I am going to use FileZilla here, which is a free and easy to use FTP client. Now login and once you are in the root folder of your blog.
For Folder –
- Select all folder and right click there and click on ‘File Permissions’
- This will bring up a new dialog box, now set file permission as 755
- Also, click on ‘Recurse into subdirectories’ checkbox and then select ‘Apply to directories only’ option.
- That’s it, just click on Ok and sit back and relax, FileZilla will take some time and will set 755 as file permissions to all Folders.
For Files –
- From the root directory of your blog, select all files and folders and right click on it and click on ‘File Permissions’
- This will bring up a new dialog box, now set permission as 644
- Also, click on ‘Recurse into subdirectories’ checkbox and then select ‘Apply to files only’ option’ option.
- That’s it, just click on Ok and sit back and relax, FileZilla will take some time and will set 644 as file permissions to all Files.