Edjet LMS Server 6.4

Change installation address

You can change the installation address of the Edjet LMS Server after the application was installed and run.

Article outline:

Introduction

In this tutorial we will change the web address of the Edjet LMS Server from the current (old) address (example https://old.example.com) to a new address (example https://new.example.com).

Setup new domain

To setup a new domain, follow the domain and DNS setup article.

Optionally, you can setup a server-side redirect from the old address to a new one to help users.

Update LMS database

The LMS database contains various references to the domain, which all need to be updated to a new domain.

This procedure can update both domain and protocol, if needed. Just change the protocol in REPLACE function together with a domain change. For example, if you migrate to HTTPS change "http" to "https".

To update the installation domain (hostname) in the LMS databse:

We assume the db name is "elms".

  1. Log into DB "elms" using SQL manager.
  2. Find table "system_settings" and open it for data editing.
  3. Update row "domain_noHttp" to a new domain name.
  4. Update the installation address accross whole DB (including absolute paths stored in the content managed by visual editor) using the following SQL. Replace old domain with a new domain (also replace protocol if needed) in REPLACE function and run it:
    SET search_path = template_c6, pg_catalog;
    
    DO
    $$
    DECLARE 
    rw record;
    BEGIN
    FOR rw IN 
    	SELECT 'UPDATE '||C.table_name||'  SET '||C.column_name||' = REPLACE ('||C.COLUMN_NAME||',''https://old.example.com'',''https://new.example.com''); ' QRY
    	FROM (SELECT column_name,table_name 
    			FROM   information_schema.columns 
    			WHERE  table_schema='template_c6' 
    			AND    (data_type ='text' OR data_type ='character varying')
    			AND    table_name in (SELECT table_name 
    								FROM   information_schema.tables 
    								WHERE  table_schema='template_c6' 
    								AND    table_type ='BASE TABLE'))c
    
    LOOP
    	EXECUTE rw.QRY;
    END LOOP;
    END;
    $$;
  5. Please check SQL console for any errors.

Update LMS configuration

  1. Open file <LMSinstallationFolder>/config/cfg.ini.php for editing.
  2. Change the "core_domain" value to a new domain.

Update SSL certificates

Get new SSL certificates issued to match a new domain and deploy it.

  1. Get new SSL certificates for new domain.
  2. Deploy the certificates to your environment.
    See the installation tutorial for your operationg system: Linux, Windows Server

Update license key

Important: Change of the domain require a new license key.

You can immediately activate the Edjet LMS using a free 30-day trial key:

  1. Sign in to your Edjet Account.
  2. Use a new domain (hostname) to activate a new Edjet LMS Server product.
  3. Download a trial key.
  4. Upload the license key to the LMS.

To activate the Edjet LMS using lifetime license key, please follow this article.

Installation and upgrade