Integrating Yii2 with Joomla

Hi all,

I’m simply trying to integrate Yii2 with Joomla 3.0 by following the instructions described in the “Using Yii in Third-Party Systems” section of this page: http://www.yiiframework.com/doc-2.0/guide-tutorial-yii-integration.html

But the instructions seem to be incorrect, so I’m hoping someone can guide me through this…

I am not using the Composer method to install Yii2, I am choosing to use the archive file which is available for download.

I have successfully installed Joomla 3 and is working fine. I have installed Joomla in my ‘www’ directory.

I followed the instructions for installing Yii2 from the Archive file, and this is also working fine (I get the Congratulations page). I have installed Yii2 in ‘www/advanced’ folder.

I am at the step where I must add some code to the Joomla entry script. I believe this is the index.php file in the ‘www’ directory where I installed Joomla. So I opened that file and pasted the code at the beginning of the file as is specified in the instructions.

Here is the code that Yii says to add to the entry script:



require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');


$yiiConfig = require(__DIR__ . '/../config/yii/web.php');

new yii\web\Application($yiiConfig); // Do NOT call run() here


Since I installed Yii2 into a directory called "advanced" I modified the first line to:


require(__DIR__ . '/advanced/vendor/yiisoft/yii2/Yii.php');



I know this is correct because I no longer get an error message saing No such file.

But here is where it gets a bit sketchy – there is no ‘web.php’ file at the location specified (’/…/config/yii/web.php’).

Soooo I did a search in my webroot for ‘web.php’ and 2 file locations came up:

c:\wamp64\www\app\libraries\legacy\web.php

c:\wamp64\www\app\libraries\joomla\application\web.php

Being desperate, I tried using the 2nd file location and tried launching Joomla but a blank page appears with only the following:


<html><head></head><body></body></html>



However there are no error messages…

No idea what to do here, if someone can point me in the right direction it would be very much appreciated!!

web.php is your Yii application config.

Joomla have its own very good framework. I would not recommend you integrate Yii just to have "more" functionality. You can ask me in private message if you want to do something particular in joomla.