All times are UTC - 6 hours   |  Page 1 of 1

Dion Designs

Zend OPcache

Zend OPcache

Posted: November 6th 2017, 1:16am
by Mstudio
I writing as you asked
I enable Zend OPcache using the explain here https://www.interserver.net/tips/kb/ena ... he-cpanel/

How I can check that it work and if this not hurt the site?

Zend OPcache

Posted: November 6th 2017, 10:16am
by Dion
If Zend OPcache has been enabled correctly, you should notice a large drop in the memory usage on your site, and pages should load more quickly.

Zend OPcache usually requires some changes to the php.ini file. You should ask your hosting company where you can edit the Zend OPcache configuration. If you post the current settings, I will be able to tell you what might need changing.

Zend OPcache

Posted: November 7th 2017, 12:35am
by Mstudio
Thanks for the help.
I added this to my php.ini file, I have access to FTP
Code: Select all
opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 8000
opcache.revalidate_freq = 60

; Required for Moodle
opcache.use_cwd = 1
opcache.validate_timestamps = 1
opcache.save_comments = 1
opcache.enable_file_override = 0
; If something does not work in Moodle
opcache.revalidate_path = 1 ; May fix problems with include paths
;opcache.mmap_base = 0x20000000 ; (Windows only) fix OPcache crashes with event id 487

Zend OPcache

Posted: November 7th 2017, 12:54am
by Dion
Have you enabled OPcache in php.ini? You should have a line that looks something like this:

Code: Select all
zend_extension = "opcache.so"

If you do not use Moodle, make sure to remove the opcache.save_comments line. Setting that configuration option will waste a lot of memory.

Please be aware that PHP must be restarted in order to enable Zend OPcache. You can do this yourself if you have a VPS or dedicated server. If you have shared hosting, you must ask your hosting provider to restart PHP.

If you have successfully enabled OPcache, you will see a large decrease in the memory usage in your UsageDD display. And after loading a few pages, you should notice an improvement in page load times.

Zend OPcache

Posted: November 7th 2017, 4:33am
by Mstudio
Thanks, I do not use comments on the site, I removed the line.
this files goes to the site root? I do not need it in wp-admin?
I using shared hosting, hope the hosting will agree to do it.

Zend OPcache

Posted: November 7th 2017, 11:34am
by Dion
If you have shared hosting, you will definitely need to contact your provider since they must restart PHP.

Zend OPcache

Posted: November 8th 2017, 1:05am
by Mstudio
Thanks.