Install ioncube loader for PHP

Last updated on May 26th, 2023 at 08:56 pm.

Install ioncube loader for PHP

Download Ioncube loader and unpack it inside the tmp directory as follows:

For 64Bit x86_64 Linux:

cd /tmp && \
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz && \
tar xfz ioncube_loaders_lin_x86-64.tar.gz

# For 32Bit i386 Linux:

cd /tmp && \
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz && \
tar xfz ioncube_loaders_lin_x86.tar.gz

Find out your PHP extension directory

php -i | grep extension_dir

Copy the ioncube .so file to the directory from above. Copy the ioncube loader that goes with your PHP version. In the example below, we are copying it for PHP 8.1.

cp /tmp/ioncube/ioncube_loader_lin_8.1.so /usr/lib/php/20210902

Check which PHP ini is loaded in your system:

/usr/local/bin/php --ini | grep 'Loaded Configuration File'

#Or

/usr/bin/php --ini | grep 'Loaded Configuration File'

Add ioncube path in php ini.

sudo vi /etc/php/8.1/fpm/php.ini
# Add this line
# zend_extension = /usr/lib/php/20210902/ioncube_loader_lin_8.1.so

Comment Here

Join this free course:

How to host multiple WordPress
websites on a VPS

Close me!