# Configuration OpCache

**URL:** <https://help.nextcloud.com/t/configuration-opcache/38408>\
**Category:** ℹ️ Support\
**Tags:** configphp\
**Created:** [October 5, 2018, 9:30am UTC](https://help.nextcloud.com/t/configuration-opcache/38408 "2018-10-05T09:30:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincenzo\_Di\_Mauro](https://help.nextcloud.com/user_avatar/help.nextcloud.com/vincenzo_di_mauro/32/11196_2.png) [@Vincenzo\_Di\_Mauro](https://help.nextcloud.com/u/Vincenzo_Di_Mauro)\
**Post date:** [October 5, 2018, 9:30am UTC](https://help.nextcloud.com/t/configuration-opcache/38408/1 "2018-10-05T09:30:58Z")

</div>

I apologize for my bad English I hope to be understandable  
PHP OpCache is not configured correctly. For better performance we recommend using the following settings in php.ini:

I have to configure OpCache  
opcache.enable = 1  
opcache.enable\_cli = 1  
opcache.interned\_strings\_buffer = 8  
opcache.max\_accelerated\_files = 10000  
opcache.memory\_consumption = 128  
opcache.save\_comments = 1  
opcache.revalidate\_freq = 1

I move to the directory

etc / php / 7.0 / apache2

I run nano php.ini and edit the parameters

 ![2](https://help.nextcloud.com/uploads/default/original/2X/d/d28b6d5b3c04df6e159b3b387970db9ac90793b0.png)

 ![1](https://help.nextcloud.com/uploads/default/original/2X/1/151d30f55c8a407e639d22104b10faaf10b7097a.png)

but when I run nextcloud it does not accept the changes by letting me see the message that tells me to change the php.ini

opcache.enable = 1  
opcache.enable\_cli = 1  
opcache.interned\_strings\_buffer = 8  
opcache.max\_accelerated\_files = 10000  
opcache.memory\_consumption = 128  
opcache.save\_comments = 1  
opcache.revalidate\_freq = 1

but they are already modified 🤕

---

<div class="post-metadata">

**Author:** ![Starfish](https://help.nextcloud.com/letter_avatar/starfish/32/6_22734026db12803ebb3e059622ac3534.png) [@Starfish](https://help.nextcloud.com/u/Starfish)\
**Post date:** [October 5, 2018, 9:47am UTC](https://help.nextcloud.com/t/configuration-opcache/38408/2 "2018-10-05T09:47:49Z")

</div>

The second screen’s output shows `;opcache.enable=1` which means the line is commented. You need to remove the `;` in front of all the parameters listed in order to “activate” them.

Also, have a look at [this thread](https://help.nextcloud.com/t/the-php-opcache-is-not-properly-configured/36147) as there are multiple answers in there already.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 7:56am UTC](https://help.nextcloud.com/t/configuration-opcache/38408/3 "2024-12-04T07:56:47Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 9, 2024, 3:23pm UTC](https://help.nextcloud.com/t/configuration-opcache/38408/4 "2024-12-09T15:23:06Z")

</div>


