Zum Inhalt springen

Activate OpCache for PHP

In the domain settings of our customer menu, you have the option of choosing between 4 PHP editions (EXTENDED, LIGHT, STANDARD and FastCGI). Only if you select FastCGI will you be able to benefit from OpCache and get even more performance out of your website. However, these 4 PHP editions all have a different PHP configuration. This means that although most PHP extensions are available with the EXTENDED entry, the OpCache extension is missing here.

To be able to use the OpCache extension despite the EXTENDED selection, please follow the steps below for PHP 7.3:

  1. Log in to the customer menu
  2. Switch to the domain administration
  3. Click on the gear wheels to the right of the domain name for which you want to activate OpCache. If you want to provide several domains with OpCache, you must repeat the following steps accordingly.
  4. Select the "Open" entry from the small info window that pops up.
  5. Switch to the "Settings" tab
  6. Click on "PHP.INI Editor" at the bottom left
  7. On the "General" tab, please change the entry "Use global PHP.INI settings" from "Yes (Global)" to "No (Domain-specific)". This change removes the write protection of the lower configuration fields.
  8. Change the entry zend_extension from /usr/local/php5/ZendOptimizer.so to /usr/local/lib/php_modules/7-73LATEST/opcache.so
  9. Apply the changes by clicking on "Apply"
  10. Under "Other settings"

    the following parameters still need to be adjusted.

    memory_limit = "256M"
    register_globals = "0"
    post_max_size = "128M"
    magic_quotes_gpc = "0"
    upload_max_filesize = "128M"

  11. Save the domain edit with another click on "Save"
  12. You are now back in the domain overview and can activate the OpCache for further domains from point 3 onwards.

For PHP 7.2, please use the path /usr/local/lib/php_modules/7-72LATEST/opcache.so for zend_extension

For PHP 7.1, please use the path /usr/local/lib/php_modules/7-71LATEST/opcache.so for zend_extension.

Updated: 17.07.2024