MyBB Community Forums
Where to change the "config.php" location? - Printable Version

+- MyBB Community Forums (
+-- Forum: Community Archive (
+--- Forum: Archived Forums (
+---- Forum: Archived Development and Support (
+----- Forum: MyBB 1.6 (
+------ Forum: 1.6 Security Management and Support (
+------ Thread: Where to change the "config.php" location? (/thread-148587.html)

Where to change the "config.php" location? - LCTG - 2013-12-03


I want to move the config file to another place, but I don't know where to change code in MyBB. Please help me.


RE: Where to change the "config.php" location? - pavemen - 2013-12-03

\inc\init.php has two references to config.php that you need to update.

edit: however, it is simpler if you just set the bare min permissions on the file. It does not need to be readable by anything other than the php user (actual account or nobody usually) and then chmod to 400. this makes it read only to php and no other user can view or access the file. just remember this when you need to edit it

RE: Where to change the "config.php" location? - Oxygen - 2013-12-16

Change your config.php filename, then put this as config.php:

if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {


Then simply update yournewconfigname.php with your new config name. No core edits have to occur then and your filename has been changed without hassle.