2.8.4.6.3. Change app address in CodeIgniter

Attention!

This article describes only the standard features of the CodeIgniter 4 framework.

In CodeIgniter, the site address is specified in the configuration file or in the .env file, which is used to define the app environment:

  • If you are using an .env file, you need to modify the line after first removing the hash symbol # at the beginning of the line:
    app.baseURL = 'site_address'
  • If you are using the file app/Config/App.php, you need to change the following line:
    public $baseURL = 'http://site_address/';

You can edit files using the file manager or any FTP client.

Content