Open Gii
config/web.php:
$config = [ ... ]; if (YII_ENV_DEV) { $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = 'yii\gii\Module'; }
Set YII_ENV_DEV in web/index.php:
defined('YII_ENV') or define('YII_ENV', 'dev');
If accessing from non-localhost, you need to make the following settings in the configuration file:
'gii' => [ 'class' => 'yii\gii\Module', 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'] // adjust this to your needs ],
Test:
http://hostname/index.php?r=gii