How to install Memcached in Bluehost

Bluehost VPS service users can install “memcached”. Installing and using memcahed (such as in a cache plugin in WordPress) will increase your site speed.

To install “memcached”:

  1. Log into SSH terminal.
  2. $ sudo yum install memcached
  3. Installation of memcached will be complete.
  4. Restart your server (Optional)
  5. $ sudo service memcached start
memcached 설치 완료 화면

memcached  installation complete

To change the allocated memcached size:

  1. Please stop “memcached”: $ sudo service memcached stop
  2. Edit /etc/sysconfig/memcached to change CACHESIZE=”64″ to the value you want (See this). To edit “/etc/sysconfig/memcached”:
    nano /etc/sysconfig/memcached
    Memached cachesize - increaseYou can save the change by pressing Ctrl + X and then y. Please Enter.Please refer to this post about using nano in SSH terminal.
  3. Restart “memcached”: $ sudo service memcached start

Note:

  • How to generate a Public/Private Key to access SSH terminal: https://my.bluehost.com/cgi/help/ssh-keygen
  • If you encount an error message “[user_id] is not in the sudoers file. This incident will be reported“, please refer to: https://my.bluehost.com/cgi/help/2358
  • If you meet an error message “The following memcached servers are not responding or not running:” in the W3 Total Cache plugin in WordPress: $ sudo service memcached start (Please start memcached service.)
  • If an error [Error writing /filename: Permission denied] occurs:
    Please add sudo (Please see this).

You also need the “sudo” privilege to use “sudo” in SSH terminal (See this Bluehost page.)

Please feel free to leave a Comment (). Have a great day.