Deploying Codeigniter project from local to live server

Posted on November 5, 2018 by Suresh Kamrushi in Mysql, PHP

Here I am sharing how you can deploy your Codeigniter project to production server using cPanel. For making it live you need to purchase domain and hosting space from provider like Godaddy, bigrock or hostgator. Once you purchase you can deploy your project using cPanel.
Deployment can be devided in two major parts as Database and File deployment.

Database deployment
Step 1: Login to cPanel of your hosting provider.
Step 2: Look for “Mysql Database” link under “Database” section and click it to create one.
creating Database
Step 3: Now you need to create new user for the Database
add_user
Step 4: Assign user created to database.
add_user_to_DB
Step 5: Look for “Phpmyadmin” under Database section and click on it.
phpmyadmin
Step 6: After navigating to PHPmyAdmin dump tables inside database you have created.

Files & Folder Deployment
Step 1: In cPanel look for “File Manager” under “Files” Section. By Clicking you will navigate to the page where you can upload your files and folders.
file-manager
Step 2: Make sure that you are in “public_html” folder, on “File Manager” page. Now look for Upload link and click on it.
cPanel
Step 3: Now zip your local code and upload it and provide permissions.
file_upload
Step 4: After uploading is completed come back to file manager. You can see your zip folder in file listing. Right click on folder and select the extract to unzip.
unzip_folder
Step 5: Now you can update your “.htaccess” and other config files like, database.php (update the database name, DB username and DB password you created in Step 2 & 3 in database section) and config.php with path details.
update-htaccess-file

Hope It will help someone!!!!

  Comments or questions are welcome