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

Optimize your MySQL Server with MySQLTuner

Login to your server’s console and download MySQLTuner (I use my user’s home directory)

wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl

If you don’t like to enter the user details for every test it’s possible to create a .my.cnf file in the same directory and add a mysql admin user to access your database

Use this kind of settings:


Continue reading Optimize your MySQL Server with MySQLTuner