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.6 or above. View the following article for instructions on how to choose a version of PHP:

ionCube loader and PHP 7.0

ionCube Loader will currently not function with sites running PHP 7.0 at DreamHost.

PHP 7.0 has also been EOL'd by php.net. For security purposes, you should update your site to run on PHP 7.1, 7.2, or 7.3.

ionCube loader and PHP 7.4

As of Feb 2020, the ioncube loader for PHP 7.4 has not been released. You can track updates here:

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 user's 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 https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
[server]$ tar -zxvf ioncube_loaders_lin_x86-64.tar.gz -C $HOME
[server]$ rm ioncube_loaders_lin_x86-64.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.6 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. View the following articles for instructions on how to edit a file:

    This example uses PHP 7.2. Make sure to change the version number to the PHP version you're using. Also make sure to replace 'username' with your actual shell username.

    zend_extension = /home/username/ioncube/ioncube_loader_lin_7.2.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.

Confirming it's loaded

You can now confirm if ionCube is loaded by viewing your phpinfo.php file. You will see the following:

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

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?