- b2evolution CMS User Manual
- Installation / Upgrade
- Advanced Setup
- How to change the location of admin.php
How to change the location of admin.php
When moving the dispatcher file or admin.php
from its default location in the root of the application to a sub-folder we will need to change the admin interface dispatcher configuration and we may also need to update the dispatcher file itself.
To change the admin interface dispatcher, edit your /conf/_advanced.php
file and search for the the line which look similar to the following:
$dispatcher = 'admin.php';
Change the above configuration to reflect the new location and possibly name of the dispatcher file. For example, if you moved the admin.php
file from application_path/
to application/subfolder
then you should update the configuration to:
$dispatcher = 'subfolder/admin.php';
If you are using a _local.conf
to override the admin interface dispatcher do not forget to also update the $admin_url
configuration:
$dispatcher = 'subfolder/admin.php';
$admin_url = $baseurl.$dispatcher;
Next, if you moved the dispatcher file to a new location or subfolder then we will need to edit the dispatcher or admin.php
file so it will know where to find the necessary configuration file /conf/_config.php
.
Do this by editing the dispatcher file and search for the following line:
require_once dirname(__FILE__).'/conf/_config.php';
Update the above line to reflect the relative location of the /conf/_config.php
. Using the earlier example, we moved the dispatcher to a new subfolder so the location of the configuration file should look like:
require_once dirname(__FILE__).'/../conf/_config.php';
If you simply renamed the dispatcher file and it is still located in the application root then editing the dispatcher file will not be necessary.