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.

The instructions in this article use PHP 8.2.


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 in a browser

  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 location you downloaded the file. This is usually the /downloads directory.
  4. Extract the zip file.
    • Windows: right-click and choose Extract All.... This extracts the files into a new folder named ioncube.
    • Mac: double click the file to automatically extract the files into a new folder.
  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_8.2.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]$ 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 that appear like this:


Step 3 — Activate ionCube loader

This step activates ionCube on your website by adding a line to your phprc file.


Add the following line to the top of the phprc file.

Your site will throw a 500 error if you place this code anywhere else.

  1. While logged into your server via FTP or SSH, navigate to the /home/username/.php/#.# directory.
    Make sure to navigate into the same number directory as your site's PHP version above.
  2. Edit the phprc file on your server to add the following line using FTP or SSH.

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

    zend_extension = /home/username/ioncube/ioncube_loader_lin_8.2.so
  3. After saving your changes, kill off all PHP processes to complete the installation:

Step 4 — Confirm it's loaded

Confirm that ionCube is loaded by navigating to your website and 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?