Hire an Agile Team for your business

Create your own agile squad with experienced members for your business.

Connect with Experts

Woocommerce Speed Optimization Tips

speeding up woocommerce site

Last Updated on Dec 24, 2024 by Nurul Afsar

How to speed up WooCommerce Store?

Do you own a WooCommerce store and struggling to improve the speed? Are you trying your best to optimize your Woocommerce store to rank higher on Google?

Shoppers are always in a hurry. If you run an eCommerce store, you know the importance of making it load faster. Speed of the website ensures a great shopping experience. A website that loads quickly will have a better position on the search engine results pages, better ROI, happier customers, etc.

WooCommerce is one of the easiest ways to launch an online store. Buy a domain, purchase hosting, set up WordPress, install the WooCommerce plugin, and your store is ready to take in orders. Due to the simplicity of the installation, WooCommerce has managed to get huge popularity in such a short time that no other Ecommerce system has managed to do so. According to BuiltWith, WooCommerce is the most popular checkout system in the top one million sites. WooCommerce checkout powers 28% of the top one million sites, making it the first on the list.

 

a pie chart of Wocommerce percentage on top one million site by BuiltWith
A pie chart of Wocommerce percentage on top one million sites by BuiltWith

If you are a proud WooCommerce store owner and are looking for ways to improve the site’s speed, we got you covered. We will share some excellent tips and tricks that will surely help you optimize and improve the speed of your WooCommerce site.

1. Increase WordPress memory limit

The default memory of WordPress is set to 32MB only. The first thing one should do after setting up a WooCommerce store is to increase the WordPress memory limit. As it is expected to exceed at one point and eventually start giving a fatal error message, we suggest combating this problem once you open the store. There are two easy ways to solve this: do it by yourself or ask your hosting provider to do it for you.

Edit the wp-config.php file

  • Let’s open the wp-config.php file, which is located in the WordPress root folder. Scroll to the bottom, and you will see a line like this: /* That’s all, stop editing! Happy blogging. */
  • Add this line above the happy blogging line: define(‘WP_MEMORY_LIMIT’, ‘256M’)

Edit PHP.ini file to increase WordPress Memory limit

If you have access to the PHP.ini file, you can also increase the WordPress memory limit from here. If the line shows 64M, just change it to 256M: memory_limit = 256M

Edit the .htaccess file

Did you know that you can also use the .htaccess file to increase the WordPress memory limit? If you are missing access to PHP.ini, add this line to the .htaccess file: php_value memory_limit 256M

If you have followed our instructions above to increase the WP memory limit, you have completed one of the best ways to speed up a WooCommerce site.

2. Use a WordPress Caching Plugin

As you already know, WordPress pages are dynamic. One of the easiest ways to speed up your WooCommerce store is by creating a static version of the website.

Caching means temporarily storing or copying resources from the first request so that the subsequent requests are executed more quickly. Often overlooked, this is one of the best ways to speed up your WordPress site. 

There are two types of web caching that we can implement: 

Server-side caching: WooCommerce sites are dynamic. Our target is to make static to improve the speed. If your hosting or server provider supports a caching solution by default, it would just show an HTML version of the webpage to increase the speed. Another way to explain this would be to the server’s caching feature remembering part of the web page, meaning the whole page does not have to be loaded every time.

Client-side caching / Browser Caching:

Simply put, browser caching is a system where the browser remembers how a web page looked like in the fast visit so that the browser doesn’t have to load all the files if requested again. Browser caching is suitable for WooCommerce users as the customers are always looking for related products, and they will be visiting multiple pages of your site. The browser can store static files like stylesheets and Javascript files, improving the speed of the website. 

Recommended Plugins:

Breeze WordPress Cache Plugin: Breeze cache plugin recently got fame for some of its cool features like file exclusion feature, combining ability of CSS and JS files, enabling GZIP compression.

WP Rocket poster

Wp Rocket: Wp Rocket is one of the best WooCommerce caching plugins that one can imagine. It has cache preloading, browser caching, GZIP compression feature, HTML & CSS minifying ability, lazy loading feature, and more. The pro version of this plugin comes with tons of other cool features designed to load WooCommerces sites much faster.

W3 Total Cache: W3 total cache is a seasoned cache plugin that has served thousands and thousands of WordPress users for a very long time. Unlike other WooCommerce cache plugins, this one is a bit tricky to use. If you want to make the best out of it, you will have to tweak some settings. They have features like browser caching, database caching, page caching, object caching, etc.

3. Optimize the Images

Optimizing images is a no-brainer. If you upload big product images, it will just add to the size of the page and slow it down. If you are a WooCommerce store owner, you will be uploading a lot of product images. While it is important to have pictures of products from different angles, it may slow down your website if the images are not optimized. If you are using a jpeg, png, and another popular format of images, we highly recommend you reduce its size. If you run your web page on the page speed insights tool, you will see that Google is recommending webp format. While Google Pagspeed insights do give you the list of the images, you can also use a plugin to create webp files online. 

There are many plugins available online to reduce the size of the image, make them lossless, and more to help you speed up your WooCommerce store.

WP Smush: WP Smush is one of the best image optimization plugins for WooCommerce store owners. You will be able to compress any images on the directory for free. However, the free option only allows you to compress 50 images at one time.

Imagify: This is a great plugin to automatically optimize your JPEG, PNG, and GIF files. You will be able to reduce the size of the images by up to 70%. 

ShortPixel: ShortPixel is by far one of the most used plugins by different CMS owners to reduce the size of their products. Their image optimization technology has always been improving, and you will be able to check the examples on their website.

4. Deliver Static Resources Via CDN

CDN or content delivery network is simply a group of servers placed strategically around the world to deliver a faster connection to the users once requested. Once enabled, a CDN will cache and deliver the static resources like images, JS files, CSS files, etc. You will be surprised to know that some of the powerful CDNs can also deliver dynamic content like audio and video.

Let’s say you have a WooCommerce site that covers different places in the United States. Let’s say you don’t have a CDN enabled. In that case, the customer’s connection will travel to the only data center you are using. However, if you have CDN enabled, the data will be derived from the closest data center, making it quicker than the single data center connection.

Besides improving the speed of the WooCommerce website, a CDN service will also protect your site from malicious attacks. Also, even if your site is hosted on a high-speed server, it is still limited by its physical/geographical location. The time to first byte (TTFB) will always be higher than normal. By using a WordPress CDN, you can decrease the distance between the data center and the user.

5. Optimize Website Code

As a veteran eCommerce site webmaster, I have noticed that the number of files on most sites can be staggering. As the number of products and customer grows, the number of files also grows rapidly. And if you are implementing new features on your site, it even becomes worse. While some CMS may be able to handle this smoothly, WooCommerce struggles with it. It is imperative that the webmaster works with the developers to minimize the codes to improve the overall speed of the WooCommerce store. There are many ways one can reduce the size of the codes, and GZIP should be the first one.

Gzip Compression: Enabling Gzip compression is a no-brainer. Gzip compression reduces the size of the static resources. It will compress HTTP content before it is delivered to the client on the server-side. Usually, Gzip compresses around 80% of the file size, significantly improving the website’s speed. It is the most popular lossless data compression method that you can enable using a plugin or editing the .htaccess file.

6. Enable GZIP Compression

GZIP compression significantly reduces the size of your website files, allowing them to be transferred to users more quickly. This optimization enhances loading times and overall performance. Here’s how you can enable GZIP compression:

1. Using a Caching Plugin

    Many popular caching plugins like WP Rocket, W3 Total Cache, or LiteSpeed Cache include a GZIP compression option. Follow these steps:

    • Install and activate your preferred caching plugin.
    • Navigate to the plugin’s settings.
    • Look for a section labeled Compression, Performance, or GZIP Settings.
    • Enable GZIP compression and save your settings.

    2. Through Your Hosting Provider

    Most modern hosting providers offer built-in GZIP compression. You can enable it via your hosting control panel:

    • Log in to your hosting account (e.g., cPanel, Plesk).
    • Locate the Optimize Website or Compression tool under the software or advanced section.
    • Select Compress all content and save the changes.
    • If you’re unsure, contact your hosting provider’s support team to request GZIP compression activation.

    3. Manually via .htaccess File (For Apache Servers)

    For advanced users, GZIP can be enabled manually by editing the .htaccess file. Add the following code to the file located in your WordPress root directory:

    <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
    </IfModule>
    

    For NGINX Servers

    If your server uses NGINX, you’ll need to edit the configuration file:

    gzip on;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_min_length 1000;
    gzip_vary on;

    Add the codes shared above and save the configuration, and then restart the NGINX servers.

    Finally, verify that GZIP compression is active using online tools like Google PageSpeed Insights or GTmetrix. Enabling GZIP compression ensures faster data transfer and a better user experience.

    Codes on a screen

    7. Minify CSS, JavaScript, and HTML

    Minifying CSS, JavaScript, and HTML reduces file sizes by removing unnecessary characters like spaces, comments, and line breaks. This optimization improves load times by enabling browsers to process files more efficiently.

    To automate minification, use plugins like Autoptimize or WP Rocket. After installing and activating these plugins, navigate to their settings and enable options to minify CSS, JavaScript, and HTML. These tools can also combine files to reduce HTTP requests, further enhancing performance.

    For advanced users, manual minification can be done using tools like UglifyJS for JavaScript or CSSNano for CSS. However, plugins are often more convenient and safer for most WordPress users.

    Always test your website after enabling minification to ensure it functions correctly, as poorly configured settings can break layouts or scripts. Use tools like Google PageSpeed Insights to verify improvements.

    8. Reduce Plugin Usage

    Excessive plugins can bloat your website and slow it down. Audit your installed plugins regularly and deactivate or uninstall unnecessary or redundant ones. Prioritize lightweight, well-coded plugins that serve essential functions without overloading your server. For tasks like caching or image optimization, choose multipurpose plugins to reduce the total number of installations. Additionally, avoid plugins that duplicate WordPress’s built-in features. Reducing plugin usage improves speed, enhances website security, and minimizes compatibility issues. Always test your site after removing plugins to ensure it functions as expected.

    9. Choose a High-Performance Hosting Provider

    Your hosting provider plays a crucial role in your website’s speed and overall performance. Opt for a high-performance hosting provider specializing in WordPress and WooCommerce, such as SiteGround, WP Engine, or Bluehost. These providers offer features like SSD storage, server-side caching, and optimized database management, ensuring faster load times. Managed hosting services often include automatic updates, security features, and expert support tailored to WordPress. Avoid shared hosting for high-traffic websites, as it can lead to slower speeds due to resource sharing. Investing in quality hosting is a foundational step in creating a fast, reliable, and scalable website.

    database optimization poster

    10. Regularly Optimize Your Database

    Over time, your WordPress database accumulates unnecessary data such as post revisions, trashed items, and expired transients, which can slow down your website. Regular optimization ensures a lean and efficient database, improving site performance. Use plugins like WP-Optimize or Advanced Database Cleaner to automate the cleanup process. These tools remove clutter, optimize tables, and streamline database queries. For manual optimization, access your database via phpMyAdmin and use the OPTIMIZE TABLE command. Always back up your database before making changes. Routine optimization reduces server load, enhances speed, and ensures your website runs smoothly even as your content grows.

    the image of the design on WP astra theme

    11. Use a Lightweight Theme

    Selecting a lightweight theme optimized for speed is essential to improve website performance. Themes like Astra, GeneratePress, or Neve are specifically designed with minimal code bloat, ensuring faster loading times. These themes focus on essential features, allowing you to add only what’s necessary through plugins or customizations. Avoid overly complex themes with excessive scripts, features, or animations that can slow down your site. Lightweight themes are also highly compatible with page builders and WooCommerce, ensuring smooth functionality. By starting with a fast foundation, you’ll create a website that delivers an excellent user experience and performs well on speed tests.

    12. Upgrade PHP Version

    Upgrading to the latest stable PHP version is a simple yet impactful way to improve your website’s speed and performance. Newer versions, such as PHP 8.x, are faster and more efficient, offering significant performance enhancements and better resource usage compared to older versions. They also include security updates, reducing vulnerabilities. To upgrade, check your hosting control panel or contact your hosting provider for assistance. Before updating, ensure your WordPress themes, plugins, and WooCommerce installation are compatible with the newer PHP version. Testing in a staging environment is recommended to avoid conflicts and ensure a seamless transition to improved performance.

    13. Minimize Redirects

    Reducing the number of redirects on your website is crucial for improving speed and performance. Each redirect creates an additional HTTP request-response cycle, increasing load times and slowing down the user experience. Common causes include unnecessary 301 or 302 redirects, outdated URLs, or chains of redirects. To minimize them, audit your website using tools like Google PageSpeed Insights or Screaming Frog to identify and resolve unnecessary redirects. Update internal links to point directly to the final destination and ensure your website structure is clean and efficient. Fewer redirects lead to faster loading pages and an overall better user experience.

    lazy loading pagespeed insights

    14. Lazy Load for Images and Videos

    Implementing lazy loading for images and videos can significantly improve website speed and user experience. Lazy loading ensures that media files are loaded only when they are about to appear in the user’s viewport, reducing initial page load times and bandwidth usage. This optimization is especially effective for pages with a lot of media content. WordPress includes native lazy loading for images, but you can enhance functionality using plugins like Lazy Load by WP Rocket or Smush. By deferring the loading of off-screen media, you can speed up your site, lower server requests, and improve Core Web Vitals scores.

    an illustration of web design and development

    15. Improve Web Design

    A well-optimized web design can enhance your site’s speed and user experience. Simplify your layout by reducing unnecessary elements, such as excessive animations, widgets, or large sliders, which can slow down loading times. Use a mobile-friendly, responsive design to ensure fast performance across devices. Optimize fonts by limiting the number of styles and using system or web-safe fonts. Leverage asynchronous loading for scripts to prevent delays in rendering. Keep CSS and JavaScript minimal and inline critical CSS for faster above-the-fold rendering. A clean, efficient design not only improves speed but also creates a user-friendly experience, encouraging engagement and retention.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Contact Account Cart Search Cart Open Menu Arrow Link Arrow Chat Close Close Popup Facebook Twitter Google Plus linkedin2