{"id":2565834,"date":"2020-07-14T10:27:00","date_gmt":"2020-07-14T08:27:00","guid":{"rendered":"https:\/\/wp-rocket.me\/?p=2565834"},"modified":"2024-08-07T14:15:31","modified_gmt":"2024-08-07T12:15:31","slug":"best-php-accelerators","status":"publish","type":"post","link":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/","title":{"rendered":"What Are The Best PHP Accelerators?"},"content":{"rendered":"<p>PHP accelerators substantially improve the performance of PHP-based software such as WordPress. Running high traffic sites powered by PHP applications is possible only due to PHP accelerators. Their performance benefits vary widely as it depends on multiple factors, including other optimizations that you may need to apply on your site.&nbsp;<\/p><p>In this article you\u2019ll learn how PHP accelerators work, why you need them, which PHP accelerators are the best for your WordPress site, and how you can install and configure them.<\/p><p>Excited? Let\u2019s get started!<\/p><h2 class=\"wp-block-heading\">What are PHP Accelerators?<\/h2><p>A PHP accelerator is a PHP extension that improves the performance of PHP apps. These extensions work by caching <strong>opcode<\/strong> (or operation code) generated by PHP files. For this reason, PHP accelerators are also referred to as <strong>Opcode Caching<\/strong>.&nbsp;<\/p><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"600\" src=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-Accelerators-Opcode-Cache-Working-Illustration.png\" alt=\"How a PHP accelerator (or Opcode Caching) works\" class=\"wp-image-2565848\" srcset=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-Accelerators-Opcode-Cache-Working-Illustration.png 800w, https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-Accelerators-Opcode-Cache-Working-Illustration-300x225.png 300w, https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-Accelerators-Opcode-Cache-Working-Illustration-768x576.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">How a PHP accelerator (or Opcode Caching) works<\/figcaption><\/figure><p>PHP scripts are written in human readable syntax, but a server (or a central processing unit) cannot understand this code directly. It needs to be converted into a format the server can read directly. This is where Opcode comes in.&nbsp;<\/p><p><em>Opcode<\/em> is part of the machine language instruction that directs the server on what operations to perform. Generally, these instructions are fairly simple, like adding two numbers or concatenating two or more strings. Other parts of machine language instructions include <em>operands<\/em>, items that the opcode manipulates.<\/p><p>Every time a user requests something on your site, generating the opcode from PHP scripts can be highly taxing on your webserver. First, the scripts need to be tokenized and parsed to generate an abstract syntax tree (AST), which is then compiled to create the opcode.&nbsp;&nbsp;<\/p><p>In some extreme cases, this process can bring your website to a crawl for many users. If the number of requests is large, then the server timeouts for a lot of users, locking them out from accessing the website altogether.<\/p><p>You can bypass this problem by storing the opcode as a cache (OpCache) after it\u2019s generated. You can then serve it directly to all subsequent users without getting the server involved. This is exactly what a PHP accelerator does.<\/p><p>It\u2019s not unusual to see a <a href=\"https:\/\/wp-rocket.me\/blog\/what-is-opcache\/\">WordPress site speed up by two to three times<\/a> (or more) after installing and configuring a PHP accelerator.<\/p><h2 class=\"wp-block-heading\">The Best PHP Accelerators<\/h2><p>PHP was launched in 1995, making it one of the oldest surviving server-side languages today. Throughout its lifetime there have been a lot of accelerators (opcode caching) implemented for it, but for server setups that run on Linux, there\u2019s primarily only one solution that\u2019s well-maintained and useful: <strong>PHP OPcache<\/strong>.<\/p><p>For PHP apps running on Windows and Windows Server, there\u2019s an alternative PHP accelerator called <strong>Windows Cache Extension for PHP<\/strong>. Plus, there are many extensions to add features to PHP\u2019s built-in opcode caching. I\u2019ll cover all of them in this article.<\/p><h3 class=\"wp-block-heading\">PHP OPcache (Zend OPcache)<\/h3><p>PHP OPcache extension makes PHP code to execute faster through opcode caching and other optimization techniques. It\u2019s bundled along with PHP 5.5 and later versions.&nbsp;<\/p><p>PHP OPcache is also called Zend OPcache since it\u2019s an implementation of <a href=\"https:\/\/pecl.php.net\/package\/ZendOpcache\">Zend\u2019s opcode caching extension<\/a>. Zend kept this extension proprietary until PHP 5.5 was released. Hence, for many users Alternative PHP Cache (APC) was the go-to solution for opcode caching in PHP.&nbsp;&nbsp;<\/p><p>After Zend open sourced the code for their opcode caching and released it as an extension called Zend OPcache, PHP 5.5 made it part of its core and has been using it as the default opcode caching solution ever since.&nbsp;<\/p><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"498\" src=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-OPcache-How-It-Works.png\" alt=\"PHP OPcache works by storing the opcode cache in shared memory\" class=\"wp-image-2565863\" srcset=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-OPcache-How-It-Works.png 800w, https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-OPcache-How-It-Works-300x187.png 300w, https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-OPcache-How-It-Works-768x478.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">PHP OPcache works by storing the opcode cache in shared memory<\/figcaption><\/figure><p>PHP OPcache improves performance by storing the precompiled bytecode in the server\u2019s shared memory when any PHP script is executed for the first time. This eliminates reading and compiling PHP code for future access. PHP OPcache also applies additional bytecode optimization patterns to make PHP code execution faster.<\/p><h4 class=\"wp-block-heading\">APC User Cache (APCu)<\/h4><p>Alternative PHP Cache (APC) is a free and an open source PHP accelerator. Like Zend OPcache, it\u2019s mainly designed to cache the PHP opcode output in the server\u2019s shared memory. Since it has always been FOSS, it was the most popular opcode caching solution for PHP until a few years ago.&nbsp;<\/p><p>After PHP OPcache became a part of PHP 5.5, APC\u2019s development slowed down considerably and is considered dead now. However, some APC features are still not available in PHP OPcache. One of them is the userland shared memory cache functionality. It\u2019s also referred to as \u201cin memory data caching.\u201d<\/p><p>To address this issue, the APC developers stripped it of all its opcode caching features and released it as a separate extension called <a href=\"https:\/\/www.php.net\/manual\/en\/book.apcu.php\">APCu<\/a>. It adds support for userland caching of PHP variables.&nbsp;&nbsp;<\/p><p>You can also install the <a href=\"https:\/\/github.com\/krakjoe\/apcu-bc\">APCu Backwards Compatibility Module<\/a> to use APCu as a drop in replacement for APC in modern versions of PHP.<\/p><p>You\u2019ll learn later how to enable and configure PHP OPcache and APCu on your server.<\/p><h3 class=\"wp-block-heading\">Windows Cache Extension for PHP<\/h3><p>Windows Cache Extension for PHP is a PHP accelerator that speeds up PHP software on Windows and Windows Server. It doesn\u2019t include support for opcode caching as PHP already includes it in its core, but it includes 4 unique types of cache:&nbsp;<\/p><ul class=\"wp-block-list\"><li><strong>File Cache<\/strong> \u2014 PHP OPCache only caches the opcode generated by PHP scripts. The PHP engine still has to access the script files on the server. Performing file operations can lead to significant performance overhead, so this extension includes a file cache that can store PHP scripts in shared memory.<br><\/li>\n\n<li><strong>Resolve File Path Cache<\/strong> \u2014 Most PHP scripts use relative file paths to refer to each unique file. The PHP engine has to convert these to absolute file paths to access them. If there are a lot of files referenced like this, it can lead to performance issues. This extension stores the mappings of all relative and absolute file paths beforehand so that the PHP engine doesn\u2019t spend too much time resolving file paths.<\/li><\/ul><ul class=\"wp-block-list\"><li><strong>User Cache<\/strong> \u2014 This cache works similarly to APCu\u2019s userland shared memory cache. PHP scripts can use user cache APIs to store objects and variables in the user cache and re-use them on subsequent requests. Not only does it improve the performance of PHP scripts, but it also allows the PHP engine to share data across multiple PHP processes.<\/li><\/ul><ul class=\"wp-block-list\"><li><strong>Session Handler<\/strong> \u2014 This stores the PHP session data in the server\u2019s shared memory to avoid performing file system operations for reading and writing session data. It\u2019s helpful if an enormous amount of data is being generated in a single PHP session.\u00a0<\/li><\/ul><p>Most WordPress installations use a Linux server. In case you\u2019re one of the dozen users who uses a Windows Server to run your site, you can learn more about <a href=\"https:\/\/www.php.net\/manual\/en\/wincache.setup.php\">installing and configuring WinCache<\/a> on its online manual.<\/p><h2 class=\"wp-block-heading\">Installing and Configuring PHP OPcache<\/h2><p>For PHP 5.5 and above, PHP compiles OPcache by default as a shared extension during PHP installation. However, if you specified <strong>&#8211;disable-all<\/strong> directive when installing PHP, then you need to allow OPcache explicitly by specifying <strong>&#8211;enable-opcache<\/strong> directive.<\/p><p>Once you have the OPcache extension compiled, you need to enable it and configure its variables.&nbsp;<\/p><p>You must use the <strong>zend_extension<\/strong> directive to enable the OPcache extension. To do that, add all the following code to your <strong>php.ini<\/strong> file.<\/p><pre class=\"wp-block-code\"><code class=\"\">zend_extension=\/full\/path\/to\/opcache.so<\/code><\/pre><p><strong>Note:<\/strong> If you have a non-standard server installation and don\u2019t know the full path, then you can specify the <strong>extension_dir<\/strong> directive to tell PHP to look for dynamically loaded extensions in that directory. Also, for Windows-based installations the path is <strong><em>C:\\path\\to\\php_opcache.dll<\/em><\/strong>.&nbsp;<\/p><p>Once you\u2019ve enabled OPcache, you need to apply the right settings to gain maximum performance out of it. For most use cases, you can add the following settings to your <strong>php.ini<\/strong> file:<\/p><pre class=\"wp-block-code\"><code class=\"\">opcache.memory_consumption=128\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=4000\nopcache.revalidate_freq=60\nopcache.fast_shutdown=1\nopcache.enable_cli=1<\/code><\/pre><p>Here\u2019s a breakdown of all the directives and what they do:<\/p><ul class=\"wp-block-list\"><li><strong>opcache.memory_consumption<\/strong><strong>:<\/strong> Sets the size of the shared memory storage available for OPcache. The value is specified in megabytes and its default value for PHP 7.0 and above is <strong>128<\/strong>, but you can set it more than that if needed.\u00a0<\/li><\/ul><p>Before changing this value, make sure that your server has enough shared memory space for other services like MySQL.&nbsp;<br><\/p><ul class=\"wp-block-list\"><li><strong>opcache.interned_strings_buffer<\/strong><strong>:<\/strong> Specifies the amount of memory available to store interned strings. String interning is a performance optimization method wherein only one copy of each distinct string is stored in the memory, making string processing tasks space- and time-efficient.\u00a0<\/li><\/ul><p>Its default value is <strong>8<\/strong> megabytes. You can increase its value to <strong>16<\/strong> if you\u2019re running a lot of code on your site.<br><\/p><ul class=\"wp-block-list\"><li><strong>opcache.max_accelerated_files<\/strong><strong>:<\/strong> Defines the maximum number of PHP scripts that can be stored in the OPcache hash table. Its minimum value is <strong>200<\/strong>, but you can set it up to <strong>1000000<\/strong> in PHP 5.5.6 and later versions. You should note that the actual value used by OPcache will be <a href=\"https:\/\/www.php.net\/manual\/en\/opcache.configuration.php#ini.opcache.interned-strings-buffer\">the first prime number that is closest to the value<\/a> and not the value itself.<\/li><\/ul><p>To find the perfect value to set here, you can count the number of PHP files in your Linux server by running the <\/p><pre class=\"wp-block-code\"><code class=\"\">find . -type f -print | grep php | wc -l<\/code><\/pre><p>command in your terminal. Set the value of this directive greater than the PHP file count on your server. For most WordPress installations, setting it to <strong>10000<\/strong> would be ideal.&nbsp;<\/p><ul class=\"wp-block-list\"><li><strong>opcache.revalidate_freq<\/strong><strong>:<\/strong> Directs OPcache on how often it needs to check the script timestamps for any updates. Its value is set in seconds. If you set it to <strong>0<\/strong>, OPcache will check for updates on every request, which is equivalent to not having any opcode caching enabled.<\/li><\/ul><p>If you don\u2019t have a lot of frequent updates on your site, you can set this value to <strong>3600<\/strong> seconds. For development purposes, you can disable by feature by setting the <a href=\"https:\/\/www.php.net\/manual\/en\/opcache.configuration.php#ini.opcache.validate-timestamps\">opcache.validate_timestamps<\/a> directive to <strong>0<\/strong>.&nbsp;<br><\/p><ul class=\"wp-block-list\"><li><strong>opcache.fast_shutdown<\/strong><strong>:<\/strong> Enables the fast shutdown sequence for OPcache. It speeds up response and recycling time of PHP workers so they\u2019re ready for additional requests immediately. OPcache achieves this by using the Zend Engine memory manager to unassign all requests in one go.<\/li><\/ul><p>Since PHP 7.2, a variant of this directive has been integrated into core PHP and will be used automatically whenever possible.<\/p><ul class=\"wp-block-list\"><li><strong>opcache.enable_cli:<\/strong> Enables opcode caching for the CLI version of PHP. Setting the flag to <strong>1<\/strong> will enable opcode caching on your server. You can disable opcode caching for development and testing by setting its flag to <strong>0<\/strong>.\u00a0\u00a0<\/li><\/ul><p>For further details and definitions of OPcache directives you can use, refer to <a href=\"https:\/\/www.php.net\/manual\/en\/opcache.configuration.php\">PHP OPcache\u2019s runtime configuration manual<\/a>. If you\u2019re switching between development and production stage, then it\u2019s recommended to get familiar with all the OPcache directives to take maximum advantage of them all.<\/p><h3 class=\"wp-block-heading\">Checking PHP OPcache Status<\/h3><p>You can check the status of OPcache on your server by running the <a href=\"https:\/\/www.php.net\/manual\/en\/function.opcache-get-status.php\">opcache_get_status() function<\/a>.&nbsp;<\/p><p>If OPCache is enabled on your server, it\u2019ll return an array containing all the opcode caching properties. Here\u2019s an <a href=\"https:\/\/www.php.net\/manual\/en\/function.opcache-get-status.php#115741\">example output of this function<\/a>. If OPcache is disabled on your server though, then it\u2019ll just return <strong>false<\/strong>.<\/p><p>You can plug in the optional <strong>get_scripts<\/strong> parameter to this function to get script specific state information. Alternatively, you can also use the <a href=\"https:\/\/www.php.net\/manual\/en\/function.opcache-get-configuration.php\">opcache_get_configuration()<\/a> function to get OPcache configuration information, including INI, blacklist, and the OPcache version in use.<\/p><p>For a detailed list of all OPcache functions, you can refer to the <a href=\"https:\/\/www.php.net\/manual\/en\/ref.opcache.php\">PHP OPcache functions manual<\/a>.<\/p><h3 class=\"wp-block-heading\">Monitoring and Managing PHP OPcache<\/h3><p>There are a lot of PHP extensions that let you manage OPcache features with ease through a graphical interface. Two of the most recommended extensions for this purpose are <a href=\"https:\/\/github.com\/PeeHaa\/OpCacheGUI\">OpCacheGUI<\/a> and <a href=\"https:\/\/github.com\/amnuts\/opcache-gui\">opcache-gui<\/a> (similar names, but different extensions).<\/p><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"289\" src=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-OoCacheGUI-Extension.png\" alt=\"OpCacheGUI extension for PHP\" class=\"wp-image-2565882\" srcset=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-OoCacheGUI-Extension.png 800w, https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-OoCacheGUI-Extension-300x108.png 300w, https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-OoCacheGUI-Extension-768x277.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">OpCacheGUI extension for PHP<\/figcaption><\/figure><p>While OpCacheGUI is the better looking extension of the two, the opcache-gui extension is updated regularly to work with the latest PHP versions. You can use either of them to manage and monitor PHP OPcache easily.<\/p><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"601\" src=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-opcache-gui-Extension-Screen.png\" alt=\"Dashboard for opcache-gui PHP extension\" class=\"wp-image-2565888\" srcset=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-opcache-gui-Extension-Screen.png 800w, https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-opcache-gui-Extension-Screen-260x195.png 260w, https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-opcache-gui-Extension-Screen-768x577.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">Dashboard for opcache-gui PHP extension<\/figcaption><\/figure><h3 class=\"wp-block-heading\">Installing and Configuring APCu<\/h3><p>You can install the <a href=\"https:\/\/pecl.php.net\/package\/APCu\">APCu extension from the PECL repository<\/a> or directly from PHP. Run the following command in your terminal to get started:<\/p><pre class=\"wp-block-code\"><code class=\"\">sudo apt-get install php7.3-apcu<\/code><\/pre><p><strong>Note:<\/strong> Depending on your PHP version, you need to use the right directive. Here it\u2019s PHP 7.3, but you may have a different PHP version installed on your server.&nbsp;&nbsp;<\/p><p>During the installation, you may come across questions on how to configure APCu on your server. Choose the defaults for all of them.&nbsp;<\/p><p>Next, check the <strong>php.ini<\/strong> file and add the below line if it\u2019s not already added by PHP.&nbsp;<\/p><pre class=\"wp-block-code\"><code class=\"\">extension=apcu.so<\/code><\/pre><p>This will enable the <strong>apc.so<\/strong> module on your server after it\u2019s restarted. For servers running on NGINX, you must use the following command:<\/p><pre class=\"wp-block-code\"><code class=\"\">sudo service php7.3-fpm restart\nsudo service nginx reload<\/code><\/pre><p>If your server is using Apache, then you can use the following command:<\/p><pre class=\"wp-block-code\"><code class=\"\">sudo service apache2 reload<\/code><\/pre><p>The default APCu settings are perfect for most setups, including WordPress installations. However, if you\u2019re considering fine tuning them, then you can read all the <a href=\"https:\/\/www.php.net\/manual\/en\/apcu.configuration.php\">APCu configuration options<\/a> available.&nbsp;<\/p><p>For example, the <strong>apcu.shm_size<\/strong> directive is set to <strong>32M<\/strong> by default. If you find that APCu is running out of its allocated space on shared memory, then you can allocate more space to APCu by adding the <strong>apcu.shm_size<\/strong> directive with a custom value in your <strong>php.ini<\/strong> value.<\/p><p><strong>Note:<\/strong> APCu on PHP 7+ versions doesn\u2019t have full backwards compatibility with APC. If you require it, then you also need to install the <a href=\"https:\/\/pecl.php.net\/package\/apcu_bc\">APCu Backwards Compatibility (apc-bu) extension<\/a> from PECL repository.&nbsp;<\/p><p>For more in-depth, highly technical information on APCu, you can <a href=\"https:\/\/git.php.net\/?p=pecl\/caching\/apc.git;a=blob;f=TECHNOTES.txt\">check out its TECHNOTES documentation<\/a>.<\/p><div id=\"om-jbyojf9wimyywstllxy9-holder\"><\/div>\n\t<script>(function (d, u, ac) {\n\t\t\tvar s = d.createElement('script')\n\t\t\ts.type = 'text\/javascript'\n\t\t\ts.src = 'https:\/\/a.omappapi.com\/app\/js\/api.min.js'\n\t\t\ts.async = true\n\t\t\ts.dataset.user = u\n\t\t\ts.dataset.campaign = ac\n\t\t\td.getElementsByTagName('head')[0].appendChild(s)\n\t\t})(document, 20440, 'jbyojf9wimyywstllxy9')<\/script><h2 class=\"wp-block-heading\">Summary<\/h2><p>PHP\u2019s default OPcache functionality provides a noticeable performance improvement for WordPress sites. Most times, the speed gains are as much as 3 times more. If you have a medium to high traffic site, then it\u2019s highly recommended to enable opcode caching on your server.&nbsp; Plus, they could make a difference if <a href=\"https:\/\/wp-rocket.me\/blog\/how-to-fix-slow-wordpress-admin\/\">you want to fix a slow WordPress admin<\/a>.<\/p><p>As for the best PHP accelerator, there\u2019s only one that works flawlessly for opcode caching today, and that\u2019s PHP\u2019s built-in OPcache. You can also install the APCu PHP extension to take advantage of its userland shared memory caching functionality.&nbsp;<\/p><p>I hope this article answered all your questions regarding PHP accelerators. Get started with speeding up your site now!<\/p>","protected":false},"excerpt":{"rendered":"<p>PHP accelerators substantially improve the performance of PHP-based software such as WordPress. In this article you\u2019ll learn how PHP accelerators work, why you need them, which PHP accelerators are the best for your WordPress site, and how you can install and configure them.<\/p>\n","protected":false},"author":131875,"featured_media":2565917,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"kia_subtitle":"","footnotes":""},"categories":[63],"tags":[],"class_list":["post-2565834","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-cache"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What Are The Best PHP Accelerators?<\/title>\n<meta name=\"description\" content=\"Looking for the best PHP accelerators? Learn why you need them, what are the best for your WordPress site, and how you can install, and configure them.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What Are The Best PHP Accelerators?\" \/>\n<meta property=\"og:description\" content=\"Looking for the best PHP accelerators? Learn why you need them, what are the best for your WordPress site, and how you can install, and configure them.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Rocket\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/WP-Rocket\/631942253526829\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-14T08:27:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-07T12:15:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"460\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Salman Ravoof\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wp_rocket\" \/>\n<meta name=\"twitter:site\" content=\"@wp_rocket\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Salman Ravoof\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/\"},\"author\":{\"name\":\"Salman Ravoof\",\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/person\/0152a367f602a6628c0bc4ecace1fc34\"},\"headline\":\"What Are The Best PHP Accelerators?\",\"datePublished\":\"2020-07-14T08:27:00+00:00\",\"dateModified\":\"2024-08-07T12:15:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/\"},\"wordCount\":2407,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/wp-rocket.me\/#organization\"},\"image\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png\",\"articleSection\":[\"Page speed and caching\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/\",\"url\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/\",\"name\":\"What Are The Best PHP Accelerators?\",\"isPartOf\":{\"@id\":\"https:\/\/wp-rocket.me\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png\",\"datePublished\":\"2020-07-14T08:27:00+00:00\",\"dateModified\":\"2024-08-07T12:15:31+00:00\",\"description\":\"Looking for the best PHP accelerators? Learn why you need them, what are the best for your WordPress site, and how you can install, and configure them.\",\"breadcrumb\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#primaryimage\",\"url\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png\",\"contentUrl\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png\",\"width\":1100,\"height\":460,\"caption\":\"Best PHP Accelerators\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wp-rocket.me\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Page speed and caching\",\"item\":\"https:\/\/wp-rocket.me\/blog\/wordpress-cache\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What Are The Best PHP Accelerators?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wp-rocket.me\/#website\",\"url\":\"https:\/\/wp-rocket.me\/\",\"name\":\"WP Rocket\",\"description\":\"Plugin d&#039;optimisation de sites WordPress\",\"publisher\":{\"@id\":\"https:\/\/wp-rocket.me\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wp-rocket.me\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/wp-rocket.me\/#organization\",\"name\":\"WP Rocket\",\"url\":\"https:\/\/wp-rocket.me\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/logo-wp-rocket-paypal-2.png\",\"contentUrl\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/logo-wp-rocket-paypal-2.png\",\"width\":150,\"height\":41,\"caption\":\"WP Rocket\"},\"image\":{\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/pages\/WP-Rocket\/631942253526829\",\"https:\/\/x.com\/wp_rocket\",\"https:\/\/www.youtube.com\/channel\/UC1ozThXHd1IWIZ5wkshgp_Q\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/person\/0152a367f602a6628c0bc4ecace1fc34\",\"name\":\"Salman Ravoof\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2250657129436509050f973d3042ddd7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2250657129436509050f973d3042ddd7?s=96&d=mm&r=g\",\"caption\":\"Salman Ravoof\"},\"description\":\"Salman Ravoof is a self-taught web developer, writer, and creator. He\u2019s a huge fan of Free and Open-Source Software. Apart from tech, he finds science, philosophy, and food exciting. Learn more about him on his website, and connect with Salman on Twitter.\",\"sameAs\":[\"https:\/\/wp-rocket.me\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What Are The Best PHP Accelerators?","description":"Looking for the best PHP accelerators? Learn why you need them, what are the best for your WordPress site, and how you can install, and configure them.","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:\/\/wp-rocket.me\/blog\/best-php-accelerators\/","og_locale":"en_US","og_type":"article","og_title":"What Are The Best PHP Accelerators?","og_description":"Looking for the best PHP accelerators? Learn why you need them, what are the best for your WordPress site, and how you can install, and configure them.","og_url":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/","og_site_name":"WP Rocket","article_publisher":"https:\/\/www.facebook.com\/pages\/WP-Rocket\/631942253526829","article_published_time":"2020-07-14T08:27:00+00:00","article_modified_time":"2024-08-07T12:15:31+00:00","og_image":[{"width":1100,"height":460,"url":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png","type":"image\/png"}],"author":"Salman Ravoof","twitter_card":"summary_large_image","twitter_creator":"@wp_rocket","twitter_site":"@wp_rocket","twitter_misc":{"Written by":"Salman Ravoof","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#article","isPartOf":{"@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/"},"author":{"name":"Salman Ravoof","@id":"https:\/\/wp-rocket.me\/#\/schema\/person\/0152a367f602a6628c0bc4ecace1fc34"},"headline":"What Are The Best PHP Accelerators?","datePublished":"2020-07-14T08:27:00+00:00","dateModified":"2024-08-07T12:15:31+00:00","mainEntityOfPage":{"@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/"},"wordCount":2407,"commentCount":2,"publisher":{"@id":"https:\/\/wp-rocket.me\/#organization"},"image":{"@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#primaryimage"},"thumbnailUrl":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png","articleSection":["Page speed and caching"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/","url":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/","name":"What Are The Best PHP Accelerators?","isPartOf":{"@id":"https:\/\/wp-rocket.me\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#primaryimage"},"image":{"@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#primaryimage"},"thumbnailUrl":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png","datePublished":"2020-07-14T08:27:00+00:00","dateModified":"2024-08-07T12:15:31+00:00","description":"Looking for the best PHP accelerators? Learn why you need them, what are the best for your WordPress site, and how you can install, and configure them.","breadcrumb":{"@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#primaryimage","url":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png","contentUrl":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/PHP-accelerators.png","width":1100,"height":460,"caption":"Best PHP Accelerators"},{"@type":"BreadcrumbList","@id":"https:\/\/wp-rocket.me\/blog\/best-php-accelerators\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wp-rocket.me"},{"@type":"ListItem","position":2,"name":"Page speed and caching","item":"https:\/\/wp-rocket.me\/blog\/wordpress-cache\/"},{"@type":"ListItem","position":3,"name":"What Are The Best PHP Accelerators?"}]},{"@type":"WebSite","@id":"https:\/\/wp-rocket.me\/#website","url":"https:\/\/wp-rocket.me\/","name":"WP Rocket","description":"Plugin d&#039;optimisation de sites WordPress","publisher":{"@id":"https:\/\/wp-rocket.me\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wp-rocket.me\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wp-rocket.me\/#organization","name":"WP Rocket","url":"https:\/\/wp-rocket.me\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wp-rocket.me\/#\/schema\/logo\/image\/","url":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/logo-wp-rocket-paypal-2.png","contentUrl":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/logo-wp-rocket-paypal-2.png","width":150,"height":41,"caption":"WP Rocket"},"image":{"@id":"https:\/\/wp-rocket.me\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pages\/WP-Rocket\/631942253526829","https:\/\/x.com\/wp_rocket","https:\/\/www.youtube.com\/channel\/UC1ozThXHd1IWIZ5wkshgp_Q"]},{"@type":"Person","@id":"https:\/\/wp-rocket.me\/#\/schema\/person\/0152a367f602a6628c0bc4ecace1fc34","name":"Salman Ravoof","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wp-rocket.me\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2250657129436509050f973d3042ddd7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2250657129436509050f973d3042ddd7?s=96&d=mm&r=g","caption":"Salman Ravoof"},"description":"Salman Ravoof is a self-taught web developer, writer, and creator. He\u2019s a huge fan of Free and Open-Source Software. Apart from tech, he finds science, philosophy, and food exciting. Learn more about him on his website, and connect with Salman on Twitter.","sameAs":["https:\/\/wp-rocket.me\/"]}]}},"_links":{"self":[{"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/posts\/2565834"}],"collection":[{"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/users\/131875"}],"replies":[{"embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/comments?post=2565834"}],"version-history":[{"count":0,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/posts\/2565834\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/media\/2565917"}],"wp:attachment":[{"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/media?parent=2565834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/categories?post=2565834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/tags?post=2565834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}