I’m sorry to hear that happened to you. Clearly, that’s not the intention of the plugin, we use it regularly for debugging customer websites and have never experienced this issue.
Unfortunately, we can’t reproduce this. Each WP environment is unique, so there’s something on your WP install, or maybe your server settings, that’s causing this.
We do add a line to wp-config.php, and I’m surprised it fully wiped your whole file.
I’d be very interested to test it out on your site, or a duplicate, if you’d allow. Hopefully we can figure out why it happened to you and find a workaround to make sure it doesn’t happen to others.
The tricky thing with plugins like this is that we don’t know what everyone is running on their site. Anyone can code anything and include it in WordPress. Once, a user experienced a 500 error upon activation, which ended up being due to a hard-coded file path require() PHP call to a path we change in the WP filters. We modified the plugin to ‘test’ safe mode before actually making the change to wp-config.php and that problem never happened again.
Thread Starter
rtc35
(@rtc35)
I appreciate your quick response and I do think the plugin is a great idea. It’s clear you’re keen to make it more robust. I don’t doubt that this is a rare fluke situation. You should note that I had originally moved the wp-config.php file out of the usual folder up one to the root. After my 500 error happened last night, I notice that there were two wp-config.php files and the one that was 0 bytes was in the usual spot WordPress normally keeps it. I don’t believe that there were two before, although I can’t be sure. I also loosened up the file permissions for that file last night in order to restore it. I just experimented this morning and deleted the one in the root folder and reinstalled and activated your plugin successfully. Unfortunately, as soon as I enabled safe mode (me only) I got a message saying there was an error and an email would be sent to the admin email. The home page was messed up so I quickly restored the wp-config file again (it wasn’t blanked out this time) and the site is back to looking normal. I would consider duplicating the site when I get some time so you can test, although even I didn’t replicate the same issue the second time around.
Thanks @rtc35, having wp-config.php up a directory may well have been the problem… never tested that and I will do that (and will also update you here).
These sorts of configurations are less common, and if you’ve made that wp-config.php modification, I’d bet maybe you did something else too that caused the errors switching to safe mode 🙂
I’d love to be able to make it more robust for these situations, so when you have time I’d appreciate a duplicate of your site for me to test (or if you have a staging site I can access).
Hi, it turns out that the wp-config.php file being one level up was completely the problem. WPSF tried creating a new wp-config.php file by mistake, and that’s where things went wrong since you now had an invalid wp-config.php file in the location tat takes precedence over your real wp-config.php file one level up.
Thanks for the feedback, as now the plugin is better for it! I just updated it to 1.2, hope you’ll give it another try!
Thread Starter
rtc35
(@rtc35)
Marcus, I appreciate how quickly you addressed the issue. I’ll be sure to give it another try when I get a chance.