Customizing WooCommerce requires careful planning to ensure that the customizations are secure, lightweight, and performant. Customizations can vary widely, from structural changes to template layouts to changing functionality completely such as the checkout flow.
General best practices
- When customizing WooCommerce on the VIP Platform, leverage page caching and object caching as much as possible. Page caching is provided by Varnish and object caching through Memcached. Effective use of these caching layers enables a WooCommerce store to serve more visitors and process more orders while remaining stable, responsive, and performant.
- Ensure that product imagery is web optimized. Refer to the guidance on image optimization written by WordPress.com and useful for WordPress sites hosted on VIP. Optimizing images for the web includes saving the images in the most appropriate file type, in an appropriate size, and with the right amount of compression. The VIP File System also provides a built-in service for image transformation, resizing and compression.
- If specific content, such as stock levels, price data, etc., must be loaded dynamically, identify if it is possible to request and store it client-side. If the request for dynamically loaded content requires authentication, then the request is best made server-side. In this case, the page must always bypass the page cache.
- If your WooCommerce customizations include making database queries, seek to optimize those database queries. Slow queries are a significant cause of performance issues and degraded user experience.
Last updated: January 26, 2023