Title: Bash script to edit wp-config.php and turn on debugging
Last modified: September 29, 2020

---

# Bash script to edit wp-config.php and turn on debugging

 *  [siddjain](https://wordpress.org/support/users/siddjain/)
 * (@siddjain)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/bash-script-to-edit-wp-config-php-and-turn-on-debugging/)
 * I am wondering if anyone knows how to automate this using bash:
    [https://wordpress.org/support/article/debugging-in-wordpress/#example-wp-config-php-for-debugging](https://wordpress.org/support/article/debugging-in-wordpress/#example-wp-config-php-for-debugging)
 * i.e., I am looking for a bash script that will edit wp-config.php and make changes
   to it to turn on debugging.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/bash-script-to-edit-wp-config-php-and-turn-on-debugging/#post-13475204)
 * You’d want to use `sed` actually. Which could be called from bash.
    [https://stackoverflow.com/questions/525592/find-and-replace-inside-a-text-file-from-a-bash-command](https://stackoverflow.com/questions/525592/find-and-replace-inside-a-text-file-from-a-bash-command)
 *  Thread Starter [siddjain](https://wordpress.org/support/users/siddjain/)
 * (@siddjain)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/bash-script-to-edit-wp-config-php-and-turn-on-debugging/#post-13520212)
 * Yes my question is does anyone have the code to do it? I tried using sed but 
   did not succeed.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Bash script to edit wp-config.php and turn on debugging’ is closed to
new replies.

## Tags

 * [bash](https://wordpress.org/support/topic-tag/bash/)
 * [unix](https://wordpress.org/support/topic-tag/unix/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [siddjain](https://wordpress.org/support/users/siddjain/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/bash-script-to-edit-wp-config-php-and-turn-on-debugging/#post-13520212)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
