How to Speed Up CodeIgniter App?

We can improve Codeigniter application speed with simple tactics. I will show very simple steps, which will improve your CI app speed.

Enable Gzip Compression

Go to application/config/config.php, Then Enable Gzip compression by setting compress_output value to TRUE in ci config array.

Enable full page Cache

We can Enable full page Cache to entire Controller by calling $this->output->cache(30); in the controller constructor, or we enable it in function level by calling with in the method.

Full page Cache system create a Cached version of the HTML page in cache folder,

Cache folder should be writable by the web server

Enable HTML output Compress

we gonna use CodeIgniter Hooks to minify HTML output, go to application/hooks/ create a file called compress.php, copy past the below code.

till now we have created a hook function, now we have to declare it hooks config go to application/config/hook.php

The final step is going to application/config/config.php file, in the config array, enable hooks.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 votes
Article Rating
Notify of
Newest Most Voted
Inline Feedbacks
View all comments
Arun Verma
Arun Verma
5 years ago

Thanks Arjun……….

it’s work like charms……..

I have used on

Iago Cavalcante
Iago Cavalcante
4 years ago

Nice, it’s work for me ;).
Thanks; Protection Status
Would love your thoughts, please comment.x