How to Install Ioncube for DevKinsta

I’m getting the following when I try to access my local dev site;

Site error: the ionCube PHP Loader needs to be installed. This is a widely used PHP extension for running ionCube protected PHP code, website security and malware blocking. Please visit get-loader.ioncube.com for install assistance.

Is this something I should just install outside of DevKinsta? (I’m using macOS)

Welcome to DevKinsta @klikkit ! I’m happy to help. Would you mind providing a screenshot of the message you’re seeing? Is that a plugin that’s requiring ionCube?

Hi Michael, please see attached;

And yes, I have a number of plugins that depend on it

Sorry for the wait here @klikkit . I’ve worked on a guide below to help install Ioncube. Please note we have not fully tested the following guide. Make any necessary backups of your work before continuing. At this time it’s a manual process. If you’re interested, you can request for this to be added to DevKinsta in our Feature Request section as well.

  1. Open up Terminal
  2. Enter docker exec -it devkinsta_fpm bash this should bring you inside the Docker container.
  3. Enter apt-get update && apt-get upgrade. Type Y if it asks if you’d like to continue. This may take some time.
  4. Enter apt-get install wget
  5. Enter wget -P /tmp/ http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz && tar xvfz /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp
  6. Enter mkdir -p /usr/lib/php/ioncube/ && cp /tmp/ioncube/ioncube_loader_lin_*.so /usr/lib/php/ioncube/
  7. The next file to edit will depend on which PHP version you’re running. Enter php -v to check on that or you can open DevKinsta then click on your site to see which PHP version it’s running. In the following example, it’s going to apply for PHP 7.4. echo 'zend_extension = /usr/lib/php/ioncube/ioncube_loader_lin_7.4.so' >> /etc/php/7.4/fpm/php.ini. If you change PHP versions, be sure to implement this on the other version as well.
  8. Confirm that it has been added by entering cat /etc/php/7.4/fpm/php.ini. You’ll see the ioncube line added in the bottom.
  9. Enter exit then docker restart devkinsta_fpm to restart the container. phpinfo can help confirm that Ioncube has been installed.

That should be it! Let me know if you have any questions on this.

Hi Michael,

I’ve made these changes and now when I attempt to preview the local version of my site in DevKinsta, it loads in the browser for a moment before directing to the live site.

Is this a known issue?

I suspect what’s occurring there is that there’s a redirect occurring within the site itself. Be sure to check in the database and if there are any redirection plugins that could be redirecting it to the live site. Also check the wp-config.php file to ensure it uses the new domain rather than the live site.

We haven’t heard back from you on this topic in a while. However, if you do need further assistance you can simply create a new topic on the forum. Thank you again for using DevKinsta. Let us know if you need further assistance! :wave: