Hi everyone, im currently new to drupal 8 and right now i am trying to self-learn on drupal 8 theming. So currently I am trying to edit sites/default/settings.php on a windows 10 machine with a wamp stack. However, i am unable to edit the file on netbeans IDE as well as notepad++.

I have tried to change the permission of the file to full control for everyone by setting properties>security>edit and addded Everyone group into the permission. However, the settings.php remains uneditable.

Here is the screenshot of the file permission properties. Am i doing anything wrong? Or is it just that this file is protected by drupal? And if so, how do i go about editing it?

P.S: Pardon me if i didnt organize my question properly as this is the first time i am posting in my whole life.

Comments

fkelly12054@gmail.com’s picture

If you are on Windows 10 machine, just make sure the file is closed, then unclick read only in File Explorer, then edit the file and save it. Next time you run Drupal (say by accessing it in Wamp) drupal will reset it to read only. But your changes will have been saved. Do this as many times as necessary, you just need to keep resetting the read only flag with File Explorer after Drupal turns it back to read only. Most likely there's some way to comment out or disable the Drupal code that does that and it should be safe on a local system ... but it's easy enough to just change it in File Explorer while you are experimenting with settings.

tobiaslkj’s picture

IT WORKED! THANKS FOR THE PROMPT REPLY! Was figuring out for quite awhile even though I have changed the file permission and security. Guess I have overlooked the read-only option in Windows. Thanks again!

Well for other people who is stucked in this, basically what fkelly mean was to uncheck this option and I were able to edit the file with the right permissions. Hope it help someone here!

fkelly12054@gmail.com’s picture

Glad it helped. Yeah, you need to change some things in settings for running locally, and likely enable the local_settings.php to add a few other settings for local too. That's at the bottom of the settings.php.