{"id":3436,"date":"2013-09-10T17:51:53","date_gmt":"2013-09-10T17:51:53","guid":{"rendered":"http:\/\/www.dognmonkey.com\/techs\/?p=3436"},"modified":"2013-10-18T18:03:23","modified_gmt":"2013-10-18T18:03:23","slug":"optimize-websites-for-speed-and-cpu-usages","status":"publish","type":"post","link":"https:\/\/www.dognmonkey.com\/techs\/optimize-websites-for-speed-and-cpu-usages.html","title":{"rendered":"Optimize Websites For Speed And CPU Usages"},"content":{"rendered":"<p style=\"text-align: center;\"><em>After setting up blog(s) on server, create themes, write posts, get traffic, then we need to optimize the websites to be fast and efficient. There are 2 webtools to check the speed of our pages.<\/em><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/pingdomtechs.jpg\" rel=\"lightbox[speed]\"><img loading=\"lazy\" decoding=\"async\" class=\"none size-medium wp-image-3438\" alt=\"pingdom tools\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/pingdomtechs-300x213.jpg\" width=\"300\" height=\"213\" srcset=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/pingdomtechs-300x213.jpg 300w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/pingdomtechs.jpg 625w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\u00a0 \u00a0 \u00a0<a class=\"preview\" href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/pagespeed.jpg\" rel=\"lightbox[speed]\"><img loading=\"lazy\" decoding=\"async\" class=\"none size-medium wp-image-3439\" alt=\"google pagespeed\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/pagespeed-300x245.jpg\" width=\"300\" height=\"245\" srcset=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/pagespeed-300x245.jpg 300w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/pagespeed.jpg 913w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>1. Move all JavaScripts to Footer instead on placing them on the &lt;head&gt; sections. We want to load the whole page up fast before any scripts.<\/em><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/footer.jpg\" rel=\"lightbox[speed]\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3440\" alt=\"scripts in footer\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/footer-300x135.jpg\" width=\"300\" height=\"135\" srcset=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/footer-300x135.jpg 300w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/footer.jpg 967w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>2. Use<a title=\"js minifier\" href=\"\/\/javascript-minifier.com\/\" target=\"_blank\"> js minify<\/a> &amp; <a class=\"preview\" title=\"css minifier\" href=\"\/\/cssminifier.com\/\" target=\"_blank\">css minify<\/a> tools to minify all css and js files used on the footer to reduce the sizes for faster page loading.<\/em><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/cssminify.jpg\" rel=\"lightbox[speed]\"><img loading=\"lazy\" decoding=\"async\" class=\"none size-medium wp-image-3442\" alt=\"css minifying\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/cssminify-300x111.jpg\" width=\"300\" height=\"111\" srcset=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/cssminify-300x111.jpg 300w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/cssminify-1024x381.jpg 1024w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/cssminify.jpg 1210w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\u00a0 \u00a0 \u00a0<a class=\"preview\" href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/jsminify.jpg\" rel=\"lightbox[speed]\"><img loading=\"lazy\" decoding=\"async\" class=\"none size-medium wp-image-3443\" alt=\"js minifying\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/jsminify-300x107.jpg\" width=\"300\" height=\"107\" srcset=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/jsminify-300x107.jpg 300w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/jsminify-1024x366.jpg 1024w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/jsminify.jpg 1188w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>3. Compress and deflate files at the server level for faster page loading. Add commands in .htaccess of the blog.<\/em><\/p>\n<blockquote><p># BEGIN Compress text files<br \/>\n&lt;ifModule mod_deflate.c&gt;<br \/>\nAddOutputFilterByType DEFLATE text\/html text\/plain text\/xml application\/xml application\/xhtml+xml text\/css text\/javascript application\/javascript application\/x-javascript<br \/>\n&lt;\/ifModule&gt;<br \/>\n# END Compress text files<\/p><\/blockquote>\n<p style=\"text-align: center;\"><em>4. To reduce CPU usage &#8211; Turn off the WP_Cron in the wp_config.php file and install <a title=\"wp_supercache plugin\" href=\"\/\/www.dognmonkey.com\/techs\/wp-super-cache-plugin-helps-reduce-cpu-usage.html\">super cache plugin<\/a>.<\/em><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/wp_cron.jpg\" rel=\"lightbox[speed]\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3445\" alt=\"disable wp_cron\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/wp_cron-300x123.jpg\" width=\"300\" height=\"123\" srcset=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/wp_cron-300x123.jpg 300w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2013\/09\/wp_cron.jpg 479w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>5. Spams also cause CPU usage &#8211; to prevent spam to login as administrator &#8211; add the ip address and <a title=\"prevent spam login\" href=\"\/\/www.dognmonkey.com\/techs\/limit-wp-login-php-with-htaccess.html\">deny all others in .htaccess<\/a>.<\/em><\/p>\n<p style=\"text-align: center;\">\n<ul class=\"lcp_catlist\" id=\"lcp_instance_0\"><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>After setting up blog(s) on server, create themes, write posts, get traffic, then we need to optimize the websites to be fast and efficient. There are 2 webtools to check the speed of our pages. \u00a0 \u00a0 \u00a0 1. Move all JavaScripts to Footer instead on placing them on the &lt;head&gt; sections. We want to <a href=\"https:\/\/www.dognmonkey.com\/techs\/optimize-websites-for-speed-and-cpu-usages.html\" class=\"more-link\">&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,20],"tags":[385,381,382,383,380,384],"class_list":["post-3436","post","type-post","status-publish","format-standard","hentry","category-tips-and-tricks","category-wordpress","tag-cpu-usage","tag-css-minify","tag-js-minify","tag-scripts","tag-super-cache","tag-website-speed"],"views":233,"_links":{"self":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/3436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/comments?post=3436"}],"version-history":[{"count":6,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/3436\/revisions"}],"predecessor-version":[{"id":3478,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/3436\/revisions\/3478"}],"wp:attachment":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/media?parent=3436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/categories?post=3436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/tags?post=3436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}