{"id":18419,"date":"2026-09-29T23:51:12","date_gmt":"2026-09-29T20:51:12","guid":{"rendered":"https:\/\/www.hyyat.com\/knowledgebase\/php-file-encryption-ioncube\/"},"modified":"2026-11-21T09:36:35","modified_gmt":"2026-11-21T06:36:35","password":"","slug":"php-file-encryption-ioncube","status":"publish","type":"docs","link":"https:\/\/www.hyyat.com\/en\/knowledgebase\/php-file-encryption-ioncube\/","title":{"rendered":"PHP File Encryption with ionCube: Encode Your Script and Run It on Your Hosting"},"content":{"rendered":"<div class=\"hkb\" dir=\"ltr\">\n<div class=\"hkb-tldr\"><b>In short<\/b>PHP file encryption with ionCube protects your code by turning it into an encoded format that is hard to read or edit. <b>The script owner does the encoding<\/b> with their own copy of ionCube Encoder, or with the online encoder on the ionCube website. Our part at Hyyat Host is <b>running encoded files<\/b>: ionCube Loader is available on our hosting and is enabled from cPanel. We do not offer a file encoding service on behalf of customers.<\/div>\n<p>Many developers worry that their PHP script will be copied or shared without permission. The best-known way to protect it is to encode the files with ionCube.<\/p>\n<h2>What is ionCube?<\/h2>\n<p>ionCube is a well-known tool for protecting PHP software. It has two parts:<\/p>\n<ul class=\"hkb-list\">\n<li><b>ionCube Encoder:<\/b> a paid program the developer buys. It converts PHP files into an encoded format without the original source code. Depending on the edition, files can be locked to a domain, an IP address or an expiry date.<\/li>\n<li><b>ionCube Loader:<\/b> a free PHP extension installed on the hosting. It reads and runs the encoded files.<\/li>\n<\/ul>\n<h2>How do you encode your files?<\/h2>\n<ol class=\"hkb-steps\">\n<li><b>Choose how to encode:<\/b> buy your own copy of ionCube Encoder from the <a href=\"https:\/\/www.ioncube.com\/\" target=\"_blank\" rel=\"noopener\">official ionCube website<\/a>, or use the online encoder on the same site.<\/li>\n<li><b>Pick the PHP version:<\/b> encode the files for the PHP version the script will run on, because a file encoded for one version may not run on another.<\/li>\n<li><b>Add restrictions if you need them:<\/b> such as locking the script to a customer domain or an expiry date, if your edition supports it.<\/li>\n<li><b>Keep the original copy:<\/b> the source cannot be recovered from encoded files, so store your unencoded copy somewhere safe.<\/li>\n<\/ol>\n<div class=\"hkb-note\"><b>Why don&#8217;t we encode files for you?<\/b> The ionCube Encoder licence requires the licence holder to be the one who benefits from the encoding, and does not allow encoding as a service for others. So encoding is done with your own copy or with the ionCube online encoder.<\/div>\n<h2>Running encoded files on your hosting<\/h2>\n<ol class=\"hkb-steps\">\n<li><b>Log in to cPanel<\/b> and open <b>Select PHP Version<\/b>. For PHP settings, see <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/secure-php-ini-settings\/\">our php.ini guide<\/a>.<\/li>\n<li><b>Check the PHP version<\/b> and choose the one the files were encoded for.<\/li>\n<li><b>Enable the extension<\/b> in the <b>Extensions<\/b> tab, tick <b>ioncube_loader<\/b>. The change saves automatically.<\/li>\n<li><b>Test the script<\/b> open your site and make sure it works.<\/li>\n<\/ol>\n<h2>Common errors and fixes<\/h2>\n<ul class=\"hkb-list\">\n<li><b>A message asking for the ionCube Loader:<\/b> the extension is not enabled. Enable it using the steps above.<\/li>\n<li><b>A message that the file was encoded for another PHP version:<\/b> switch PHP to the matching version, or ask the script owner for a copy encoded for your version.<\/li>\n<li><b>A licence or domain message:<\/b> the script is locked to a domain or a date, and only the script owner can fix it.<\/li>\n<\/ul>\n<p>If you have trouble running an encoded script on our hosting, <a href=\"https:\/\/www.hyyatdomain.com\/submitticket.php\" target=\"_blank\" rel=\"noopener\">open a support ticket<\/a> and we will help you get it working. If you are choosing hosting for your script, compare plans in <a href=\"https:\/\/www.hyyat.com\/en\/which-hosting-is-right-for-you\/\">which hosting suits you<\/a>.<\/p>\n<h2>Frequently asked questions<\/h2>\n<div class=\"hkb-faq\">\n<details>\n<summary>Do you offer a file encoding service?<\/summary>\n<p>No. The ionCube Encoder licence does not allow encoding as a service for others, so the script owner encodes their files with their own copy or the ionCube online encoder. We provide hosting that runs encoded files.<\/p>\n<\/details>\n<details>\n<summary>Do ionCube-encoded files run on Hyyat Host hosting?<\/summary>\n<p>Yes, after you enable the ioncube_loader extension in cPanel and choose the PHP version that matches the encoding.<\/p>\n<\/details>\n<details>\n<summary>Does encoding fully stop code theft?<\/summary>\n<p>It makes the code much harder to read and edit, but no protection is complete. Protect your rights with a clear licence agreement with your customers as well.<\/p>\n<\/details>\n<\/div>\n<div class=\"hkb-rel\"><b>Related guides<\/b><\/p>\n<ul>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/secure-php-ini-settings\/\">Secure php.ini Settings: A Practical Guide for cPanel and CloudLinux<\/a><\/li>\n<\/ul>\n<p><a class=\"hkb-cat\" href=\"https:\/\/www.hyyat.com\/en\/kb\/add-ons-services-to-host\/\">All hosting add-on guides \u2192<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In shortPHP file encryption with ionCube protects your code by turning it into an encoded format that is hard to read or edit. The script owner does the encoding with their own copy of ionCube Encoder, or with the online encoder on the ionCube website. Our part at Hyyat Host is running encoded files: ionCube [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":20127,"comment_status":"open","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"_templately_pack_id":"","_templately_imported_at":"","_templately_source":"","_templately_import_session_id":"","footnotes":""},"doc_category":[2745],"doc_tag":[],"class_list":["post-18419","docs","type-docs","status-publish","has-post-thumbnail","hentry","doc_category-add-ons-services-to-host"],"year_month":"2026-11","word_count":620,"total_views":"4","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"ahmed fathy","author_nicename":"ahmed-fathy","author_url":"https:\/\/www.hyyat.com\/en\/author\/ahmed-fathy\/"},"doc_category_info":[{"term_name":"Hosting Add-ons","term_url":"https:\/\/www.hyyat.com\/en\/kb\/add-ons-services-to-host\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/comments?post=18419"}],"version-history":[{"count":0,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18419\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media\/20127"}],"wp:attachment":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media?parent=18419"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_category?post=18419"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_tag?post=18419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}