Overview
This article walks you through installing the ionCube loader PHP extension to run PHP files previously encoded by the ionCube PHP Encoder package.
DreamPress plans
ionCube Loader is not supported with DreamPress. If you require ionCube with WordPress, the only option is to downgrade to a VPS or Shared hosting plan.
How to install ionCube Loader
The following steps explain how to download, install, and activate ionCube Loader on your website.
Confirming the PHP version of your site
Confirm the version of PHP currently running on your site by creating a file named phpinfo.php in your website's directory.
When you visit your phpinfo.php file in a browser, the PHP version displays at the top. You will need to use the specific ionCube file below for this version of PHP.
The following instructions use PHP 8.3. Make sure to change this to the version your website is using.
Downloading and uploading the ionCube loader files
You have two options to download ionCube files.
- Download in a browser and upload them to your server via FTP.
- (Advanced) Download and extract the files via SSH on your DreamHost server.
-
- Visit the download ionCube page.
- Click the zip link next to the Linux (64 bits) option.
- On your computer, navigate to the location you downloaded the file. This is usually the /downloads directory.
- 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.
- Connect to your domain via FTP.
- In the left pane (your computer), navigate to the directory you just extracted the files into.
- In the right pane (your server), navigate to your user's directory under /home/username. View the FTP article for details.
- In this same directory, create a new directory named ioncube.
- Navigate into this new /home/username/ioncube directory.
- Upload the ioncube_loader_lin_8.3.so file from your computer into this directory.
- Visit the download ionCube page.
Option 2 — Download and extract via SSH
-
- Log into your server via SSH.
- 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
- List all files.
[server]$ ls -la
ioncube_loader_lin_8.3.so
Activating ionCube loader
This step activates ionCube on your website by adding a line to your phprc file.
Make sure to add the following line to the top of the phprc file.
Your site may throw a 500 error if you place this code anywhere else.
- Navigate to the /home/username/.php/#.# directory.
- Make sure to navigate into the same number directory as your site's PHP version above.
- Edit the phprc file on your server to add the following line using FTP or SSH.
zend_extension = /home/username/ioncube/ioncube_loader_lin_8.3.so
- After saving your changes, kill off all PHP processes to complete the installation.
Confirming it's loaded
Confirm that ionCube is loaded by navigating to your website and viewing your phpinfo.php file. You will see the following: