File Permissions in WordPress


#1

Hi,

When I try to revise the php code for my webiste using the WordPress editor, it says: “You need to make this file writable before you can save your changes. See the Codex for more information.”

However, I am listed as having a “shell account” in DreamHost, which I assume would allow me to edit the code/php.

Does anyone know how to resolve this? I’m a newbie at this stuff, but am trying to learn! :0) If there is another thread where this issue has already been addressed, please feel free to point me there.


#2

I’m not positive what you are trying to edit, and where you are trying to edit it from. If you can be more specific about that you can get a more specific answer to your question.

In general however every file has it’s own set of permissions. The short version is that it can be Readable, Writable or eXecutable and each of those 3 aspects apply to the different sets of users: Owner, Group, and World.

more info: http://wiki.dreamhost.com/Unix_File_Permissions

PS - depending what you are editing you may want to change your method of editing rather than change the file permission. It sounds like you are trying to use an editor through the webserver (which means your editing as the apache user, and not the file owner). You question is vague, but in general for editing the .php files associated with wordpress you should be using an ftp client. http://wiki.dreamhost.com/FTP


#3

Are you trying to change the code from within the WordPress Dashboard using the Edit feature? You should be able to make changes from within the dashboard and save them, but if you are getting errors, check the permission of your WordPress files by FTPing or going into the shell and seeing who owns them and what how they are set.

Generally, I’d advise against using that editor. It’s usually better to work on your changes offline and then upload the new files over the old ones – might also want to check that what you want to do requires a change to the php and wouldn’t be better accomplished via a plug-in, only you can determine that. Remember, too, that any changes to the core php may be over-written with future upgrades. This goes for your templates and plug-ins, too. So, make sure you keep copies/notes about any changes you make.


#4

Hi artgeek and LakeRat,

Thank you both for your quick responses! Let me try to be clearer about what I’m doing:

As artgeek says, I’m trying to change the php code from within the WordPress Dashboard using the editor feature. However, as I mentioned before, it tells me that I need to make the files writeable. I have researched CHMOD and tried to change the file through DreamHost so that I can edit it, but with no success. When I right-click on the file directory, it doesn’t give me any control options.

I wish I knew how to edit my website without using the WordPress editor, but I have no idea how to create changes offline and then upload new files, as artgeek suggested. I’ve also tried to remedy some of my problems via a WordPress plug-in, but with no success.

I hope that makes things more clear…I’m kind of swimming without a life-preserver and looking for the shore! :wink: