Do you want to improve your ecommerce website speed and performance? You‘re not alone.
As an ecommerce business owner, you know that site speed has a huge impact on your bottom line. In fact, a 1 second delay in page load time can result in a 7% reduction in conversions. And according to Google, the average ecommerce site in every industry takes over 5 seconds to fully load – so most sites need work!
The good news is that there are a number of ways you can dramatically speed up your WordPress ecommerce site. In this expert guide, we‘ll share 14 practical tips to help you improve your site‘s performance and boost your conversion rates.
1. Invest in High-Performance Ecommerce Hosting
Your web hosting is the foundation of your ecommerce site. It has a huge impact on speed, scalability, and reliability.
While discount shared hosting may be tempting, it doesn‘t provide the server resources an ecommerce site needs to load quickly – especially during peak traffic. Managed cloud hosting is a much better choice.
With managed cloud hosting, your site runs on virtualized server instances powered by leading cloud platforms like Google Cloud and AWS. It comes with built-in autoscaling, redundancy, security, and performance optimization.
We use Cloudways hosting for all our ecommerce sites. The combination of scalable cloud infrastructure, optimized stack, and expert support has helped us achieve:
- Average response time of 250 ms (compared to 600 ms with shared hosting)
- 99.5 ms TTFB (time to first byte)
- 100% uptime for the past 90 days
For WooCommerce and WordPress sites, we also recommend these hosts:
- Kinsta
- Nexcess
- WP Engine
- SiteGround
2. Use a Global Content Delivery Network (CDN)
A CDN allows you to deliver your site‘s static assets from servers that are geographically closer to your visitors. This reduces network latency and dramatically improves load times.
Here‘s how the process works:
- A visitor lands on your ecommerce store
- Their browser requests static assets (images, CSS, JS, etc) from your origin server
- Those assets are cached and stored on a network of global edge servers
- On subsequent requests, assets are served from the closest CDN edge server
We use the Cloudflare CDN on all our WordPress sites. After enabling Cloudflare, we saw a 38% reduction in server response time and a 45% improvement in page load time.
Other leading CDN options for ecommerce include:
- Fastly
- KeyCDN
- StackPath
- Sucuri
3. Optimize Your Product Images
According to HTTP Archive, images make up on average 50% of an ecommerce page‘s total weight. So optimizing your product images can have a huge impact on page load times.
Here are a few best practices:
- Resize images to be close to the size they‘ll display on the page
- Use an image compression tool like TinyPNG, Imagify, or ShortPixel
- Implement lazy loading to only load images when they‘re visible on the screen
- Serve images in next-gen formats like WebP when possible
WooCommerce allows you to include multiple image sizes for each product. We‘ve found that using an image width of 800-1200px works well as a default. For zoomed-in product photos, you can go up to 2000px.
Here‘s a quick comparison of file sizes and load times after optimizing product images on our demo store:
| Image Size | Original | Optimized | % Reduction |
|---|---|---|---|
| 640×640 | 120 KB | 25 KB | 79% |
| 1200×1200 | 450 KB | 85 KB | 81% |
| 2000×2000 | 1.2 MB | 235 KB | 80% |
After optimization, the load time for the product page dropped from 4.2 seconds to 1.5 seconds.
4. Minimize HTTP Requests
When a visitor lands on your site, their browser sends an HTTP request to your server for each on-page element – images, CSS files, scripts, fonts, etc. The more requests, the longer it takes the page to load.
Reducing the number of HTTP requests is one of the most effective ways to speed up your ecommerce site. Here are a few ways to do that:
- Combine CSS and JavaScript files
- Use CSS sprites to consolidate images
- Replace JavaScript with CSS animations when possible
- Minimize use of web fonts and icon libraries
- Inline small CSS or JavaScript snippets
On a client‘s WooCommerce site, we were able to reduce HTTP requests from 105 to 38 by combining files, using sprites, and eliminating an unused font library. This resulted in a 1.8 second improvement in load time.
5. Implement Page & Browser Caching
Caching stores frequently accessed data in a temporary storage location (or cache) so it can be quickly retrieved. There are a few types of caching that are important for ecommerce sites:
- Page caching: Creates a static HTML copy of a page and serves it to visitors, reducing the processing load on the server.
- Browser caching: Stores elements like images, CSS, and JS in the visitor‘s browser so they don‘t have to be re-downloaded on subsequent visits.
- Object caching: Stores frequently accessed database queries so they can be quickly retrieved.
The easiest way to set up caching on WordPress is with a plugin. Two of our favorites are WP Rocket and WP Super Cache. They allow you to enable page caching, browser caching, GZIP compression, and other performance features with just a few clicks.
On average, we‘ve seen a 52% reduction in page load time just from implementing WP Rocket‘s recommended settings.
6. Optimize Your Database
Your WordPress database stores all your ecommerce site‘s content – products, orders, customer data, etc. Over time, it can accumulate clutter and slow down your site.
Optimizing your database involves:
- Removing orphaned meta data
- Deleting unused tags, categories, and products
- Clearing transients
- Removing spam comments
- Optimizing database tables
For most sites, we recommend optimizing your database every 3-6 months. You can use a plugin like WP-Optimize or WP-DBManager to handle the process.
7. Choose a Lightweight Ecommerce Theme
When it comes to WordPress themes, simple is best. Many popular ecommerce themes come loaded with complex layouts, sliders, mega menus, and other features that can slow down your site.
Instead, choose a lightweight, highly extensible theme as your foundation. Then add on features with plugins as needed. This keeps your theme code lean and fast.
Some of the fastest loading ecommerce themes we‘ve tested include:
- Astra
- Neve
- OceanWP
- GeneratePress
On a recent client project, switching from a bloated theme to Astra cut fully loaded time from 6.2 seconds to 2.1 seconds.
8. Lazy Load Off-Screen Elements
Lazy loading means deferring loading of an element until it‘s needed. It‘s most commonly used for images, but can also be applied to videos, iframes, and Javascript.
On an ecommerce site, you should lazy load all off-screen elements. That way, elements at the top of the page aren‘t held up by less important content below the fold.
To implement lazy loading in WordPress, we recommend using a3 Lazy Load. It works out of the box and has extensions for lazy loading videos, iframes, and more.
9. Optimize CSS Delivery
CSS is a render blocking resource. Before the browser can display your page, it needs to download and parse all the CSS files. That‘s why it‘s important to optimize your CSS delivery.
There are a few ways you can do this:
- Minimize CSS by removing white space, comments, and unnecessary characters
- Combine multiple CSS files into one
- Inline critical above-the-fold CSS and defer non-critical CSS
- Remove unused CSS with a tool like UnusedCSS
WP Rocket can handle most of these CSS optimizations automatically. By combining files, minifying the code, and optimizing the delivery, WP Rocket can shave off up to 1 second in total load time.
10. Eliminate Unnecessary Redirects
Redirects create additional HTTP requests and slow down page rendering. While necessary at times, it‘s important to eliminate unnecessary redirects on your ecommerce site.
Here are a few tips:
- Always link to your final URL, not a redirect
- Update any internal links that point to redirected pages
- If you have multiple domains (e.g. example.com and www.example.com), pick one as your main domain and stick with it
- Switch to HTTPS and make sure all links use the HTTPS version
You can use the Redirect Path Chrome extension to easily identify redirects as you browse your site.
11. Enable GZIP Compression
GZIP compresses your site‘s HTML, CSS, and JavaScript before sending them over to the visitor‘s browser. This can reduce transfer size by 70% and significantly speed up your pages.
To enable GZIP, you‘ll need to modify your web server configuration. If your host uses Apache, you can enable compression by adding this code to your .htaccess file:
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
</IfModule>For NGINX servers, add this to your nginx.conf file:
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;You can use a tool like GiftOfSpeed to check if GZIP is enabled on your site.
12. Upgrade to PHP 8
PHP is the back-end language that powers WordPress and WooCommerce. And the new PHP 8 offers huge performance improvements.
Compared to PHP 7.4, PHP 8 offers up to 18% faster performance on WordPress:
| PHP Version | Requests Per Second | Relative Change |
|---|---|---|
| PHP 7.4 | 154 | 0% |
| PHP 8.0 | 181 | +18% |
Source: Kinsta PHP Benchmarks
To upgrade, follow these steps:
- Check to make sure WordPress & your plugins are compatible with PHP 8
- Create a complete backup of your website
- Access your hosting control panel and look for an option to change your PHP version
- After the upgrade, test your site thoroughly and monitor error logs for issues
Upgrading from PHP 7.4 to 8.0 improved the load time on our WooCommerce demo site from 1.3s to 0.8s.
13. Disable WordPress Heartbeat API
The WordPress Heartbeat API shows real-time plugin notifications, collects post edit lock information, and more. But it can also strain your server with frequent AJAX requests.
To optimize performance, we recommend limiting the Heartbeat API activity. You can do this with a few lines of code in your theme‘s functions.php file:
add_action( ‘init‘, ‘stop_heartbeat‘, 1 );
function stop_heartbeat() {
wp_deregister_script(‘heartbeat‘);
}This will completely disable the Heartbeat API. If you still need some functionality, you can modify the code to limit the frequency instead:
add_filter( ‘heartbeat_settings‘, ‘optimize_heartbeat‘ );
function optimize_heartbeat( $settings ) {
$settings[‘interval‘] = 60; //change interval to 60 seconds
return $settings;
}After disabling Heartbeat completely, we saw a 10% reduction in CPU usage and a 256 KB reduction in network transfer on the checkout page.
14. Monitor Performance & Keep Optimizing
Site speed optimization is an ongoing process. As you add new products, content, and features to your store, it‘s important to keep a close eye on performance.
We use a combination of these tools to monitor site speed:
- Google PageSpeed Insights
- GTmetrix
- WebPageTest
- New Relic (production monitoring)
- Kinsta APM (WordPress performance monitoring)
Some key metrics to watch are:
- Page load time
- Time to first byte (TTFB)
- First contentful paint
- Time to interactive
- Total blocking time
- Cumulative layout shift
You should audit and optimize your site every quarter, or whenever you make major changes like adding new plugins or switching themes.
Speed Up Your Ecommerce Site Today
Site speed is critical for ecommerce success. Faster pages lead to better user experience, higher conversion rates, and more revenue.
To recap, here are 14 ways you can speed up your ecommerce site:
- Invest in high-performance ecommerce hosting
- Use a global CDN
- Optimize your product images
- Minimize HTTP requests
- Implement page & browser caching
- Optimize your database
- Choose a lightweight theme
- Lazy load off-screen elements
- Optimize CSS delivery
- Eliminate unnecessary redirects
- Enable GZIP compression
- Upgrade to PHP 8
- Disable WordPress Heartbeat API
- Monitor performance & keep optimizing
By following these tips, you can shave seconds off your load time and unlock more sales.
If you have any questions or other optimization tips to share, let us know in the comments!
