{"id":135,"date":"2018-04-29T19:18:11","date_gmt":"2018-04-30T02:18:11","guid":{"rendered":"https:\/\/codedcommerce.com\/?p=135"},"modified":"2024-04-10T12:16:39","modified_gmt":"2024-04-10T19:16:39","slug":"speeding-up-woocommerce-sites","status":"publish","type":"post","link":"https:\/\/codedcommerce.com\/speeding-up-woocommerce-sites\/","title":{"rendered":"Speeding-up WooCommerce sites"},"content":{"rendered":"\n<p class=\"has-drop-cap wp-block-paragraph\">Performance is a priority for all website administrators these days. Particularly with content management systems (CMS), web admins tend to employ a wealth of powerful theme frameworks (ex: page builders) and functional plugins on top of their base design and content. These in combination offer amazing features, but can pile up and take a toll on performance. As traffic scales, so too will your performance bottlenecks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While the more popular (vetted) plugins usually serve their purpose well, the risk of slowing your site down increases as your use of plugins increases \u2013 due to the average resource consumption of each unit of functionality. This is especially noticeable with plugins that connect to remote services either with PHP APIs or with AJAX front end widgets. Let&#8217;s face it \u2013 these days we do need some plugins that connect with remote services and those will consume resources.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The most important tool in improving performance is having an optimized web host.<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Managed WordPress hosts optimize their web server environments for WordPress and bundle in best practices like page caching for unauthenticated traffic and web application firewalls (WAF).\u00a0Top tier providers often bundle a\u00a0content delivery network (CDN) system to geographically serve assets. They also may bundle application performance monitoring (APM) tools to detect and debug any resource-intensive operations within your plugins or theme. There are many solid hosts that fit this criteria and the obvious example would be\u00a0<a href=\"https:\/\/automattic.pxf.io\/c\/4304928\/1919835\/22744\" data-type=\"link\" data-id=\"https:\/\/automattic.pxf.io\/c\/4304928\/1919835\/22744\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress.com<\/a>. You get what you pay for with hosting, yet optimized infrastructure is surely within reach.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now I&#8217;ll step beyond the host itself and delve into specific areas you can examine. Begin by measuring where you stand currently, even if you plan to change hosts. You never can measure enough! Use tools like <a style=\"text-decoration: underline;\" href=\"https:\/\/gtmetrix.com\" target=\"_blank\" rel=\"noopener noreferrer\">GTmetrix<\/a> ,&nbsp;<a style=\"text-decoration: underline;\" href=\"https:\/\/tools.pingdom.com\" target=\"_blank\" rel=\"noopener noreferrer\">Pingdom Website Speed Test<\/a>,&nbsp;<a style=\"text-decoration: underline;\" href=\"https:\/\/www.webpagetest.org\" target=\"_blank\" rel=\"noopener noreferrer\">Web Page Test<\/a>,&nbsp;<a style=\"text-decoration: underline;\" href=\"https:\/\/developers.google.com\/speed\/pagespeed\/insights\/\" target=\"_blank\" rel=\"noopener noreferrer\">Google PageSpeed Insights<\/a> to measure with. At full bandwidth <strong>your pages would ideally load within 2.4 seconds \u2013 the time conversions begin getting affected<\/strong> \u2013 and never go beyond 5.6 seconds. Pay attention to the differences between render time versus fully loaded time and your page size.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your host doesn&#8217;t bundle one, investigate the best caching plugin and settings for your usage. Popular self installation options are: <a style=\"text-decoration: underline;\" href=\"https:\/\/wp-rocket.me\/pricing\/\" target=\"_blank\" rel=\"noopener noreferrer\">WP-Rocket (paid)<\/a> and <a style=\"text-decoration: underline;\" href=\"https:\/\/wordpress.org\/plugins\/w3-total-cache\/\" target=\"_blank\" rel=\"noopener noreferrer\">W3 Total Cache (free)<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Here&#8217;s my advice to help you optimize your performance.<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You will need to fully test your site with each change, so take your time and be careful! Use a staging site if possible, and always backup your live site before tinkering.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Keep your software up to date!<\/strong> Often times updates contain fixes and performance improvements, plus with out of date software you have a hard time finding good support.<\/li>\n\n\n\n<li><strong>Use CloudFlare<\/strong>, even if at the free level of service, to prevent DDoS, credit card guessing, brute force login, and other types of attacks before it even makes a dent on your web host. Upgrade for more advanced tools and features, including many items in this very list.<\/li>\n\n\n\n<li><strong>Clean your database<\/strong> with <a style=\"text-decoration: underline;\" href=\"https:\/\/wordpress.org\/plugins\/wp-optimize\/\" target=\"_blank\" rel=\"noopener noreferrer\">WP Optimize<\/a> or <a style=\"text-decoration: underline;\" href=\"https:\/\/wordpress.org\/plugins\/wp-sweep\/\" target=\"_blank\" rel=\"noopener noreferrer\">WP Sweep<\/a> plugin to remove unnecessary orphaned records, post revisions, etc.<\/li>\n\n\n\n<li>Examine your <em>wp_options<\/em> DB table to <strong>remove any autoload=yes values that no longer apply<\/strong> to your active plugins or theme, meaning from past plugins that you no longer have in use. Be careful doing this, as you don&#8217;t want to remove needed data! Always back up before deleting things.<\/li>\n\n\n\n<li>Enable <strong>page caching<\/strong> for unauthenticated traffic to be served from server RAM instead of PHP processing.<\/li>\n\n\n\n<li>Enable <strong>object caching<\/strong> with Redis to optimize data and transient performance using server RAM.<\/li>\n\n\n\n<li>Enable <strong>database caching<\/strong> to keep query results loaded in server RAM.<\/li>\n\n\n\n<li>Use a paid\u00a0<strong>CDN<\/strong> like <a style=\"text-decoration: underline;\" href=\"https:\/\/jetpack.com\/support\/photon\/\" target=\"_blank\" rel=\"noopener noreferrer\">JetPack Photon<\/a>, <a style=\"text-decoration: underline;\" href=\"https:\/\/www.fastly.com\/products\/web-and-mobile-performance\" target=\"_blank\" rel=\"noopener noreferrer\">Fastly<\/a>, <a style=\"text-decoration: underline;\" href=\"https:\/\/www.maxcdn.com\" target=\"_blank\" rel=\"noopener noreferrer\">MaxCDN<\/a>, or <a style=\"text-decoration: underline;\" href=\"https:\/\/aws.amazon.com\/cloudfront\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS CloudFront<\/a> to serve your media (primarily your images) from satellite servers around the globe.<\/li>\n\n\n\n<li>Enable <strong>gzip compression<\/strong> to ensure the web server and browsers optimize bandwidth transfer.<\/li>\n\n\n\n<li>Enable <strong>browser caching<\/strong> to ensure browsers keep a copy of your images, JS, and CSS assets<\/li>\n\n\n\n<li><strong>Lazy-load widgets<\/strong> by delaying JS execution as late as possible, towards the bottom of your HTML body and triggered by jQuery ready state or later.<\/li>\n\n\n\n<li><strong>Minify and combine<\/strong> JS and CSS asset files manually, via your caching plugin, edge services, or your theme itself.<\/li>\n\n\n\n<li><strong>Optimize images<\/strong>, TinyPNG plugin or other image compression and optimization of your Media Library.<\/li>\n\n\n\n<li><strong>Stream videos<\/strong> using Vimeo, YouTube, JetPack, or Ooyala instead of trying to hose them yourself. These services optimize the bitrate and options for the devices being served.<\/li>\n\n\n\n<li><strong>Consider Google&#8217;s accelerated mobile pages<\/strong> (AMP) format for mobile browsing using a <a style=\"text-decoration: underline;\" href=\"https:\/\/wordpress.org\/plugins\/amp\/\" target=\"_blank\" rel=\"noopener noreferrer\">plugin<\/a> to serve it, if your site is content heavy and you are okay losing normal web page features to speed-up mobile traffic. (Note: WordPress.com has this built in already.)<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"\/wp-content\/uploads\/Speed-Summit.pdf\">Download the presentation (PDF)<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Performance is a priority for all website administrators these days. As traffic scales, so too will your performance bottlenecks.<\/p>\n","protected":false},"author":1,"featured_media":158,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52047,635718625],"tags":[],"class_list":["post-135","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-woocommerce-guides"],"jetpack_featured_media_url":"https:\/\/codedcommerce.com\/wp-content\/uploads\/2018\/04\/speeding-up-woocommerce-sites-e1528916366907.png","_links":{"self":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":0,"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/media\/158"}],"wp:attachment":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}