-
Notifications
You must be signed in to change notification settings - Fork 86
FAQ: Installation: PHP Modules
The following modules are recommended for installation in order to support various caching methods:
- php-redis
- php-memcache
- php-memcached
- php-opcache
apt-get -y install php-redis php-memcache php-memcached php-opcache
service php*-fpm restart
Using PECL:
pecl install memcached
Or manually:
cd /usr/local/src
wget http://pecl.php.net/get/memcache-2.2.6.tgz
tar -xzf memcache-2.2.6.tgz
cd memcache-2.2.6
phpize && ./configure
make && make install
Use the memcache.ini file we prepared for you:
cp /path/to/your/website/wp-content/plugins/w3-total-cache/ini/memcache.ini /etc/php.d/
Restart Apache:
/etc/init.d/httpd restart
Test module:
php -r 'phpinfo();' | grep 'memcache'
Install APC using PECL:
pecl install apc
Or manually:
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
phpize
./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/sbin/apxs --with-php-config=/usr/bin/php-config
make && make install
The paths for --with-apxs= and ---with-php-config= should be the same as the output of:
whereis php-config
whereis apxs
Installation was successful if the output looks like this:
Installing shared extensions: /usr/lib/php/modules/
Use the apc.ini file we prepared for you:
cp /path/to/your/website/wp-content/plugins/w3-total-cache/ini/apc.ini /etc/php.d/
Restart apache when ready:
/etc/init.d/httpd restart
Test the module:
php -r 'phpinfo();' | grep 'apc'
cd /usr/local/src
wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.gz
tar -xzf xcache-1.3.2.tar.gz
cd xcache-1.3.2
phpize && ./configure --with-php-config=/usr/bin/php-config --enable-xcache --enable-xcache-optimizer --enable-xcache-coverager
make && make install
The path for ---with-php-config= should be the same as the output of:
whereis php-config
Installation was successful if the output looks like this:
Installing shared extensions: /usr/lib/php/modules/
Use the xcache.ini file we prepared for your:
cp /path/to/your/website/wp-content/plugins/w3-total-cache/ini/xcache.ini /etc/php.d/
Restart apache when ready:
/etc/init.d/httpd restart
Test the module:
php -r 'phpinfo();' | grep 'xcache'
cd /usr/local/src
wget http://autosetup1.googlecode.com/files/eaccelerator-0.9.5.3.tar.bz2
tar -xjf eaccelerator-0.9.5.3.tar.bz2
cd eaccelerator-0.9.5.3
phpize && ./configure --with-eaccelerator-shared-memory --with-php-config=/usr/bin/php-config
make && make install
The path for ---with-php-config= should be the same as the output of:
whereis php-config
Installation was successful if the output looks like this:
Installing shared extensions: /usr/lib/php/modules/
Use the eaccelerator.ini file we prepared for your:
cp /path/to/your/website/wp-content/plugins/w3-total-cache/ini/eaccelerator.ini /etc/php.d/
Restart apache when ready:
/etc/init.d/httpd restart
Test the module:
php -r 'phpinfo();' | grep 'eaccelerator'
Find requirements and installation instructions on New Relic website: Installing New Relic for PHP.
To see if this server supports New Relic click "compatibility check" on the Dashboard tab. Other key resources can be found below: