dxw / whippet-server

Whippet Server launches a stand-alone web server for a specific WordPress installation. It makes WordPress easier to develop with, for example, by adding lots of debug information to the terminal without cluttering up or breaking your templates.
ISC License
80 stars 6 forks source link

wp-config.php mangling #7

Closed scribu closed 12 years ago

scribu commented 12 years ago

It would be nice if whippet didn't alter my existing wp-config.php file in any way. It could make a copy and restore it when I press Ctrl+C.

harry-m commented 12 years ago

Hmm, that's exactly what it's supposed to do.

Assuming you're working within a full install, it backs up your existing config to /tmp/.whippet-original-wp-config, then modifies your config, and restores the original one on quit.

What behaviour are you seeing?

scribu commented 12 years ago

If I have the config file one level higher, I'm left with the whippet wp-config.php in the wp dir, which takes precedence.

harry-m commented 12 years ago

Aha, ok. Must have missed that when I was fixing the earlier issue.

scribu commented 12 years ago

Also, I'm not sure moving the original config to /tmp/ is a good idea. It should stay in the same directory.

harry-m commented 12 years ago

Not sure about the /tmp thing. I guess it might be a bit more intuitive to keep it in the same directory as the original, with a .bak extension, or something. Are there other reasons for switching away from /tmp? Are you concerned that it's unsafe?

scribu commented 12 years ago

Yes, since I might attempt to run multiple whippet instances simultaneously.

scribu commented 12 years ago

And if whippet quits unexpectedly for some reason, it's easier to restore the config file manually. Currently, I would have to remember that it's stored in the /tmp/ dir.

harry-m commented 12 years ago

That's a good point. I'll change it now.

Multiple Whippet instances would require more work than just moving the wp-config backup, though. There's a couple of other files that would need to be put somewhere sensible as well.

I haven't worked at all on that since I figured multiple instances probably wasn't too important.