{"id":13,"date":"2015-09-04T12:28:50","date_gmt":"2015-09-04T12:28:50","guid":{"rendered":"http:\/\/www.asianux.org.vn\/?p=13"},"modified":"2015-09-04T12:28:50","modified_gmt":"2015-09-04T12:28:50","slug":"optimize-apache-for-wordpress-high-traffic-websites","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2015\/09\/04\/optimize-apache-for-wordpress-high-traffic-websites\/","title":{"rendered":"OPTIMIZE APACHE FOR WORDPRESS \u2013 HIGH TRAFFIC WEBSITES"},"content":{"rendered":"<h2>OPTIMIZE APACHE FOR WORDPRESS \u2013 HIGH TRAFFIC WEBSITES<\/h2>\n<p>This article will help you to tweak\u00a0your apache server and can aceept\u00a0high traffic, but let\u2019s talk about the insides and possibilities first. Optimizing apache matters the server hardware so if you checking the solution for Shared Hosting then this article won\u2019t help you, should check my other articles for the low traffic website optimization.<\/p>\n<p>Practically it\u2019s seen that many people finding solution for optimizing wordpress but didn\u2019t check the requirement to do so. If you have traffic more than 1M\/Month\u00a0and\u00a0VPS has Memory of 2GB with 2 Cores CPU and running WHM then it\u2019s complicated to switch to more traffic, since WHM is not made to accept high traffic due to buffer delay between CPU Cores, Memory, Mysql Database &amp; HTTP Server. Usually stat\u00a0shows\u00a0how much traffic your WHM can manage with specific hardware requirement and how much you can tweak to accept more traffic. The stat is based on overall monthly traffic (Including all Hosted sites on your WHM)<\/p>\n<div id=\"table_14753079_wrapper\" class=\"dataTables_wrapper\">\n<table id=\"table_14753079\" class=\"display dataTable\" width=\"100%\">\n<thead>\n<tr>\n<th class=\"sorting_disabled\" colspan=\"1\" rowspan=\"1\">Traffic<\/th>\n<th class=\"sorting_disabled\" colspan=\"1\" rowspan=\"1\">Memory (GB)<\/th>\n<th class=\"sorting_disabled\" colspan=\"1\" rowspan=\"1\">CPU Cores<\/th>\n<th class=\"sorting_disabled\" colspan=\"1\" rowspan=\"1\">Tweak Possible Traffic<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"odd\">\n<td class=\" \">25K to 50K<\/td>\n<td class=\" \">2<\/td>\n<td class=\" \">2<\/td>\n<td class=\" \">75K<\/td>\n<\/tr>\n<tr class=\"even\">\n<td class=\" \">1M to 2M<\/td>\n<td class=\" \">4<\/td>\n<td class=\" \">4<\/td>\n<td class=\" \">3M<\/td>\n<\/tr>\n<tr class=\"odd\">\n<td class=\" \">3M to 5M<\/td>\n<td class=\" \">8<\/td>\n<td class=\" \">8<\/td>\n<td class=\" \">6M<\/td>\n<\/tr>\n<tr class=\"even\">\n<td class=\" \">7M to 10M<\/td>\n<td class=\" \">12<\/td>\n<td class=\" \">12<\/td>\n<td class=\" \">11.5M<\/td>\n<\/tr>\n<tr class=\"odd\">\n<td class=\" \">12M to 15M<\/td>\n<td class=\" \">16<\/td>\n<td class=\" \">16<\/td>\n<td class=\" \">17M<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>* Database Size\u00a0matters, with above figure Database Size not calculated.<\/p>\n<p>*\u00a0More than 17M \u2013\u00a0You should better switch to Dedicated<\/p>\n<p>&nbsp;<\/p>\n<p>To tweak for more traffic find this line in your apache, the following config is default with WHM you can edit the nos according to your CPU Cores &amp; Memory. I assume that you might have 2GB Memory and 2 CPU Cores and the apache <span class=\"skimlinks-unlinked\">httpd.conf<\/span> may have following values.<\/p>\n<p>You could find the file at the following destination\u00a0\/usr\/local\/apache\/conf\/<span class=\"skimlinks-unlinked\">httpd.conf<\/span><\/p>\n<p>Note: You might found blank entries between\u00a0&lt;IfModule prefork.c&gt;&lt;\/IfModule&gt; and you can add following lines between tag and change as per your requirement.<\/p>\n<p>&lt;IfModule prefork.c&gt;<\/p>\n<p>StartServers 3 (Change it as per your CPU Cores)<\/p>\n<p>MinSpareServers 3\u00a0(Change it as per your CPU Cores)<\/p>\n<p>MaxSpareServers 10 (Do not change)<\/p>\n<p>ServerLimit 50\u00a0\u00a0(Control the maximum value for MaxClients)<\/p>\n<p>MaxClients 50\u00a0\u00a0(Limit on the number of simultaneous requests)<\/p>\n<p>MaxRequestsPerChild 2000 (Number of requests a child server OR each\u00a0Domain will handle)<\/p>\n<p>&lt;\/IfModule&gt;<\/p>\n<p><strong>Also Find Following &amp; Change OR if not mentioned in your <span class=\"skimlinks-unlinked\">httpd.cof<\/span> then add them<\/strong><\/p>\n<p><strong>KeepAlive Off<\/strong><\/p>\n<p>(KeepAlive allows your visitors to\u00a0use\u00a0multiple requests over the same TCP connection, this helps improve latency because your visitors can request your webpage, images, and javascripts all over one connection. You\u00a0can safely reduce this value. <strong>If your site has lots of images, java scripts and bigger database then you should keep this on<\/strong>)<\/p>\n<p>&nbsp;<\/p>\n<p><strong>KeepAliveTimeout 15<\/strong><\/p>\n<p>(If you leave KeepAlive turned on you should change the default KeepAliveTimeout value. This prevents unused connections from staying open for excessive amounts of time.)<\/p>\n<p>&nbsp;<\/p>\n<p><strong>MaxKeepAliveRequests 100<\/strong><\/p>\n<p>(If you leave KeepAlive on you should\u00a0increase MaxKeepAliveRequests. Setting this higher allows more requests per connection and increases the performance and stability)<\/p>\n<p>Once changes done. Restart the HTTP Server (Recommended Restart Server), to changes take affect.<\/p>\n<p><strong>If you have any queries, questions feel free to ask about\u00a0Optimize Apache For WordPress \u2013 High Traffic Websites<\/strong><\/p>\n<p>Description<\/p>\n<div id=\"snippet-box\">\n<div class=\"aio-info\">\n<div class=\"snippet-data-img\">Practically it\u2019s seen that many people finding solution for optimizing wordpress but didn\u2019t check the requirement to do so. If you have traffic more than 1M\/Month and VPS has Memory of 2GB with 2 Cores CPU and running WHM then it\u2019s complicated to switch to more traffic, since WHM is not made to accept high traffic due to buffer delay between CPU Cores, Memory, Mysql Database &amp; HTTP<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>OPTIMIZE APACHE FOR WORDPRESS \u2013 HIGH TRAFFIC WEBSITES This article will help you to tweak\u00a0your apache server and can aceept\u00a0high traffic, but let\u2019s talk about the insides and possibilities first. Optimizing apache matters the server&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-he-thong"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}