Monday 21 November 2022

Enable PHP OPCache in Xampp

To install Drupal 8 and upper version, PHP OPCache extension is required. Untill we will not enable this, Drupal 8+ versions can not be installed.

To enable this extension, Please follow below steps.

1. Open php.ini file which is configuration file for PHP.

2. Search for "Dynamic Extensions" keyword.

3. Under this heading, Either search for ";zend_extension=opcache" and uncomment this line by removing ";" or add new line by adding below code

   zend_extension="C:\xampp\php\ext\php_opcache.dll"

4. Make sure the "zend_extension" should have the exact path to the opcache.dll file.

5. opcache.dll file exists in xampp > php > ext directory.

6. Save the php.ini file.

7. Restart the apache service.

8. Now try to install Drupal 8+, issue of PHP OPCache fixed.


To get good performance, following settings for PHP OPCache are recommended.

opcache.memory_consumption=128

opcache.interned_strings_buffer=8

opcache.max_accelerated_files=4000

opcache.revalidate_freq=60

opcache.fast_shutdown=1

opcache.enable_cli=1


No comments:

Post a Comment