Codeigniter Installation (from Windows 10 to Online server)

1) Go to codeiginiter.com and install latest version of codeigniter.
2) Download and install XAMPP
3) Download and install Atom
4) Run Xampp’s Apache server
5) In Atom, install command line package
6) In Atom, install ‘Script’ package.
7) Run composer installation commands in Atom from:
https://codeigniter4.github.io/userguide/installation/installing_composer.html
(If you get error php is not recognized, do following:
In you system (Windows 10) , search and right click on ‘This PC’, click properties.
Search ‘Edit the system environment variables’.
In advanced tab, click on ‘Environment variables’ button. Click ‘New’ and add PHP.exe file path. Add path of PHP file: C/XAMPP/PHP/PHP.exe
After that close atom and open it again. And try running composer installation commands again.)
8) Run Codeigniter installation from:
https://codeigniter4.github.io/userguide/tutorial/index.html
It will make codeigniter run on browser by typing address localhost:8080/
9) If you are moving it to server, create zip file of all these files and upload zip file on host and extract it.
11) Index file is in Public folder. So in root directory, there is need to give path in .htdocs file, add this line at bottom to point to that file:

DirectoryIndex /public/index.php

(Any errors can be seen in public/error_log text file.)

12) In /app/Config/App.php file, add public $baseURL = ‘https://yourwebsitename.com/’
It will make the website run on your website domain name.

(If it shows 500 error, upgrade latest version of PHP on server for this domain.)
13) Create a new database on server and in database.php file, you can enter database login details.

14) Further detailed steps on working on codeigniter can be read further here: https://codeigniter.com/user_guide/tutorial/index.html

15) When adding multiple pages on live server, there is need to add this code on top of .htdocs file, in root directory:

RewriteEngine On

RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]

RewriteRule ^((?!public/).*)$ public/$1 [L,NC]

Codeigniter coding tutorial: https://codeigniter.com/user_guide/tutorial/index.html

Watch a demo project created in Codeigniter. Contact for tasks in Codeigniter.