{"id":760,"date":"2021-07-08T06:30:08","date_gmt":"2021-07-08T11:30:08","guid":{"rendered":"https:\/\/www.knownhost.com\/kb\/?p=760"},"modified":"2026-01-23T14:57:31","modified_gmt":"2026-01-23T20:57:31","slug":"php-opcode-cache-install-guide","status":"publish","type":"post","link":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/","title":{"rendered":"PHP OPcode Cache Install Guide"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #212121;color:#212121\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #212121;color:#212121\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#overview\" >Overview<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#zend_opcache\" >Zend OPcache<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#how_to_check_if_zend_opcache_is_installed_or_not\" >How to check if Zend OPcache is installed or not<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#installation_and_configuration_of_zend_opcache_on_easyapache_3\" >Installation and configuration of Zend OPcache on EasyApache 3<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#installation_and_configuration_of_zend_opcache_on_easyapache_4\" >Installation and configuration of Zend OPcache on EasyApache 4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#zend_opcache_configuration\" >Zend OPcache configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#opcache-gui\" >opcache-gui<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#apcu\" >APCu<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#installation_on_easyapache_3\" >Installation on EasyApache 3<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#installation_on_easyapache_4\" >Installation on EasyApache 4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#using_apcu\" >Using APCu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#monitoring_apcu\" >Monitoring APCu<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"overview\"><\/span>Overview<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Each time when PHP script executes on the server it goes through the following stages: tokenizing, parsing, compilation, and interpretation. PHP opcode caching allows skipping the first 3 stages by storing pre-compiled scripts in shared memory and reusing them. This significantly increases the performance of running PHP scripts. \u2029<\/p>\n\n\n\n<p>It is important to know that opcode cache works only with certain types of PHP handlers. Among those available in cPanel handlers it works with: * DSO (mod_php) * fcgid * PHP-FPM<\/p>\n\n\n\n<p>\u2029Opcode cache DOES NOT work with following handlers: * SUPHP * CGI<\/p>\n\n\n\n<p>\u2029There were historically several implementations of opcode cache available for cPanel: * APC * APCu * eAccelerator * xCache * Zend OPcache<\/p>\n\n\n\n<p>\u2029In latest PHP versions only Zend OPcache and APCu are supported.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"zend_opcache\"><\/span>Zend OPcache<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Zend OPcache caches only opcode. \u2029<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"how_to_check_if_zend_opcache_is_installed_or_not\"><span class=\"ez-toc-section\" id=\"how_to_check_if_zend_opcache_is_installed_or_not\"><\/span>How to check if Zend OPcache is installed or not<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Run the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  php -v\u2029<\/code><\/pre>\n\n\n\n<p>If EasyApache3 is used, the output will show you for sure whether OPcache is used. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  # php -v\n  PHP 5.6.36 (cli) (built: May 29 2018 01:54:47)\n  Copyright (c) 1997-2016 The PHP Group\n  Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com \n  (unconfigured) v6.1.0 (), Copyright (c) 2002-2017, by ionCube Ltd.with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies<\/code><\/pre>\n\n\n\n<p>However, if EasyApache 4 is being used and several PHP versions are installed, &#8216;php -v&#8217; command displays only default PHP version. You could run the following command to see installed opcache modules:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  yum list -q installed ea-php*opcache<\/code><\/pre>\n\n\n\n<p>If the result is empty then no opcache modules are installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"installation_and_configuration_of_zend_opcache_on_easyapache_3\"><\/span>Installation and configuration of Zend OPcache on EasyApache 3<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>EasyApache 3 requires rebuilding to add\/remove modules. Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/scripts\/easyapache<\/code><\/pre>\n\n\n\n<p>Then follow the menu, enter &#8220;Customize Profile&#8221; section, find &#8220;Zend Opcode caching extension&#8221; entry in Exhaustive Options List, select it, then save configuration and start rebuilding process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"installation_and_configuration_of_zend_opcache_on_easyapache_4\"><\/span>Installation and configuration of Zend OPcache on EasyApache 4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>EasyApache 4 moved to RPM-based model and does not require entire rebuilding each time when you need add or remove a module. It is managed by running yum command. For example, if you need to install opcache module for PHP 7.0, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  yum install -y -q ea-php70-php-opcache<\/code><\/pre>\n\n\n\n<p>\u2029In WHM interface opcache module could be added from (Home \u00bb Software \u00bb EasyApache 4). Click on &#8220;Customize&#8221; button, enable opcache module on &#8220;PHP extensions&#8221; sections, and apply the changes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"800\" height=\"444\" src=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache.jpg\" alt=\"\" class=\"wp-image-767\" srcset=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache.jpg 800w, https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache-300x167.jpg 300w, https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache-768x426.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"zend_opcache_configuration\"><\/span>Zend OPcache configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>In EasyApache 3 all PHP settings including opcache parameters are located in one configuration file. In EasyApache 4 each module has its own configuration file for each installed PHP version. By running &#8216;php \u2013ini&#8217; you can find out the location of that file. For example, in EasyApache 4 and PHP 5.6 it would be:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/opt\/cpanel\/ea-php56\/root\/etc\/php.d\/opcache.ini<\/code><\/pre>\n\n\n\n<p>Here&#8217;s default settings:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  # grep opcache \/opt\/cpanel\/ea-php56\/root\/etc\/php.d\/opcache.ini\n  zend_extension=opcache.so\n  opcache.enable=1\n  ;opcache.enable_cli=0\n  opcache.memory_consumption=128opcache.interned_strings_buffer=8\n  opcache.max_accelerated_files=4000\n  ;opcache.max_wasted_percentage=5\n  ;opcache.use_cwd=1\n  ;opcache.validate_timestamps=1\n  ;opcache.revalidate_freq=2\n  ;opcache.revalidate_path=0\n  ;opcache.save_comments=1\n  ;opcache.load_comments=1\n  opcache.fast_shutdown=1\n  ;opcache.enable_file_override=0\n  ;opcache.optimization_level=0xffffffff\n  ;opcache.inherited_hack=1\n  ;opcache.dups_fix=0\n  opcache.blacklist_filename=\/opt\/cpanel\/ea-php56\/root\/etc\/php.d\/opcache*.blacklist\n  ;opcache.max_file_size=0\n  ;opcache.consistency_checks=0\n  ;opcache.force_restart_timeout=180\n  ;opcache.error_log=\n  ;opcache.log_verbosity_level=1\n  ;opcache.preferred_memory_model=\n  ;opcache.protect_memory=0\n  opcache.validate_permission=1<\/code><\/pre>\n\n\n\n<p>\u2029You can see that by default OPcache is enabled but disabled for CLI version of PHP. You could also notice that validate_permission is turned on which is important in shared environments. \u2029Detailed description for each parameter is available at: *&nbsp;<a href=\"http:\/\/php.net\/manual\/en\/opcache.configuration.php\">php.net\/manual\/en\/opcache.configuration.php<\/a><\/p>\n\n\n\n<p>\u2029To view the current settings you can also run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  php -i|grep ^opcache<\/code><\/pre>\n\n\n\n<p>\u2029Or for non-default PHP version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  scl enable ea-php70 'php -i|grep ^opcache'<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"opcache-gui\"><\/span>opcache-gui<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This is a useful tool for monitoring OPcache performance. The site of the project:&nbsp;<a href=\"https:\/\/github.com\/amnuts\/opcache-gui\">GitHub Link<\/a><\/p>\n\n\n\n<p>\u2029Just copy the file index.php (of course with renaming it to, for instance, opcache.php) to site&#8217;s root directory and open in the browser.\u2029<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"800\" height=\"426\" src=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_gui.jpg\" alt=\"\" class=\"wp-image-768\" srcset=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_gui.jpg 800w, https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_gui-300x160.jpg 300w, https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_gui-768x409.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"apcu\"><\/span>APCu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>APC User Cache. Does not cache actual opcode like Zend OPcache and APC. Instead, it caches user data which allows it to run alongside Zend OPcache. \u2029Source code of the project is located at: *&nbsp;<a href=\"https:\/\/pecl.php.net\/package\/APCu\">pecl.php.net\/package\/APCu<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"installation_on_easyapache_3\"><\/span>Installation on EasyApache 3<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Also performed via PECL, for example<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  pecl install channel:\/\/pecl.php.net\/APCu-4.0.11<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"installation_on_easyapache_4\"><\/span>Installation on EasyApache 4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>You can install APCu for particular PHP version in EA4 using following example<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/opt\/cpanel\/ea-php70\/root\/usr\/bin\/pecl install channel:\/\/pecl.php.net\/APCu-5.1.11<\/code><\/pre>\n\n\n\n<p>\u2029 APCu version 5.X requires PHP 7.0+ to run while version 4.X could be installed on PHP 5.5 and 5.6.<\/p>\n\n\n\n<p>\u2029To check APCu module run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  #scl enable ea-php70 'php -m|grep apc'\n  apcu<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"using_apcu\"><\/span>Using APCu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Since APCu caches only user data, its usage should be implemented in code (instead of opcode caching which is ready to go after installation). There are plugins for&nbsp;CMS&nbsp;like WordPress which allow easily to get apcu running. For example, APCu Object Cache Backend plugin. Install it from available plugins in WordPress panel. Then move php script inside document root:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  mv wp-content\/plugins\/apcu\/object-cache.php wp-content\/object-cache.php<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"monitoring_apcu\"><\/span>Monitoring APCu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>There&#8217;re several well-known scripts which use function apcu_cache_info() to monitor cache usage. An example of such tool is described at:&nbsp;anavarre.net\/how-to-monitor-and-tune-apcu\/<\/p>\n\n\n\n<p>\u2029Download the php script&nbsp;<a href=\"https:\/\/raw.githubusercontent.com\/krakjoe\/apcu\/master\/apc.php\">in site&#8217;s document root<\/a>. Then open it in a browser and you could see the current cache usage.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"800\" height=\"526\" src=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/apcu.jpg\" alt=\"\" class=\"wp-image-769\" srcset=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/apcu.jpg 800w, https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/apcu-300x197.jpg 300w, https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/apcu-768x505.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Overview Each time when PHP script executes on the server it goes through the following stages: tokenizing, parsing, compilation, and interpretation. PHP opcode caching allows skipping the first 3 stages by storing pre-compiled scripts in shared memory and reusing them. This significantly increases the performance of running PHP scripts. \u2029 It is important to know [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[200,109,143,123,199,198,125],"class_list":["post-760","post","type-post","status-publish","format-standard","hentry","category-guides","tag-apcu","tag-cpanel","tag-dedicated","tag-linux","tag-opcache","tag-php","tag-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP OPcode Cache Install Guide - KnownHost<\/title>\n<meta name=\"description\" content=\"Are you looking for a simple guide on OPcode cache in your php website? Look no further as we walk you through on how to set it up on KnownHost server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP OPcode Cache Install Guide - KnownHost\" \/>\n<meta property=\"og:description\" content=\"Are you looking for a simple guide on OPcode cache in your php website? Look no further as we walk you through on how to set it up on KnownHost server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"KnownHost\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-08T11:30:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-23T20:57:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"444\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jonathan K. W.\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jonathan K. W.\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/\"},\"author\":{\"name\":\"Jonathan K. W.\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/3db6e20d1f33519cd68fe0ba1230a48b\"},\"headline\":\"PHP OPcode Cache Install Guide\",\"datePublished\":\"2021-07-08T11:30:08+00:00\",\"dateModified\":\"2026-01-23T20:57:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/\"},\"wordCount\":681,\"image\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/opcache_whm_add_opcache.jpg\",\"keywords\":[\"apcu\",\"cpanel\",\"dedicated\",\"linux\",\"opcache\",\"php\",\"vps\"],\"articleSection\":[\"Guides\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/\",\"url\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/\",\"name\":\"PHP OPcode Cache Install Guide - KnownHost\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/opcache_whm_add_opcache.jpg\",\"datePublished\":\"2021-07-08T11:30:08+00:00\",\"dateModified\":\"2026-01-23T20:57:31+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/3db6e20d1f33519cd68fe0ba1230a48b\"},\"description\":\"Are you looking for a simple guide on OPcode cache in your php website? Look no further as we walk you through on how to set it up on KnownHost server.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/opcache_whm_add_opcache.jpg\",\"contentUrl\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/opcache_whm_add_opcache.jpg\",\"width\":800,\"height\":444},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/php-opcode-cache-install-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP OPcode Cache Install Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/\",\"name\":\"KnownHost\",\"description\":\"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/3db6e20d1f33519cd68fe0ba1230a48b\",\"name\":\"Jonathan K. W.\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g\",\"caption\":\"Jonathan K. W.\"},\"sameAs\":[\"https:\\\/\\\/www.knownhost.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP OPcode Cache Install Guide - KnownHost","description":"Are you looking for a simple guide on OPcode cache in your php website? Look no further as we walk you through on how to set it up on KnownHost server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/","og_locale":"en_US","og_type":"article","og_title":"PHP OPcode Cache Install Guide - KnownHost","og_description":"Are you looking for a simple guide on OPcode cache in your php website? Look no further as we walk you through on how to set it up on KnownHost server.","og_url":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/","og_site_name":"KnownHost","article_published_time":"2021-07-08T11:30:08+00:00","article_modified_time":"2026-01-23T20:57:31+00:00","og_image":[{"width":800,"height":444,"url":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache.jpg","type":"image\/jpeg"}],"author":"Jonathan K. W.","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jonathan K. W.","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#article","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/"},"author":{"name":"Jonathan K. W.","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/3db6e20d1f33519cd68fe0ba1230a48b"},"headline":"PHP OPcode Cache Install Guide","datePublished":"2021-07-08T11:30:08+00:00","dateModified":"2026-01-23T20:57:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/"},"wordCount":681,"image":{"@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache.jpg","keywords":["apcu","cpanel","dedicated","linux","opcache","php","vps"],"articleSection":["Guides"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/","url":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/","name":"PHP OPcode Cache Install Guide - KnownHost","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache.jpg","datePublished":"2021-07-08T11:30:08+00:00","dateModified":"2026-01-23T20:57:31+00:00","author":{"@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/3db6e20d1f33519cd68fe0ba1230a48b"},"description":"Are you looking for a simple guide on OPcode cache in your php website? Look no further as we walk you through on how to set it up on KnownHost server.","breadcrumb":{"@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#primaryimage","url":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache.jpg","contentUrl":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/07\/opcache_whm_add_opcache.jpg","width":800,"height":444},{"@type":"BreadcrumbList","@id":"https:\/\/www.knownhost.com\/kb\/php-opcode-cache-install-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.knownhost.com\/kb\/"},{"@type":"ListItem","position":2,"name":"PHP OPcode Cache Install Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.knownhost.com\/kb\/#website","url":"https:\/\/www.knownhost.com\/kb\/","name":"KnownHost","description":"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.knownhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/3db6e20d1f33519cd68fe0ba1230a48b","name":"Jonathan K. W.","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g","caption":"Jonathan K. W."},"sameAs":["https:\/\/www.knownhost.com"]}]}},"_links":{"self":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/comments?post=760"}],"version-history":[{"count":1,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/760\/revisions"}],"predecessor-version":[{"id":8055,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/760\/revisions\/8055"}],"wp:attachment":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/media?parent=760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/categories?post=760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/tags?post=760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}