Ignore wp-config.php WordPress not working

Viewed 250

I have tried a lot to gitignore wp-config.php on a fresh installation of WordPress, not fresh installation also but none of them has worked. I am using PhpStorm.

Does anyone have an idea?

Please note that I have used rm -- cached and all know solutions.

the commands tested

git rm --cached wp-config.php

add file to .gitignore
1 Answers

I suggest that wp-config.php is already in the repository!? You have to remove them with:

  1. Add to your .gitignore file wp-config.php
  2. Remove from repository with: git rm --cached .
  3. Then git add . and commit with git commit -m "add wpConfigPhp to gitignore"
Related