Accelerate WordPress with APC and W3 Total Cache

Recently, i have a wordpress website with very basic setup, it just has Apache2, PHP, WordPress ans MySQL, nothing more. with this setup, every time a request was sent, server took ~90% CPU load. it was bad, really bad.

To increase performance, i have done following steps.

1. Install APC (Alternative PHP Cache) on Ubuntu server and turn it on.

installing APC on ubuntu is very simple, just type in following command :


sudo apt-get install php-apc

2. Install W3 Total Cache

to install W3 Total Cache plugin, you can download it from wordpress official plugin channel http://wordpress.org/extend/plugins/ and then upload extracted content to wp-content/plugins folder. You can also install it with your wordpress admin by getting in Plugins > Add new.

After installation, you need to change permission of your wp-content folder to 777 recursively with this command :


chmod -Rf 777 path/to/your/wp-content/folder

Then, add the following line to the top of your wp-config.php file :


/*enable cache*/
define('WP_CACHE', true);
define('WP_MEMORY_LIMIT', '128M');

finally, activate you W3 Total Cache plugin and enjoy your new sweet blog.

Leave a Comment