WordPress Files and Permission

How to define file permissions for WordPress directories and files for ensuring best security?

Permissions defines what users can do with the file or directory. The permissions are represented by a set of numbers called permission mode.

WordPress file permissions:

WordPress file permissions specify who can read, write and execute the files and directories in WordPress website. Permission mode protect the website from unauthorized access by hackers. Permissions are given based on the role that user possess. Along with permission modes, it is always recommended to install security plugins that will reduce the security breach of the WordPress website. Popular WordPress security plugins are: Sucuri, iThemes, Security, Jetpack security, WPScan , Wordfence.

Types of permissions:

  Permissions   Meaning   Symbol Number representation
Read View contents of a file or directory r 4
Write Can modify the contents of a file or directory w 2
Execute Allowed to run script files or scripts inside directory x 1
No Permission User has no access to the file or directory 0

Roles:

  1. User :       The assigned owner of the file or directory.
  2. Group : Members of the group that owns the file or directory.
  3. Others :  All users other than file owner or group members
Note: Recommended permission modes for a directory is 755 and for a file is 644.

How to identify the permission mode:

  • 3 = (2 + 1) = Write + Execute
  • 5 = (4 + 1) = Read + Execute
  • 6 = (4 + 2) = Read + Write
  • 7 = (4 + 2 + 1) = Read + Write + Execute

Example:

Mode Explanation
670 Owner has read and write only, group has read, write and execute, others have no permission
777 All have permissions for read, write and execute

Recommended file permissions for WordPress website

Path Permission mode
Root directory (usually public_html) 755
wp-config.php 444 or400
.htaccess 444 or 644
wp-includes 755
wp-admin/js 755
wp-content 755
wp-content/themes 755
wp-content/plugins 755
wp-content/uploads 755
Index.php 644 or 444

Fixing permissions

Therearemultiplewaysto access your files and directories to fix the WordPress permissions. The user can choose whichever is convenient.

permissions using cPanel:

cPanel is an online Linux-based graphical interface (GUI) used as a control panel to simplify website and server management. cPanel allows you to publish websites, manage domains, organize web files.

  • Log into your cPanel account. Either find a link on web host dashboard, or type /cPanel after the site
  • SEO
  • top seo company in kochi
SHARE NOW
One of the India’s largest service platform for entrepreneurs. We’re on a mission to empower the worldwide community of 20+ million customers and entrepreneurs everywhere — by giving them all the help and tools they need to grow online. We are creating a compelling brand and a great looking website, attract customers with digital and social marketing, and manage their work. Digital Marketing|| top seo company in kochi|| best web development|| web hosting|| best web development & web hosting company in kerala

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *