{"id":624,"date":"2013-01-17T17:56:04","date_gmt":"2013-01-17T17:56:04","guid":{"rendered":"http:\/\/invisiblezero.net\/?p=299"},"modified":"2013-01-17T17:56:04","modified_gmt":"2013-01-17T17:56:04","slug":"accelerate-wordpress-with-apc-and-w3-total-cache","status":"publish","type":"post","link":"http:\/\/ndthanh.com\/accelerate-wordpress-with-apc-and-w3-total-cache\/","title":{"rendered":"Accelerate WordPress with APC and W3 Total Cache"},"content":{"rendered":"

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.<\/p>\n

To increase performance, i have done following steps.<\/p>\n

<\/p>\n

1. Install APC (Alternative PHP Cache) on Ubuntu server and turn it on.<\/p>\n

installing APC on ubuntu is very simple, just type in following command :<\/p>\n

\n\nsudo apt-get install php-apc\n\n<\/pre>\n

2. Install W3 Total Cache<\/p>\n

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.<\/p>\n

After installation, you need to change permission of your wp-content folder to 777 recursively with this command :<\/p>\n

\n\nchmod -Rf 777 path\/to\/your\/wp-content\/folder\n\n<\/pre>\n

Then, add the following line to the top of your wp-config.php file :<\/p>\n

\n\n\/*enable cache*\/\ndefine('WP_CACHE', true);\ndefine('WP_MEMORY_LIMIT', '128M');\n\n<\/pre>\n

finally, activate you W3 Total Cache plugin and enjoy your new sweet blog.<\/p>\n","protected":false},"excerpt":{"rendered":"

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…<\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67,46,31],"tags":[],"aioseo_notices":[],"views":5,"_links":{"self":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/624"}],"collection":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/comments?post=624"}],"version-history":[{"count":0,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/624\/revisions"}],"wp:attachment":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/media?parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/categories?post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/tags?post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}