Actions

Developer Area/Changing Hostnames

From Mahara Wiki

< Developer Area

When changing a Mahara installation over to a new hostname, the following steps are required to a) update the hostname setting, and b) re-generate the system's public key.

If you let Mahara auto-detect the wwwroot:

  • Run the following SQL queries on the database. Remember to take a full dump of your database in case anything goes wrong!
    • delete from config where field = 'wwwroot';
    • delete from config where field like '%openssl%';
  • Log in as an administrator and go to "Site Administration -> Configure Site -> Networking" to re-generate the public key.

If you have set wwwroot in config.php manually:

  • Update $cfg->wwwroot in config.php to the new address.
  • Run the following SQL queries on the Mahara database.  Remember to take a full dump of your database in case anything goes wrong!
    • delete from config where field = 'wwwroot';
    • delete from config where field like '%openssl%';
  • Log in as an administrator and go to "Site Administration -> Configure Site -> Networking" to re-generate the public key.

The 'config' table name in the above SQL statements may vary if you have a dbprefix set.

Note that any networked peers such as Moodle would also need to have their configuration updated to contain the new Mahara hostname and public key.