WordPress Directory and File Permission For Security

I know, you are familiar with Linux file system. I know that you also have heard about some attacker can get access of your WordPress site remotely. So, here your tutorial about how you get more security by changing file and directory permission accurate.

Here is some little basic about Linux file permission system.

permissions

But that latter comes with the number like 0-7. That mean,

  • 0 – no access
  • 1 – execute
  • 2 – write
  • 3 – write and execute
  • 4 – read
  • 5 – read and execute
  • 6 – read and write
  • 7 – read, write and execute

Enough talking! Hope you understand little bit about Linux file system.

Now Go to your WordPress directory then run

ls -l

it will show you about your current file and directory permission.

 

What Permissions Should I Use for the directory and File?

WordPress usage directory for,

1. Wp core directory

2. Plugin Directory

3. Themes directory

You use you every plugin for a different purpose, right? So, Each plugin will have different needs of permission.  Wordpress codex suggests you

  • Folders – 755

  • Files – 644

change-file-attributes

Ok, Finally you did it. 😀  If you think this step is pretty much difficult for you then here is good news. I found a plugin that can easily fix up all of your directory permission, file permission etc.  But i suggest you for avoid every plugin that you don’t know well. In internet, nobody is trusted.!