Long overdue but better late then never I begin a mini-series where I will answer questions that my readers submitted via Survey I did last month. I apologize for delay and promise to make it worth for you.
Question 1: “How do I change the wp-config to writable so I can give myself ALTER rights”
This is actually quite common problem if your host has one of the “unfriendly” setups and it will also apply to people who have issues editing the Theme Files directly from WordPress Admin interface.
How To Make File Writable?
If you haven’t got too far into using your host and having this issues I recommend you stop now and get yourself a host that is more friendly to WordPress. I use and recommend Hostgator as they are one of the few hosts that actually State Support for WordPress as an application! Plus with the way their hosting account compiled – you will never be faced with problem we are trying to solve right now.
But let’s assume that this is NOT an option and you still need to fix the problem…
Login into your cPanel and open your own favorite version of File Browser. Since what you will see will depend on version of cPanel skin that your host is using I’m going to show you one of the most basics:
Whichever one you will use doesn’t matter, as long as you can get the job done! Using file manager navigate to the file you need to make writable. In case of the question above wp-config.php which will be located in the root of the blog. If you only have one site on your host – generally it will be public_html or in some rare cases htdocs.
Once you locate the file you need to make writable – click on its name, as shown in image below to get the option to Change Permissions (right column options after you click on file name)
You will be presented with next screen once you click on Change Permissions, as seen below:
Screenshot above is from Hostgatorand Permissions you see provide a secure and yet editable file for you. Unfortunately many other hosts require that you change a file to a less secure combination.
Try first adjusting permissions to 666 or basically give Write access to the Group and World, making it writable by pretty much anyone but that should do the trick for you. Just don’t frget to change it back to 644 once done!
And if 666 fails to work for you – try changing the numerical combination to 777, which makes file really insecure but will work for you fr sure. Once again – change it back to 644 once done to avoid being exploited later!
Same procedure will apply to you if you attempt to edit your WordPress Theme files directly from WordPress admin interface and get presented with a message that you need to have ALTER permissions. It is a pain but you will have to navigate inside your theme folder and give each file you need to edit permissions as outlined above and then change it back when done to avoid being hacked!
Rule Of Thumb:
- Keep files permissions at 644 to have them secure
- Try setting permissions to 666 and see if this works
- If above fails – go with 777 and do what you need
- ALWAYS change permissions back to original combination. 644 should be on most hosts
- OPTIONAL: change your host to one that saves you from all the grief – Hostgator is one I recommend.
Disclaimer: some of the links mentioned within this post or posts they lead to are my affiliate links and I get compensated for recommending those products. However I never recommend something I didn’t believe in and welcome your questions and feedback.