Please ensure Javascript is enabled for purposes of website accessibility
A bullet train speeding through a tunnel

Speed Wins: Website Optimization Playbook [2023]

August 17, 2023 by

Jay

Website speed optimization refers to strategies and best practices implemented to make a website as fast and responsive as possible. This provides several benefits like:

  • Lower bounce rates
  • Higher conversion rates
  • Improved user experience

Page speed and load times are critical for modern websites. Studies show faster sites have:

  • 3% more conversions per 1 second improvement from 15s to 7s
  • 2% more conversions per 1 second improvement from 7s to 5s
  • 1% more conversions per 1 second improvement from 4s to 2s

Mobile optimization and regular speed testing are also key for fast performance.

How website speed impacts business

Website speed has a significant impact on key business metrics like conversion rates, sales, user engagement, and more. Here’s an overview of how performance affects business success:

Impacts on Conversion Rates

  • Faster sites see higher conversion rates. For every 1 second delay in page load times, conversion rates drop 7%.
  • Obama’s campaign site improved conversions 14% by reducing load times from 5s to 2s.
  • Walmart saw 2% higher conversions for every 1s improvement in speed.
Load Time Conversion Rate
1s 39%
2s 34%
5s 22%
  • On mobile, sites loading in 5s or less have conversion rates 2x higher than slower sites.

Fast load times lead to more conversions by:

  • Keeping visitors engaged and focused
  • Maintaining visitor trust and confidence
  • Providing a smooth, seamless experience

Impacts on Sales

  • 79% of dissatisfied visitors will not return to a slow site.
  • Each 1 second delay could cost Amazon $1.6 billion per year.

Quickly delivering content leads to more sales by:

  • Reducing abandonment and bounce rates
  • Increasing number of pages viewed per visit
  • Encouraging visitors to purchase instead of seeking alternatives

Impacts on User Engagement

  • Fast sites positively impact user feelings, mental states, and interactions.
  • This creates an emotional, cognitive and behavioral connection.

High performance increases user engagement by:

  • Improving focused attention and motivation
  • Developing greater user trust
  • Creating a feeling of control for users

Other Business Impacts

  • Faster sites can reduce operational costs through more efficient infrastructure usage.
  • Improved performance boosts revenue without requiring additional investments.
  • Speed lifts SEO rankings, marketability, and brand reputation.

In summary, website speed optimization should be a top priority for any online business looking to boost conversions, sales, and user engagement. Regular performance testing is key to ensuring a fast, responsive site.

Mobile Optimization

With increasing mobile usage, optimizing for mobile is critical for providing a fast, seamless experience. Here are some key considerations:

Mobile vs Desktop Performance

  • Over 50% of website traffic now comes from mobile devices.
  • 74% of users will abandon sites that take over 5 seconds to load on mobile.
  • Mobile sites often load slower than desktop sites.
Metric Mobile Desktop
Average Load Time 6-10s <5s
Max Load Time Before Abandonment 5s 8s
Conversion Rate 0.6% 1.6%
  • Simply resizing desktop sites for mobile results in performance issues.
  • A dedicated, speed optimized mobile site is essential.

Optimizing for Mobile Users

Mobile optimization should focus on:

  • Fast page speed
  • Low page load times
  • Smooth media delivery
  • Optimized responsive design
  • Easy navigation

Test mobile site speed with tools like:

  • Google PageSpeed Insights
  • Pingdom
  • GTmetrix

Core web vitals to monitor:

  • Largest Contentful Paint
  • First Input Delay
  • Cumulative Layout Shift

Development Best Practices

  • Adopt a mobile-first development strategy
  • Use fluid grids, flexible images, and media queries
  • Focus on optimizing key elements like masthead, image galleries, etc.

The Impact of Optimization

  • 60% of users only use mobile for purchases.
  • A fast mobile site provides convenience and meets user expectations.
  • Top retailers achieve under 1s load times on mobile.

Optimizing mobile site performance enables businesses to:

  • Reach and engage mobile users.
  • Provide a seamless experience.
  • Encourage mobile purchases and conversions.
  • Stay competitive in the mobile space.

A dedicated and optimized mobile experience is now a requirement, not a luxury. Regular mobile speed testing and monitoring of core web vitals can help ensure performance.

Identifying Performance Issues

Before optimizing your site, it’s critical to identify performance issues. Here are some best practices for speed testing and pinpointing problems areas:

Speed Testing

Conduct regular performance and speed testing to establish benchmarks and quantify improvements.

Tools

  • Google PageSpeed Insights – free, provides perf scores and optimization suggestions
  • Pingdom – free, waterfalls and page load visualizations
  • GTmetrix – free, generates overall site grades

Key Metrics

Focus testing on core web vitals:

  • Largest Contentful Paint – when main content loads
  • First Input Delay – responsiveness
  • Cumulative Layout Shift – visual stability
Metric Good Poor
LCP ≤2500ms >4000ms
FID ≤100ms >300ms
CLS ≤0.1 >0.25

User Testing

  • Test from real devices in multiple locations
  • Compare perceived speed to metrics

Diagnosing Problems

Pinpoint issues through:

  • Waterfall analysis – visualize resource loading
  • Filmstrip views – see rendering over time
  • Page resource analysis – identify heavy elements
  • User session playback – reproduce experiences

Common problems include:

  • Heavy images, fonts, CSS, and JavaScript
  • Too many plugins or extensions
  • Database queries or server load
  • Third-party code performance

Optimization Roadmap

Create a prioritized roadmap for optimizing based on:

  • Business impact
  • Quick wins
  • Resource requirements

Focus on issues causing the biggest perceived slowdowns first. Continuously test and measure to ensure improvements.

Reducing Page Load Time

There are many techniques available to optimize your site and reduce page load times. Here are some of the most effective:

Minification

Minification removes unnecessary characters and whitespace from code without altering functionality. This significantly reduces file size.

Minify HTML, CSS, JavaScript, and JSON. Use tools like:

  • gulp-minify-html
  • clean-css
  • UglifyJS

Only minify code above certain size thresholds to avoid diminishing returns.

Compression

Compress resources using algorithms like Gzip and Brotli to reduce file size.

Key guidelines:

  • Don’t compress already compressed assets
  • Only compress text-based assets
  • Enable at server level for best performance
  • Test to ensure compression benefits outweigh overhead

Caching

Caching stores a copy of resources to avoid repeat network requests. This reduces server load and wait times.

Types of caching:

  • Browser caching
  • Server caching
  • CDN caching
  • Database caching

Implement caching headers, CDNs, and cache plugins. Purge caches when resources change.

Content Delivery Networks (CDNs)

CDNs have geographically distributed servers to provide faster delivery of cached static assets.

Benefits:

  • Improved performance and page loads
  • Reduced server load
  • Increased availability and redundancy

Image Optimization

Images often make up most of a page’s size. Optimize images by:

  • Choosing efficient formats (WebP, AVIF)
  • Reducing quality to acceptable levels
  • Resizing to proper dimensions
  • Compressing with tools like TinyPNG

Lazy load images below the fold to accelerate initial page loads.

Resource Loading Prioritization

Prioritize resource loading to deliver critical content faster:

  • Load CSS before JavaScript
  • Add async/defer attributes to scripts
  • Lazy load non-critical resources
  • Route critical resources through CDNs

Continuously test and measure to validate and tweak optimizations. Every millisecond counts, so an iterative approach is key to achieving a fast, lean site.

Optimizing Code

In addition to general performance best practices, optimizing your actual code is critical for a fast site.

HTML

  • Minify HTML by removing whitespace, comments, and unnecessary characters.
  • Avoid large, complex DOM trees. Simplify markup structure.
  • Use semantic, efficient tags like <header>, not <div>.
  • Concatinate and inline CSS and JS to avoid extra requests.

CSS

  • Minify CSS files and stylesheets to reduce size.
  • Combine multiple CSS files into one to limit requests.
  • Avoid CSS hacks and browser-specific styles.
  • Load CSS asynchronously to render content faster.

JavaScript

  • Minify JavaScript to eliminate whitespace and comments.
  • Concatenate multiple JS files into bundles.
  • Defer non-critical JS loading.
  • Throttle and debounce intensive functions.
  • Use efficient libraries like React and Vue.

Plugins

  • Limit plugins to only essential functionality.
  • Choose lightweight plugins that add minimal bloat.
  • Test plugins to quantify impact on performance.
  • Disable unused plugin features.

Leveraging PHP 7

Upgrading to PHP 7 can significantly improve performance:

  • PHP 7 can execute over twice as many requests per second as PHP 5.6.
  • PHP 7 also reduces latency compared to PHP 5.6.
PHP Version Requests / Second
5.6 91.64
7.0 206.71
7.1 210.98
7.2 229.18
7.3 253.20

Continuously optimizing code efficiency is required to build a lean, fast site. Measure the impact of changes using performance testing tools. Every millisecond counts.

Database Optimization

The database behind your site can have a significant impact on performance. Here are tips for optimization:

Revision Control

WordPress saves revisions of content by default. This bloats the database.

To control revisions:

  • Disable auto-saves with:
    define('WP_POST_REVISIONS', false);
    
  • Limit the number stored:
    define('WP_POST_REVISIONS', 3);
    

Fewer revisions means faster queries and less bloat.

Data Purging

Over time, databases accumulate:

  • Orphaned and unused data
  • Outdated or stale entries
  • Revisions
  • Spam comments
  • Deleted posts

Purge this data periodically by:

  • Deleting trashed posts and stale data
  • Tuning garbage collection settings
  • Archiving old content

A lean database with minimal bloat performs queries faster.

Optimization Plugins

Plugins like Query Monitor and Kinsta APM can help diagnose slow queries.

Use the findings to:

  • Add indexes to improve query performance
  • Cache common queries
  • Refine database schema

Upgrades

Leverage improved performance of:

  • PHP7 over older versions
  • InnoDB instead of MyISAM tables
  • Latest database versions like MySQL 8 and MariaDB

Regular database maintenance and optimization ensures maximum query performance and site speed.

Choosing a Hosting Provider

Your hosting infrastructure has a major impact on site speed. Here’s how to choose optimal hosting:

Shared Hosting

With shared hosting, resources are shared between many sites. This can impair performance due to:

  • Overloaded servers
  • Noisy neighbors
  • Limited resource allocation

Use for low-traffic personal sites and testing. Monitor for resource throttling.

VPS Hosting

VPS provides guaranteed resources by virtually partitioning servers. However:

  • Performance varies based on virtualization overhead.
  • Scaling still requires vertical upgrades.

Good for medium traffic sites on a budget.

Dedicated Hosting

Dedicated servers provide full hardware isolation and resources. But:

  • Scaling means purchasing new servers.
  • You manage everything including security, maintenance, etc.

Ideal for high-resource sites with in-house expertise.

Managed Hosting

With managed WordPress hosting providers like Kinsta or Siteground:

  • Resources are guaranteed and scalable.
  • Experts handle maintenance, optimization, security.
  • Built-in CDN, caching, PHP 7, and more.

Evaluating Providers

Consider providers based on:

  • Server hardware performance
  • Network quality and bandwidth
  • Built-in caching and optimization
  • PHP versions and MariaDB support
  • Ease of scaling
  • Developer experience

The right hosting is critical for site speed. Leverage managed hosting to offload infrastructure and focus on content.

Ongoing Optimization

Website performance optimization is an ongoing process, not a one-time task. Here are tips for continually improving your site’s speed:

Importance of Testing

Consistently measure and monitor site performance using tools like:

  • PageSpeed Insights
  • WebPageTest
  • Pingdom
  • Real User Monitoring (RUM)

Test:

  • Monthly, weekly or even daily
  • Before and after changes
  • On real devices
  • From multiple geographic locations

Monitor:

  • Core Web Vitals like LCP, FID, and CLS
  • Business KPIs like conversions, bounce rate
  • Resource loading and dependencies
  • 3rd party performance

Tuning and Iteration

Use test findings to incrementally improve page speed:

  • Tune caching policies and CDN configurations
  • Upgrade underlying technologies like PHP and MariaDB
  • Refine code optimizations and resource loading
  • Remove unnecessary bloat and dependencies

No single change will solve all speed issues. Adopt an iterative approach to achieve continuous gains.

User-Centric View

Consider the subjective user experience, not just speed metrics.

  • How does the site feel when using it?
  • When do users abandon tasks?
  • Does the experience meet user expectations?

Iteratively refine and tune the site based on real user data and feedback. Perceived performance is key.

Automation

Automate testing and deployment to streamline optimizing:

  • Use CI/CD pipelines to measure and deploy changes.
  • Script testing workflows.
  • Configure alerts for performance regressions.

Speed optimization is a journey, not a destination. Measure often, tune wisely, and focus on improving user experience over time.

Conclusion

  • Page speed has a demonstrated impact on conversions, revenue, and user experience.
  • Adopt a mobile-first mindset and optimize for mobile users.
  • Conduct regular performance testing and monitor core web vitals.
  • Prioritize quick wins like minificationcompressioncaching and CDNs.
  • Iteratively refine code, resources, hosting, and dependencies.
  • Choose managed hosting to handle infrastructure and optimization.
  • Continuously measure and tune based on real user data.

Key Takeaways

  • Every millisecond of performance matters. Small gains add up.
  • There is no “set it and forget it” when it comes to speed. Monitor and optimize continually.
  • User experience determines success. Quantitative metrics inform, but perceived experience rules.
  • An iterative, data-driven approach delivers the best outcomes. Test, measure, validate, repeat.
  • Leverage expertise where possible. Focus on your users, not infrastructure.

Call to Action

Follow the guide’s advice to delight your visitors with a lightning fast website. Just a few optimizations can produce dramatic improvements that directly impact your business success.

Don’t settle for “good enough” performance. Choose excellent, monitor diligently, and incrementally improve. Your users will reward you.

Now put these tips into practice, see results, and share your speed story!

Frequently Asked Questions

1. What is website speed optimization?

Website speed optimization refers to strategies and best practices implemented to make a website as fast and responsive as possible. The goal is to optimize for metrics like page speedload timescore web vitals, and ultimately user experience.

2. How does website speed impact my business?

Studies show faster website performance leads to:

  • Higher conversion rates
  • Increased sales
  • Improved user engagement
  • Lower bounce rates
  • Higher ad revenue and ROI

Fast performance is critical for business success online.

3. Why is mobile optimization important?

With growing mobile usage, optimizing for the mobile experience is essential:

  • Mobile sites often load slower than desktop.
  • 74% of users abandon sites taking over 5 seconds to load on mobile.
  • A fast, seamless mobile experience encourages engagement and conversions.

Mobile optimization should be a top priority.

4. How do I diagnose website performance issues?

Use tools like PageSpeed InsightsPingdom, and WebPageTest to:

  • Establish performance benchmarks.
  • Identify heavy elements like images, fonts, CSS, and JavaScript.
  • Pinpoint bottlenecks with waterfall analysis.
  • Monitor core web vitals like LCPFID, and CLS.

Diagnosing issues is key to an optimization roadmap.

5. What are some quick ways to improve website speed?

Some quick wins include:

  • Minification – Reduce HTML, CSS, JS file sizes.
  • Compression with Gzip and Brotli.
  • Caching assets and resources.
  • CDNs for faster asset delivery.
  • Image optimization – Right size, format, compression.

Start with the quick wins before addressing more complex issues.

6. How can I optimize my website code?

  • Minify HTML, CSS, JS, and JSON
  • Eliminate unnecessary code and requests
  • Concatinate files
  • Implement efficient libraries like React
  • Limit plugins to only essentials
  • Upgrade to PHP 7 for better performance

Continuously look for ways to streamline code.

7. How do I optimize my database?

Strategies for a faster database include:

  • Limiting or disabling WordPress revisions
  • Purging stale data, spam, and garbage
  • Using query monitoring to identify slow queries
  • Adding indexes to improve query performance
  • Upgrading database engine to InnoDB or MySQL 8

A lean, optimized database speeds up sites.

8. What type of hosting should I use?

For optimal speed, use managed WordPress hosting services like Kinsta or SiteGround that include:

  • Guaranteed resource allocation
  • Built-in CDN, caching, PHP 7
  • Server security, maintenance, and optimization
  • Scalability to handle traffic spikes

Managed hosting offloads infrastructure burden.

9. Why is ongoing testing and tuning important?

  • Continuously test with PageSpeed Insights, Pingdom, and RUM tools.
  • Monitor core web vitals and user experience.
  • Use findings to iteratively improve and fine-tune performance.
  • Refine caching, CDN, code, resources, and technologies.