Editing and Saving Files in Theme Editor

Remember I pointed out that I tried to edit and save footer.php in Presentation - Theme Editor of WordPress. Editing was okay, but there was no any button save it. I was wondering what is the point! I realized the situation today: File Permission.

Files are editable by using Theme Editor, but if you want to save it you have to change file permission. Look at Changing File Permissions.

/wp-content/themes/ - theme files. If you want to use the built-in theme editor, all files need to be group writable. If you do not want to use the built-in theme editor, all files can be writable only by your user account.

It says “all files need to be group writable.” I changed 404.php permissions from 644 to 666 which gives write permission to group. But nothing changed. The file is editable but not savable. This time I changed the permission from 644 to 666, it means that user, group and even world can write into the file. It worked. After editing 404.php file Update File button appeared; click it and saved the changes.

So if you want to edit/save any file in theme editor, you have to change the file permission. Give write right to group and world!

  • Question #1: Is group write permission enough to edit and save the file in Theme Editor? It seems not enough. Right?
  • Question #2: Is there any problem for giving world write permission to any file in terms of security issue?

Tags: , ,

Leave a Reply