PHP Config File Best Practices

Migrating well established programs such as WordPress, Joomla from one server to another can be daunting task. After you make sure that all the PHP and Apache extensions are installed and your server is ready to go, you finally come to the point  where you have to move the sites themselves. You have to worry about moving the files, change permissions,  move the database(s) and so forth. Having a single configuration file will help you save a lot of time and frustrations since you will not have to chase connections strings all over the place.

Here is a good article on the subjects
http://www.ibm.com/developerworks/library/os-php-config/index.html

Also look at the source code of  established open source projects;  this will help you make decisions on how to handle the configuration variables.

Other Related Links

http://php.net/manual/en/function.define.php

 

Let's share thisShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn