Contents
CodeIgniter is a lightweight PHP framework that’s quick to learn, which is why it sits behind so many admin systems and business dashboards in the region. It doesn’t need background processes or extra services: a current PHP, a database and three things set up correctly: the .env file, the public folder and permissions on writable.
What CodeIgniter 4 needs in production
| Requirement | Details | On ArabyHost |
|---|---|---|
| PHP | 8.1 or newer for current CodeIgniter 4 releases | PHP 8.1, 8.2 and 8.3 via MultiPHP |
| PHP extensions | intl, mbstring, mysqlnd, plus curl if you use CURLRequest |
Check with php -m |
| Database | MySQL or MariaDB through the MySQLi driver | MySQL/MariaDB |
| Document root | Only public is web-facing; everything else stays outside |
Supported, see below |
| writable folder | cache, logs, session and uploads must be writable |
PHP runs as your account user |
| Command line | php spark migrate and other spark commands |
SSH on AI/Developer plans |
Which plan fits CodeIgniter?
Shared hosting covers most CodeIgniter projects, because the framework doesn’t need a command line to run. Upload the official ZIP build, or your project with vendor already installed, and create the tables by importing an SQL file.
AI/Developer plans are better if you rely on migrations and spark commands, update from GitHub or run scheduled tasks. They include SSH jailed in CageFS, Composer, Git and cron.
Deploying, in short
- Set the domain’s PHP version, ideally 8.3 (how to switch).
- Create a database and user in cPanel.
- Upload the project to a folder outside
public_html, such as/home/USER/ciapp. - Copy the
envfile to.envand set the values:
CI_ENVIRONMENT = production
app.baseURL = 'https://example.com/'
app.indexPage = ''
database.default.hostname = localhost
database.default.database = USER_ci
database.default.username = USER_ciuser
database.default.password = DB_PASSWORD
database.default.DBDriver = MySQLi
- Point the domain at
ciapp/public. For the main domain, copy the contents ofpublicintopublic_htmland fix the Paths line inindex.php:
require FCPATH . '../ciapp/app/Config/Paths.php';
- On AI plans run
php spark migrateover SSH; on other plans import the tables in phpMyAdmin.
The general steps for PHP projects are in the PHP site deployment guide.
Common errors
Whoops! We seem to have hit a snag: the generic production message. The real cause is logged inwritable/logs.- 404 on every page except the home page:
.htaccessis missing frompublic, orindexPageis stillindex.php. Unable to connect to the database: check the host islocalhostand the database and user names start with your account prefix (error 1045).Cache unable to write:writableisn’t writable. 755 on folders is enough here; 777 is never needed (file permissions explained).
What every account includes
- LiteSpeed, which reads the
.htaccessfile CodeIgniter ships with. - Each account isolated in CloudLinux CageFS with its own resource limits.
- Free SSL issued automatically, daily JetBackup backups and Imunify360 security.
- The Araby AI assistant in the panel, which reads the error log and explains the fix, plus support in Arabic.
- Deploys from GitHub, or from Claude and Cursor through Araby MCP.
Limits to know
- PHP 8.1 to 8.3 only, so an old CodeIgniter 3 project on PHP 7 needs updating before the move.
- No root access, no Docker and no per-account Redis. Use files or the database for sessions and cache.
- No SSH on shared hosting, so spark commands need an AI/Developer plan.
- Resources are limited per plan, so split large imports and reports into batches.
On ArabyHost
For a small CodeIgniter project, pick a shared hosting plan on the pricing page. If you work with Composer, Git and spark, choose an AI/Developer plan. If your project lives on another host, ask for free migration.
FAQ
Do I need Composer to run CodeIgniter 4?
No. CodeIgniter 4 also ships as a ZIP with the system folder included, so it runs without Composer. Composer makes updates and extra packages easier, and it's available with SSH on AI/Developer plans.
Why does only the home page work while other pages return 404?
Usually the .htaccess file from the public folder wasn't uploaded, or indexPage is still set to index.php. Upload the file and check app.baseURL in .env.
Does CodeIgniter 3 run on PHP 8?
The last release of the 3.x branch may run on PHP 8.1 with deprecation notices, but it was written for older PHP. Test it first; the long-term fix is moving to CodeIgniter 4.