How to install ionCube Loader

How to install ioncube loader

You can install ioncube to protect your php code against copy, ensuring nobody will be able to crack.

The ionCube Encoder compiles source code to bytecode being able to obfuscate and encrypt compiled code.

Once your PHP application is compiled with ioncube to bytecode, to run it you will have to install the ionCube Loader php extension.

In this post, we will show you how to install the ionCube loader.

Table of Contents

Before you start installing ionCube Loader

First of all,

Don’t put on risk your production environment!
When testing new server configurations, it is highly recommended to work on a “localhost” or “Staging” server.

If you don’t have development WordPress server, signup at wetopi, it’s FREE.

Let’s describe the step-by-step process for a 64bit Linux distribution (e.g. ubuntu 20.04 LTS).

1 Download ionCube Loader

IMPORTANT: if you are running your WordPress on a wetopi server you can jump to step 3. Load the ionCube extension, ionCube Loader is already installed!

Wetopi is a WordPress Specialized Managed Hosting. Want to try?
Sign Up and run your development servers for FREE.

Download the latest release of ionCube Loader at https://www.ioncube.com/loaders.php


Download and extract:

wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xvzf ioncube_loaders_lin_x86-64.tar.gz

2 Add the ionCube Loader php extension

You can find the folder where you have to copy the ioncube loader extension, using this shell command :

php -i | grep extension_dir

And copy your ioncube .so extension inside the folder displayed by the previous command, with php7.4 it should look like:

cd ioncube
cp ioncube_loader_lin_7.4.so /usr/lib/php/20200930

Before restarting the php-fpm process, you have to declare the zend_extension in the php.ini configuration file. The best way to proceed is to create a new .ini file inside the php extension configuration directory. You can find the configuration path with this shell command:

php -i | grep 'additional .ini files'

It will show you the path of the directory for the additional .ini file of the php cli. If you are running php-fpm, the directory will be the same but instead of /etc/php/7.4/cli/, it will begin with /etc/php/7.4/fpm/

3 Load the ionCube extension

To load ionCube we have to declare it as a zend_extension.

If you are running a wetopi specialized WordPress server, open an SFTP connection, this post shows you how to connect with FileZilla, and edit your php.ini file /var/www/conf/php.ini

Locate this block of code and remove the ";" to uncomment the zend_extension line:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ionCube PHP Loader + ionCube24 ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

zend_extension=ioncube_loader.so

On a clean Ubuntu 20.04 install, you can use the following shell command to write the ini file inside the corresponding configuration directory:

# for php-fpm:
echo 'zend_extension=ioncube_loader_lin_7.4.so' > /etc/php/7.4/fpm/conf.d/00-ioncube-loader.ini

# for php-cli:
echo 'zend_extension=ioncube_loader_lin_7.4.so' > /etc/php/7.4/cli/conf.d/00-ioncube-loader.ini

The last step is to reload the php-fpm process to apply the new configuration:

4 Apply the new configuration

If you are running a wetopi specialized WordPress server, You can reload php-fpm with a simple click in your wetopi panel. Go to your site server and click the Reload button you’ll find inside the “Menu Options”:

Reload your server to let php-fpm read the new ioncube loader extension

On an Ubuntu 20.04 install, you can use the standard shell command:

service php7.4-fpm restart

5 Verify ionCube loader is running

You can check if the install was successful with the command php -v, it should output something like:

PHP 7.4.8 (cli) (built: Jul 13 2020 16:46:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.1, Copyright (c) 2002-2020, by ionCube Ltd.
    with Zend OPcache v7.4.8, Copyright (c), by Zend Technologies

We are techies passionate about WordPress. With wetopi, a Managed WordPress Hosting, we want to minimize the friction that every professional faces when working and hosting WordPress projects.

Not a wetopi user?

Free full performance servers for your development and test.
No credit card required.

See how Wetopi stacks up against your current hosting

Migrating sites to us is free and completely effortless on your part.

No hidden small text.
No commitments.
No credit card.

Try before you buy.