Optimize Apache and MySQL for a 256MB VPS

For small websites or not so popular WordPress blogs a small VPS with only 256MB of RAM should be enough. If you’ve followed this guide to install a Ubuntu web server you need to optimize your server a little bit.

Start installing MySQLtuner

Download the Perl script to your (admin) home directory:

wget http://mysqltuner.pl/mysqltuner.pl

Create also a file nano .my.cnf and add this code:


After running MySQLtuner script perl mysqltuner.pl you should get this warning:

Reduce your overall MySQL memory footprint for system stability

To resolve this an other memory related issues we need to optimize the MySQL database settings. Continue reading Optimize Apache and MySQL for a 256MB VPS

How-to install eAccelerator?

I’m using eAccelerator on two servers now, for both I’m using DirectAdmin as control panel. One is based on Ubuntu and the other one is running on Cent-OS.

Download eAccelerator from their website and follow their instructions (you need root access to install eAccelerator and it’s required to install php5-dev tools first):

wget http://bart.eaccelerator.net/source/
tar xjvf eaccelerator-
cd eaccelerator-
./configure --with-php-config=/usr/local/php5/bin/php-config

The “–with-php-config” setting is maybe not necessary, check your server for the right location.

It might be possible that you need to install the PHP dev tools first (yum install php-devel (Cent-OS or apt-get install php-dev) Continue reading How-to install eAccelerator?