Performance

WooCommerce Speed Optimization: 7 things to do before upgrading your hosting

Most slow WooCommerce stores are not slow because of weak hosting, but because of redundant plugins, heavy queries, and unoptimized images. This is the order I check every time I take on a project.

Đồng hồ tốc độ: LCP giảm từ 4.8s xuống 1.2s
In this article

    When an online store is slow, the first instinct is usually to “upgrade the hosting plan”. Sometimes that helps, but in over 80% of the projects I’ve worked on, the bottleneck lies within the website itself. Upgrading hosting at this point is simply paying extra to cover up the issue.

    Measure before fixing

    Don’t optimize based on feelings. Record your baseline metrics: Time to First Byte (TTFB), mobile LCP, and the number of database queries for key pages — homepage, categories, products, cart, checkout.

    • PageSpeed Insights provides real-world user data (CrUX).
    • Query Monitor to see which plugins generate slow queries.
    • Server logs to know which pages are requested the most.

    Clean up unnecessary plugins

    Every plugin adds extra CSS, JavaScript, and queries across every page. I create a spreadsheet of all plugins, marking which ones are actually used and which ones can be replaced with a few lines of code in the theme.

    A recent project removed 31 plugins and replaced them with about 200 lines of code. Page load time dropped from 6.2 seconds to 1.9 seconds.

    Enable object cache with Redis

    WooCommerce reads a lot of options and metadata. Object cache helps repeated queries to be returned from memory instead of the database.

    // wp-config.php
    define('WP_REDIS_HOST', '127.0.0.1');
    define('WP_REDIS_DATABASE', 0);
    define('WP_CACHE_KEY_SALT', 'shop_');

    Optimize product images

    Product images usually account for 60–70% of the page size. Switch to WebP/AVIF, declare proper width/height to prevent layout shifts, and only lazy-load images below the fold.

    Comparison of image size before and after optimization
    Category page size before and after converting images to WebP.

    Streamline the checkout flow

    Speed is not just about seconds. A checkout page with 14 input fields is still “slow” to customers. Remove unnecessary fields, enable address autocomplete, and keep customers on a single page.

    Customers don’t care what technology your website uses. They only remember whether it was fast or slow.

    When should you upgrade hosting?

    After performing the above steps and your TTFB is still over 600 ms during peak hours, that is the time to review your infrastructure. And when you upgrade, you will know precisely whether you need more CPU, RAM, or simply a better CDN.

    Tags:Core Web VitalsRedisWooCommerce
    Gnurt

    Full-stack developer

    Discuss your project