Tips on migrating an existing site to yii incrementally, script by script?


Are there any articles around on how to migrate an existing php site over to the yii framework incrementally, script by script? Below I have found links on how one might do this using other major PHP frameworks:

Zend Framework: http:/ /

CodeIgniter: http:/ /

<I had to break the links b/c apparently I am not allowed to post them b/c this is my first post :( />

I have used Google and searched this forum but have not found anything like the above articles for Yii. Does anyone know if anything like this exists?

Edit: If you know this framework well and think that migrating a site incrementally to it is too much of a pain (only a complete rewrite will do), I’d appreciate you letting me know as well. I am looking to transition my native php website to an existing framework.

Having an existing site and migrating it to a php framework will always be a pain.

But having in mind that you already have the database and website structure, you need to take that code and integrate it into Yii, that’s not a complete rewrite.

So, if i were you, i would create models from all my database tables, then take each functionality of the website and think how i would do it in Yii, then just do it.

Basically you have to move parts of the code into the controller and re-format your views.

Of course during the process, i would stop a bit and see if Yii has some goodies for what i need, for example, if you have to use UI widgets, just use what Yii provides, if you need to clean the input just use what yii provides, etc etc.

As i said, there is no easy way for doing this, and it really comes down to your understanding about Yii and about your current project, if you know them both well, then you will have absolutely no problem and everything will go smooth, otherwise, you will have to stop from time to time to drink a bit of Yii documentation :)

I am sure i told you what you’ve already suspected :)


If you go this road, DON’T mess up the existing site with the Yii one, like writing small parts of your website into Yii and have them live for the users to play with. Just develop it separately and when you are done, move it over.

I have a question, can a magento store shopping cart website based on zend framework be migrated into a new Yii framework website instead of using zend?