Author Topic: How to Install APC for Wordpress  (Read 6731 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to Install APC for Wordpress
« on: May 19, 2015, 12:59:22 PM »
Kindly tell me how to install APC for wordpress site, I have tried many ways to activate APC, but its no use coz CWP is not letting me activate it. Even i have changed permission to 755 in public_html folder, but still its not working. My site is working fine.


Kindly help

Offline
*
Re: How to Install APC for Wordpress
« Reply #1 on: June 02, 2015, 04:17:21 PM »
I just installed APC yesterday, it was a pain! I tried with yum but didn't woork at all. I finally got it!
Here is what I did...

Code: [Select]
wget http://pecl.php.net/get/APC-3.1.13.tgz
tar xvzf APC-3.1.13.tgz
cd APC-3.1.13
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make install

Find the path of the module:

Code: [Select]
find / -name apc.so
(in my case /usr/lib64/extensions/no-debug-non-zts-20100525/apc.so)

Edit php.ini:

Code: [Select]
nano /usr/local/cwp/php54/php.ini
There are many php.ini and it's pretty confusing to know which one to update. It didn't work when I updated this one /usr/local/php/php.ini

Add the following lines at the end of php.ini and change for your desired values:

Code: [Select]
extension="/usr/lib64/extensions/no-debug-non-zts-20100525/apc.so"
apc.enabled=1
apc.shm_size=200M
apc.ttl=0
apc.user_ttl=0
apc.enable_cli=0
apc.max_file_size=5M

Restart Apache:

Code: [Select]
service httpd restart
You should now find the APC section on phpinfo() page.

Offline
*