It seems every few months my wp-config.php is being overwritten to the wp-config-sample.php. Nothing else is corrupted or changed, just that. It started to do this early 2019. The host is Inmotion. I managed a dozen sites on Siteground and have never seen this issue before. The site in question uses Securi for malware protection and I have enabled files rights to 444 on wp-config.php. Of course it could be a plugin..
wp-config-sample.php
with the values fromwp-config.php
, that way, in the event that this happens again, your site won't break. I would also ask your host to see if there's been anything fishy going on - WordPress will usewp-config-sample.php
as the config file if it can't findwp-config.php
, and will try to load/wp-admin/setup-config.php
to reconfigure the site (seen near the top of/wp-load.php
).