Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm hosting wordpress on a shared hosting environment.

Somehow it would not let me edit and update the file inside wordpress theme editor(the 'update file' button is missing) and wordpress gives me this:

You need to make this file writable before you can save your changes. See the Codex for more information.

I have checked my file permission and it's 755 for the directories and 644 for all the files. If I change the files' permission to 777, I will be able to edit them in the theme editor.

How can I further troubleshoot what is wrong or do I need to contact my server admin regarding this for further information?

Thanks for the help!

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I have managed to fix this issue when running on Apache/Linux by creating a group (e.g. webserver) and adding the user apache runs as to that group. You can then change group for all files under your wordpress site as follows:

chgrp -R webserver /path/to/wordpress

You can then give that group write access with the following command

chmod -R g+w /path/to/wordpress

This method allows you to keep ownership of the files, allow group members to edit, but you don't have to allow all users to be able to change all files.

If you don't have access to your webserver to create groups, you probably don't have much choice but to give global write access to the specific files you want to update through the wordpress interface. That means setting the files to 777 permissions, which isn't great in a shared web hosting environment!

It would be nice if web hosts set up a group with the webserver in, so you could assign group ownership of files that the webserver needs to edit.

share|improve this answer

It probably has something to do with file permissions and more specific, the file owner. For the wordpress editor to work the files need to be owned by whatever user the web server is running under. This is mostly www-data on apache.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.