PECL Memcache Module Installation

Time required: 1 minute

  1. Either use PECL (and skip to #4 if successful):
    # pecl install memcache
  2. Or via compilation. Download the latest stable version and extract:
    # cd /usr/local/src/ && wget http://pecl.php.net/get/memcache-2.2.5.tgz && tar -xzf memcache-2.2.5.tgz && cd memcache-2.2.5
  3. Now we start to compile:
    # phpize && ./configure && make && make install
  4. You can also use the memcache.ini file we prepared for you:
    # cp /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/memcache.ini /etc/php.d/
  5. Finally restart apache:
    # /etc/init.d/httpd restart
  6. You’re done! Memcache should now be available. If the following command retuns anything, you’re all set:
    # php -r 'phpinfo();' | grep 'memcache'

For windows users we recommend checking the following site(s) for more installation tips:

( Ali Han, URI:alihan.com.tr/blog )


PECL Memcache Module Installation WordPress Theme
Reviewed by Ali Han on November 3rd 2010
Rating: 4.8