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.

Support for PHP 8

ionCube Loader does not currently support PHP 8. View the following link for further updates.

Step 1 — Confirm 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:


Visit your phpinfo.php file in a browser. Your PHP version displays at the top. You will need to use the specific ionCube file below for this version of PHP.

Step 2 — Download the ionCube loader files

You can download these files via FTP or SSH.

Downloading via FTP

  1. Visit the download ionCube page.
  2. Click the zip link next to the Linux (64 bits) option.
  3. On your computer, navigate to the /downloads directory, or wherever you just downloaded the file.
  4. Extract the zip file. In Windows, right-click and choose Extract All.... This extracts the files into a new folder named ioncube.
  5. Connect to your domain via FTP.
  6. In the left pane (your computer), navigate to the directory you just extracted the files into.
  7. In the right pane (your server), 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.
  8. In this same directory, create a new directory named ioncube.
  9. Navigate into this new /home/username/ioncube directory.
  10. Upload the ioncube_loader_lin_7.#.so file from your computer into this directory.

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:


Step 3 — Install ionCube loader

These steps tell your site to use the ionCube file you just downloaded.

  1. While logged into your server via FTP or SSH, navigate to the /home/username/.php/php7.# directory. Make sure to navigate into the same number directory as your PHP version above.
  2. Edit the phprc file on your server to add the following line to it. View the following articles for instructions on how to edit a file:

    This example uses PHP 7.4. Make sure to make the following changes:

    • Change the version number to the PHP version you're using
    • Replace username with your actual shell username
    • Add the following line under the DreamHost code ending with ; }}} That's all from DreamHost
    zend_extension = /home/username/ioncube/ioncube_loader_lin_7.4.so
  3. Save this file.
  4. Kill off all PHP processes to complete the installation:

Step 4 — Confirm 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 the following:

The ionCube Encoder compiles sourcecode to bytecode, can obfuscate and encrypt compiled code if desired, and has features to protect decryption keys in various ways, including a unique approach of algorithmic non-stored keys we call Dynamic Keys.

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 with WordPress, 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?