Install XCache on Shared Bluehost PHP 5.4
Several years ago I wrote about installing a much older version of XCache on an older version of PHP (the comments section may still be useful), but I’ve decided to create a new post describing the install process on a Bluehost shared hosting account running PHP 5.4.
This install guide assumes you’re running PHP 5.4 (FastCGI). Verify this by navigating to your Bluehost CPanel and looking under PHP Config. Using an appropriate SSH client (yes, you need SSH access), login and execute the following commands in order:
mkdir modules xcache
tar -zxf xcache-3.2.0.tar.gz
./configure --prefix=$HOME/pecl/xcache --with-php-config=/usr/php/54/usr/bin/php-config
mv xcache.so /home/BLUEHOST-USERNAME/modules
You will need to replace “BLUEHOST-USERNAME” according to your account information. Now edit the php.ini file located in your public_html directory. Scroll down to the extension_dir section and go ahead and paste the following:
extension=/home/BLUEHOST-USERNAME/modules/xcache.so xcache.stat = On xcache.size = 32M xcache.var_size= 32M xcache.optimizer = On
This is also a great chance to verify that your server is serving compressed pages. Search for zlib.output_compression and make sure it is flagged to “on.” In other words:
zlib.output_compression = On
Once all the modifications have been saved, you’ll need to restart the FastCGI engine. Log back into CPanel, navigate to “Process Manager”, and kill /ramdisk/php/54/bin/fcgiphp54 processes.
Now you can verify that XCache is loaded by creating a phpinfo file on your server and navigate to it. Scroll down and you should see XCache humming along! 🙂
Hopefully this helps! Drop me a line in the comments section with questions!