WP : How to change file permission tutorial

On my previous post, I talked about How to change Read more in WordPress. Apparently, some people have some problem with the change, mostly because the problem with permission on the file that they’re trying to edit.

chmod is a unix command to change permission of a file. I don’t want to talk specifically on the command itself, but how to use it in changing permission for your theme files. If you’re interested in knowing more about chmod, you can read about it [here].

So, how to know if you’re WP file’s permission is not correctly defined? Refer to the screenshot below. If you see something like the one in the red box, then you need to change the file permission before you edit the file. Otherwise, you can save the changes that you made.


So if you’re see something like You need to make this file writable before you can save your changes. See the Codex for more information.”, then you need to follow the steps below to make it work! I’m only showing you the most simple way to do it!

The first thing you need is a ftp client. There’s a lot of ftp client that you can use like filezilla, smartftp, ftpclient and the list goes on. I’m using Winscp for work because it supports sftp, so I’m going to use winscp in the tutorial. You can get winscp here.

1. Configure your ftp client to connect to your ftp server.

There’s a various ways to configure your ftp client but usually the important info that you need to get are:

Server IP or URL : e.g ftp.domain.com
Username : e.g username@domain.com or username
Password : your password to connect to the ftp domain
FTP server port : usually it’s 21 but sometimes it will be different to avoid abuse.

After you have configure the ftp client, try to connect to it and upload or download a file to make sure it’s working. If you’re good, then we’ll go to the next step.

2. Find the file that you need to change the permission.

Depends on your hosting configuration, usually the wordpress theme file can be found on the root of the folder. Like mine was showing in /wp-content/themes. This is for theme installation path. It might be different on some occasions. You can change the single file permission or to make it easier, just change the whole folder permission for the theme. In this case, I’m making the changes on the theme folder itself. The theme name is mandigo. I just right on the folder and choose properties or you can just select the folder and press F9. Refer to the screenshot below.


3. Use the appropriate properties


Refer to the screenshot above. There are two ways to change the file permission to an appropriate permission. Using WinSCP, I can use the boxes or just input the octal value if you knew it.

If you want to use boxes, refer to the screenshot above and tick according to it. In this case, the octal value is 0777. Remember the zero at the front. Or else, it will be 7770 in the end which is another file permission value.

Also remember to check the option “Set group, owner and permission recursively”. Failure in doing this will make you change the folder’s permission only and not including the wordpress theme files in the folder. Yerp, I agree, *nix sometimes quite bitchy. :razz:

4. And we’re done !

And before you know it, we’re already done. Now you can go and change your theme accordingly. Just a few markers before you go on and screw up your theme edit your theme, remember to back up your theme before you edit it. In case something went wrong, you always have back for it. Just use notepad to put the codings in it.

p/s : please send your feedback in the comments. If you need any tutorial in particular, you can use contact me and send me your wish. I won’t be able to satisfy all of you but at least I will try.:razz: