Hello, im using ubuntu 14.04 apache i’ve installed APC for my server but from w3tc it says not installed. i cant use any cache methods for vertual server. all opcode options are grayed out. only disk is enable. here what i get from my info.php file
Opcode Caching Up and Running Optimization Enabled Startup OK
can anybody tell me whats the issue? i really appreciate your help.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Check the install section of the plugin, I has all the steps you need to complete to make it work. http://yoursite/wp-admin/admin.php?page=w3tc_install
PECL Alternative PHP Cache (APC) Installation (Recommended): Time required: 1 minute
Install APC using the PECL command (and skip to #5 if successful):
pecl install apc
Or via compilation. Download the latest stable version and extract:
cd /usr/local/src && wget http://pecl.php.net/get/APC-3.1.9.tgz && tar -xzf APC-3.1.9.tgz && cd APC-3.1.9
Note the paths returned for the following commands:
whereis php-config
whereis apxs
Use the output from #2 to modify the --with-apxs and --with-php-config flags in the following compile command:
phpize && ./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/sbin/apxs --with-php-config=/usr/bin/php-config && make && make install
The result should be similar to: Installing shared extensions: /usr/lib/php/modules/ You can also use the apc.ini file we prepared for you:
cp /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/apc.ini /etc/php.d/
Restart apache when ready:
/etc/init.d/httpd restart
You’re done! APC should now be available. If the following command retuns anything, you’re all set:
php -r ‘phpinfo();’ | grep ‘apc’