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.
The "lean, mean and simple" philosophy has been retained, but the implementation has a lot of differences, compared to CodeIgniter 3.
There is no 12-step checklist for upgrading. Instead, start with a copy of CodeIgniter 4 in a new project folder, however you wish to install and use it, and then convert and integrate your app components. We'll try to point out the most important considerations here.
Not all of the CI3 libraries have been ported or rewritten for CI4! See the threads in the CodeIgniter 4 Roadmap subforum for an uptodate list!
Do read the user guide before embarking on a project conversion!
Downloads
Namespaces
Application Structure
application
and system
folders, with the same interpretation as beforepublic
folder, intended as the document root for your appwritable
folder, to hold cache data, logs, and session dataapplication
folder looks very similar to that for CI3, with some name changes, and some subfolders moved to the writable
folderapplication/core
folder, as we have a different mechanism for extending framework components (see below)Class loading
Services
App
(application) and CodeIgniter
(i.e. system) top level namespaces; with composer autoloading support, and even using educated guessing to find your models and libraries if they are in the right folder even though not namespacedControllers
Request
and Response
objects for you to work with - more powerful than the CI3-wayModels
Entity
class you can build on, for richer data mapping to your database tables$this->load->model(x);
, you would now use $this->x = new X();
, following namespaced conventions for your componentViews
$this->load->view(x);
you can use echo view(x);
Libraries
application\Libraries
, but they don't have to$this->load->library(x);
you can now use $this->x = new X();
, following namespaced conventions for your componentHelpers
Extending the framework
core
folder to hold MY_...
framework component extensions or replacementsMY_x
classes inside your libraries folder to extend or replace CI4 piecesapplication/Config/Services.php
to load your components instead of the default ones