Understanding File Permissions in WordPress Website

Understanding File Permissions in WordPress Website

IF you have access to the file manager of your WordPress website via FTP or cPanel. You may have seen some numbers like 755, 644 etc in the right most colunm against each file or folder. These number denotes the permissions on the files and folders. With these permissions we let the server know that which files are accessible by external scripts and to what extent.  Some of the very frustrating problems like Image not uploading Error, Images not showing Error, plugin not intalled properly, theme not installed properly etc are occurred due to incorrect permissions on some files or folders.

You should be well aware about these permissions while you are working with any type of websites on a Linux based hosting. Most of the server today are linux bases. This file/ folder permission system imanates from Linux / Unix general structures. Follwing are some details about the permission structure :

There are three types of access:

  1. Read Permission, commonly denoted as r, files with this access can only be displayed to the user. Images are always read only files.
  2. Write Permission, commonly denoted as w, files with this access can be modified by the user.  Upload folder is an exaple of such permission.
  3. Execute Permission, commonly denoted as x, files with this access can be executed as programs by the user. It is mostly used for scripts type files.

Access types are set for three types of user group:

  1. User – The owner of the file.
  2. Group – Other files which are in the same folder or group.
  3. World – Everyone else.

The permission to the files and folders are to set up in such a fashion that the server is alboe to read the web pages and display them properly in the browser. Here is a brief idea about the permission structure to be setup to make your website work properly.

  • The value for HTML files and images need to be 644 as they are to be readable by User, Group and World, and writable by User. Whenever you upload a new media file, the permissions are automatically setup to 644.
  • The value for lll folders need to be 755 as they are to be readable by User, Group and World, writable by User, executable by User, Group and World. Whenever you create a new folder, its permissions are automatically setup to 755.
  • The value for All CGI files (all files in the cgi-bin folder) need to be is 755  as they are to be readable by User, Group, and World, writable by User, executable by User, Group, and World. You need to change the file permissions manually as it doesn’t happen automatically.

If you like above article, please subscribe. We will keep you updated with our new Articles.

Leave your Feedback / Questions in Comments.

Leave a Reply

4 × one =

Close Menu