Enabling ionCube Loader

ionCube Loader is a PHP extension that works to decode PHP scripts previously encoded by the ionCube PHP Encoder package.

The following information is provided as a guide for installing the ionCube loader needed to run PHP files encoded with ionCube on DreamHost servers.

In order to install ionCube Loader on a DreamHost account, please make sure your site is running on PHP 5.5 or above. PHP 5.6 is currently recommended. View the following article for instructions on how to choose a version of PHP:

It's highly recommended that you upgrade to the latest version of PHP as DreamHost will soon officially EOL PHP version 5.5. Please visit the following pages to view information on how to update to the latest PHP version:

Checking the version of PHP your site uses

Even after you have set the PHP version in your panel, you should still check to confirm that version is the one running on your site. You can easily do this by creating a file named phpinfo.php in your website’s directory with the following code:


Checking which version of ionCube loader you need

  1. Visit your phpinfo.php file in a browser.
  2. Check which version of the ionCube loader package for Linux you need to use by inspecting the first section of the output of the phpinfo.php file you just added.
  3. When you view that file in a browser, look at the ‘System’ section.
    For example, consider the following phpinfo() output:
    System Linux wowbagger 3.2.61-grsec-modsign #1 SMP Tue Aug 12 09:58:26 UTC 2014 x86_64
    • In this example, the "x86_64" following the time stamp information indicates you would need the "x86-64" version of the ionCube loader package.

Downloading ionCube loader

This guide assumes you're installing an "x86" version of the loader package, and that you are installing ionCube into /home/username/ioncube. Visit the ionCube Loaders download page for any other specific version you may need.

Downloading via FTP

  1. Use one of the links below to download the Ioncube loader file that matches your PHP version.
  2. Connect to your domain via FTP.
  3. Navigate to your users directory under /home/<username>/. This is identifiable by looking for the /logs and /Maildir folders. View the FTP article for details.
  4. In this same directory, create a new directory named 'ioncube'.
  5. Navigate into this new /ioncube folder.
  6. Upload the .so file here.

Downloading via SSH

  1. Log into your server via SSH.
  2. Once logged in, run the following commands in order:
[server]$ cd ~
[server]$ mkdir ioncube
[server]$ cd ioncube
[server]$ wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_5.1.2.tar.gz
[server]$ tar -zxvf ioncube_loaders_lin_x86-64_5.1.2.tar.gz -C $HOME
[server]$ rm ioncube_loaders_lin_x86-64_5.1.2.tar.gz

You now have several files in your /home/username/ioncube directory and they appear as the following:


Installing ionCube loader

If you have configured your fully hosted domain with PHP 5.5 or above and FastCGI, the installation is very simple.

  1. Create a phprc file using an FTP client or SSH.
  2. Once the 'phprc' file has been created, add the following directive to it. Make sure to replace 'username' with your actual shell username:
    zend_extension = /home/username/ioncube/ioncube_loader_lin_5.5.so
  3. Confirm that the directive is on only one line, and the first line, in the phprc file.
  4. Save this file.
  5. Kill off all PHP processes to complete the installation:
  6. To test it, copy the loader-wizard.php file from the /home/username/ioncube directory to a public place in your domain’s web directory.
  7. Load that file in a browser.
  8. Answer the questions about "shared hosting" and it should successfully report that ionCube is installed.
  9. Remove the loader-wizard.php file for security reasons.

If you have problems, check the ionCube Forum.

Can I use IonCube Loader with DreamPress?

ionCube Loader is not supported with DreamPress. ionCube's website states that it's purpose is to "makes it easy to protect PHP source code from easy observation, theft and change by compiling to bytecode." Since the WordPress software is open source, there is never a reason to use ionCube Loader to hide your code.

If you absolutely require ionCube, the only options are to downgrade to a VPS or Shared hosting plan.

See also