Using 1 wp-config file for multiple servers
Here’s a copy of my modified wp-config file that I’m using to achieve this:
I used a php switch statement to be able to use only one wp-config file for all three of my servers (dev, staging, and live). I do this because I am using subversion and it works perfectly, however, I’m no longer able to use both “www” and “no-www”. I think it’s because for the “case” statement I used the “www” subdomain. So it makes sense that the config file wouldn’t recognize just “domain.com”. WordPress is giving me a database error when I try, but not for “www.domain.com” where my site shows up fine.
I would love if anyone who is good at php can show me how to get wp-config working for both “www” and “no-www” domains. I’m not very good at php. If not maybe a redirect would be advised, like with .htaccess?
- The topic ‘Using 1 wp-config file for multiple servers’ is closed to new replies.