CodeIgniter Forums
Update from C2.1 to C4.1 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 2.x (https://forum.codeigniter.com/forumdisplay.php?fid=18)
+--- Thread: Update from C2.1 to C4.1 (/showthread.php?tid=78987)



Update from C2.1 to C4.1 - Padawa - 04-05-2021

Hello,

I created in 2011 a website based on CI 2 and now it's time for me to review its design and features.
  • Can you give me some tips for updating this website ?
  • Can the months of development spent on version CI 2.1 be reused "easily" for this update or do I have to start from scratch ?
  • Is it possible to switch from version CI 2.1 to version CI 4.1 without going through step CI 3 ?
  • I have not yet looked closely at how the CI 4 version works, but has the principle of the CI 2 version been kept? Will I be "lost" if I watch how the CI 4 version works ?
Thank you in advance for your answers.


RE: Update from C2.1 to C4.1 - Padawa - 04-07-2021

Hello,

Having no response, did I post this topic in the wrong thread?
Is the only solution to start from scratch?

Thank you in advance for your answers


RE: Update from C2.1 to C4.1 - craig - 04-07-2021

Best to start with a fresh install of CI4 and migrate your site's functionality across.

https://codeigniter.com/user_guide/installation/upgrade_4xx.html

Quote:CodeIgniter 4 is a rewrite of the framework and is not backwards compatible. It is more appropriate to think of converting your app, rather than upgrading it. Once you have done that, upgrading from one version of CodeIgniter 4 to the next will be straightforward.



RE: Update from C2.1 to C4.1 - Padawa - 04-07-2021

(04-07-2021, 08:55 AM)craig Wrote: Best to start with a fresh install of CI4 and migrate your site's functionality across.

https://codeigniter.com/user_guide/installation/upgrade_4xx.html

Quote:CodeIgniter 4 is a rewrite of the framework and is not backwards compatible. It is more appropriate to think of converting your app, rather than upgrading it. Once you have done that, upgrading from one version of CodeIgniter 4 to the next will be straightforward.

Thank you for your reply.

But since I'm going from version CI2 to version CI4 directly, that's not going to be a problem?
The link talks about updating version CI3 to CI4, not version CI2 to CI4  Sad


RE: Update from C2.1 to C4.1 - craig - 04-07-2021

CI2 is even further away from CI4 than what CI3 is, so the same still applies. CI4 is not backwards-compatible with CI2 either Big Grin


RE: Update from C2.1 to C4.1 - Padawa - 04-07-2021

So I feel that nights are going to be very short for the next few weeks!  Wink


RE: Update from C2.1 to C4.1 - John_Betong - 04-07-2021

@Padawa,
> So I feel that nights are going to be very short for the next few weeks! Wink

I hope it is an enjoyable experienceSmile

I would be tempted to start with a copy of the “welcome_message”, modify and create your own “home page”. Once complete add your menu structure and create relevant links to blank pages.

Afterwards all you have to do is fill in the content Smile

Let us know your progress.