How to change permissions of WordPress files on the server

IT

Today we are gonna talk about some problems regarding the read/write permissions on a wordpress website.

For example if you have a website hosted on a server with an old DSO handler (mod_php) wich work on apache on nobody(99) username there is no way that files to be owned by another owner/group than apache itself .

So if your host will not change to SU or other handler, you need to do some stuff in wp-config.php file .

One of the critical files in your WordPress website is the wp-config.php file.

So you need to add :

define(‘FS_CHMOD_DIR’, (0755 & ~ umask()));
define(‘FS_CHMOD_FILE’, (0644 & ~ umask()));

and your new created folder should have 755 permissions and the files 644.

Hope this will help you !

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet - Rate this article !)
Loading...


Lost Password