0

It seems that certain lines added to our wp-config.php file are being removed, every day at 01:00.

Timestamp

The line that's being removed is

define('WP_ENVIRONMENT_TYPE', 'staging');

Which is added just before the /* That's all, stop editing! Happy blogging. */ line.

The site is hosted on WPMU, and they say there's nothing they do that would do this. Our WP developer who created the theme says also there's nothing that would do it either. I also can't find anything in any plugin that would do it.

I've checked the cron jobs listed and there's a bunch of WP_Defender jobs, for example, that I have no idea what they do, but they don't seem to run at the correct time for the activity (nothing seems to fire around that time).

I haven't disabled all the plugins and re-enabled them, as we'd have to do it one per day and it would take a month!

Any ideas how I could track down what's doing this?

7
  • 2
    WP Defender leads with The first atomated backup, auto-restoring and self-healing wordpress security plugin. Save big from site downtime and costly restoration procedures. have you checked that WP Defender isn't undoing your change because it's assuming it was done maliciously?
    – Tom J Nowell
    Aug 1, 2022 at 12:40
  • Ha! Really? I asked WPMU if it was any of their security plugins and they said no, but this is possible just the first line tech didn't know. I'll go back and ask! Thanks!
    – Ralpharama
    Aug 1, 2022 at 13:25
  • it's possible but keep in mind I'm not familiar at all with that plugin so just a guess, you may have backed up your config file, then modified it, and it's restoring that backup, or I may be totally wrong
    – Tom J Nowell
    Aug 1, 2022 at 13:26
  • "Defender can add some lines to the wp-config.php but I know the developers in that team are very wary of doing any removals from wp-config.php, in case this kind of situation happens." from WPMU. They're checking with the devs, I'll let you know!
    – Ralpharama
    Aug 1, 2022 at 13:31
  • Good grief, after initial denial, then they send me here wpmudev.com/docs/hosting/allowed-disabled-functions-commands/… following constants in the wp-config.php file will be removed automatically: WP_ENVIRONMENT_TYPE
    – Ralpharama
    Aug 1, 2022 at 13:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.