How I upgraded from CI3 to CI4 |
I have created a few new CI4 projects, become a lot more familiar with the system and decided try an upgrade...
I have a really old project which dates back over ten years, uses CI3 and has been neglected for a very long time. The project is basically a landing page with a static page containing a menu and some blurb. The menu calls numerous blogs (different authors) and three stories, some with over a hundred pages. MysSqli is used to store the blogs and stories. The Plan: 1. Rename both localhost and online folders from the old project.com to project-ci3.com 2. Create a new project.com mkdir /var/www/project.com 3. Download latest CI4 project to my http://localhost/ folder : git clone https://github.com/codeigniter4/CodeIgniter4.git 4. Copy the following files and folders to project.com CodeIgniter4/app CodeIgniter4/public CodeIgniter4/system CodeIgniter4/writable CodeIgniter4/env 5. Copy following folder (required by my operating system) CodeIgniter4/public ==> project/public_html 6. Copy following files from project-ci3.com/ to project.com/ project-ci3/app/Controllers/*.* project-ci3/app/Libraries/*.* project-ci3/app/Models/*.* project-ci3/app/Views/*.* (do not overwrite any existing files such as welcome_message.php) 7. Create quick RSYNC.txt update file with content: TOUCH /var/www/project.com/RSYNC.txt rsync -avz /var/www/project.com/ -e ssh [email protected]:/var/www/project.com/ synchronise localhost and online folders 8. Test http://localhost/project/public_html and get it to render "welcome_message.php". Modifications to files: There were a lot of redundant Controllers and Models I only have a simple editor and decided to: 1. "echo __file__;die;" to all Controllers and Models 2. modify app/Config/Routes.php and test each routing one at a time. After the "welcome_message.php" was rendered I continued until I rendered the landing page menu then preceded to call the each menu item and clear bugs wherever they appeared. I found that it seems a lot easier to create a new project rather than update an existing project I'm curious to know any other tips or trips to update projects. |
Messages In This Thread |
How I upgraded from CI3 to CI4 - by John_Betong - 09-24-2020, 07:27 AM
RE: How I upgraded from CI3 to CI4 - by InsiteFX - 09-24-2020, 02:25 PM
RE: How I upgraded from CI3 to CI4 - by John_Betong - 09-27-2020, 11:49 PM
|