X

How to make WordPress themes writable

So you’ve uploaded a WordPress theme, head on over to the theme editor to make some changes, and get the dreaded If this file were writable you could edit it message? Not to worry, this is a quick fix. You don’t have to fire up your FTP client and reupload a new template file every time you make a change. You can use the theme editor like everyone else, with just a few quick changes to your file permissions, and I’ll show you how.

  • What exactly are file permissions, and what do I need to set them to?
  • How to change file permissions via an FTP client (in bulk)
  • How to change file permissions via cPanel

Let’s read on…

What are file permissions?

This is a method of administering access rights to certain files of your site. There are 3 types of permissions, read, write, and execute. Each of these types can be defined per a certain user group. These include owner permissions, group permissions, and public permissions. Some host’s security settings do not have the ideal WordPress permissions set by default, you’ll have to add this yourself. You don’t need to worry about all these technical details. All you need to remember is the number: 666.

Changing file permissions in FTP

This is probably the quickest way of changing the file permissions for all of your template files in one swift command. Open up your favorite FTP client, navigate to your template directory (with style.css, index.php, etc.) and select all .php and .css files. Do not select images or subdirectories.

WordPress FTP File Attributes

You can press CTRL + A to select them all, and click while holding CTRL to deselect items like images. After selecting the File Attributes option from the menu, you can change all the permissions to 666. You’ll notice the the group and public write permissions will automatically checked off.

WordPress FTP Change File Attributes

After pressing OK all the permissions to the files you selected should be changed to -rw-rw-rw-. You should now be able to edit them via the theme editor.

Changing permissions in cPanel

You can also do this in cPanel, although not in bulk (for the version of cPanel I’m using anyway). Open up the file manager, navigate to the template directory (similar to FTP) and click on the file you want to change permissions for.

WordPress cPanel File Manager Permissions

Change each one to 666, as before. This could be useful if you don’t have access to an FTP client, or just want to selectively make files writable.

Conclusion

If you can already edit themes in the theme editor, and your files are still set to 644, don’t worry about this tutorial. If it works, it works – no reason to change it. Some hosts may differ depending on their server configurations.

You may see different sources telling you to set everything to 777, which gives everybody full permissions. I wouldn’t recommend this. Although it would work, it may open up security holes on your site. The 666 permissions are just enough for the text files you’ll be editing.

Hope you enjoyed the article. Feel free to comment and share if you liked it.

Comments   Leave a Reply

  1. Very useful indeed… IF you have the option of “file permission” displayed in your Filezilla FTP, that is !

    I don’t understand why, but it’s happening to me.. 🙁

    Do you know what could be causing this ?

    Is there another way to access and change file permission, maybe ?

    I’d be so glad if you could help me here : I can’t uploads files to my wordpress (developped locally I must add).

  2. Thanks! I wish you wrote for WordPress – they make it sound sooo much harder!

  3. Thanks for this Leland – nothing to it!!

    Steve

  4. I’m about to change the permission of the files to 666. I hope it’ll solve the issue…777 is really dangerous due to hacking risks…

  5. why is that i’m still having trouble even if i have change the file permissions to 666?

  6. That was very helpful. I had already changed the file permissions on the php files but I had missed changing the css file permissions. That fixed it for me.

  7. Quick Tip: Prettify Subscribe to Comments checkbox | Headway HQ August 15, 2009 at 5:59 pm

    […] How to make WordPress themes writable by ThemeLab Tags: custom.css, plugin […]

  8. That was very helpful. I had already changed the file permissions on the php files but I had missed changing the css file permissions. That fixed it for me.

    Many thanks for a great post.

    Glen Wayne

  9. seriously, ur entry VERY HELPFUL!!

    THANK YOU SO MUCH.!!!

    MUAH.
    hehe

  10. THANK YOU SO MUCH FOR THIS! The instructions on wordpress are not nearly as understandable as this!

  11. Thank you! Exactly what I needed!

  12. I change it to 644, but I still can’t edit the file

    what to do?

  13. Editing the theme - WordPress Tavern Forum April 25, 2009 at 4:50 pm

    […] within your admin panel without editing your permissions manually. I wrote about this before here: http://www.themelab.com/2008/04/11/h…emes-writable/ Although I would recommend reverting your permissions back to their original state after you’re […]

  14. Thanks so much for your tutorial! You made it very easy, and it fixed my issue.

  15. Really helpful. This will not needed for bis hosts. But in some cases we have to do manually.

    Thanks for sharing.

  16. Hi
    i try your tips here but i got this result in my FTP client

    500 ‘SITE CHMOD 666 wp-content’: command not understood

    I change 666 to 664 or 644 it doesn’t works either

    i’m using filezilla also i don find that option in my database to change the permission, any help please??

  17. marlanul cel chetros February 16, 2009 at 7:51 am

    great… it worked … TY!

  18. Thanks, man!

  19. Open up your favorite FTP client, navigate to your template directory (with style.css, index.php, etc.) and select all .php and .css files. Do not select images or subdirectories.???
    i dont knw how to do this?? 🙁
    i just made a wordpress blog and i cant see a plugin option on it all i know is i need a writable theme file for it.. but i just dont know hw can i do this damn thing?? please help me..send me a mail if possible..

  20. Terry of Astoria July 31, 2008 at 2:45 am

    You should change back the permissions to 644 for files and 755 for dirs, after editing the files. Really. Read up on the wp codex,
    here!

  21. Make Your Wordpress Templates Editable | livelynotebook.com July 12, 2008 at 1:25 pm

    […] found very usable article about it here, and trying to figure it out. As an overview there are two easy ways to do it. First is using FTP […]

  22. livelynotebook July 12, 2008 at 12:52 pm

    Yeah, you’re rock!! I found something here. Thank you.

  23. […] Themelab – How to make WordPress themes writable […]

  24. How to make WordPress themes writable « Wendy’s OBA, Blog Tips & Tricks June 3, 2008 at 11:33 am

    […] Make WordPress Themes Writable […]

  25. Andie Summerkiss May 6, 2008 at 11:38 am

    Sorry. I got it already. That was explained on the first paragraph of the post.

    Thank you for the life-saving tip. That just saved me from a couple of nights’ worth of sleep.

Add a Comment Cancel reply

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!