How to Install IONCUBR

Hi Team,

i remember on vestacp was easy way to install ioncube how i can install on Hestia?.

Just follow the official installation documentation of ioncube. Hestia isnt that different as a LAMP, you just need to expand your current php installation with ioncube.

Open SSH and open this file

nano /etc/php/7.3/apache2/php.ini

After [PHP] just add this line

zend_extension = /usr/lib/php/20180731/

make sure you put the “” in

and if you’re using whmcs and you need to add zend_extension in all php7.3 php.ini (cli) files and reboot the system.


Update made outside Hestia via CLI may be overrwitten when you will change any settings in panel, in php settings. Better to edit php.ini from panel side in “Configure Server: PHP”

Use “Advanced options” button to edit file and then you can add line with zend_extension

zend_extension = /usr/lib/php/20180731/

It will update php.ini for all versions.

Know issue we will fix it next release…

If your system is the 64-bit version, download the following package:


Unpack the downloaded tar archive:

tar xfz ioncube_loaders_lin_x86-64.tar.gz

Then type this

sudo cp ioncube/ /usr/lib/php/20190902

Open the php.ini file with your favorite text editor:


and add the following line at the top of the file:

zend_extension = “/usr/lib/php/20190902/”

Reboot VPS now

Run the following command

php -v

Then the IonCube Loader is installed and you can see it

IonCube Loader is now active for php 7.4 only

You can also add IonCube Loader to other php versions by editing php.ini if desired.

I have used this for Vestacp and I also use it for Hestiacp without any problem


Hello I installed IonCube successfully but after few days this line: zend_extension = “/usr/lib/php/20190902/” was removed automatically from php.ini files so I had to add it again, any way to fix it ?

1 Like

Hestia doesnt overwrite php.ini, but maybe you did a system upgrade (apt upgrade)? There is usualy a question which asks if you want to overwrite the source php.ini, which is set to no usualy. If you set it to yes, your php.ini will get overwritten.

Ok thanks, I’ll check that

1 Like

Also if you overwrite the settings via /edit/server/php-fpm/ it will overwrite the all php files

There is currently an issue / feature request to split php-fpm per version


thanks that was the issue, I edited settings from that file

Worked perfectly.

Thanks :wink:

Check if it is still the last version there might be a newer version released.

1 Like

Hi @eris. Yes It is. At this moment and past 5 days[15/09/2021]

Always check that you are using the correct UTF-8 keyboard, because it’s very easy to get stuck when doing the famous copy and paste
The only problem I had was on the part of the code configuration make sure you are using { " } and not { ” }

zend_extension = “/usr/lib/php/20190902/”

change it to

zend_extension = "/usr/lib/php/20190902/"


For php 7.4


tar xfz ioncube_loaders_lin_x86-64.tar.gz

php7.4 -i | grep extension_dir

sudo cp ioncube/ /usr/lib/php/20190902

echo ‘’ > /etc/php/7.4/fpm/conf.d/00-ioncube-loader.ini

echo ‘’ > /etc/php/7.4/cli/conf.d/00-ioncube-loader.ini

service php7.4-fpm restart

For php 7.2


tar -xvzf ioncube_loaders_lin_x86-64.tar.gz

php7.2 -i | grep extension_dir

sudo cp ioncube/ /usr/lib/php/20170718

echo ‘’ > /etc/php/7.2/fpm/conf.d/00-ioncube-loader.ini

echo ‘’ > /etc/php/7.2/cli/conf.d/00-ioncube-loader.ini

service php7.2-fpm restart

Bests regards


ioncube is removed when I restart php7.4 from web panel. Then I add lines to php.ini files again. Why restarting removes zend_extension = "/usr/lib/php/20190902/" line?

Restart does not remove any config, this diesnt make any sense. Also please do not revive month old threads, create a new one instead!

1 Like