View Categories

Theme Optimization Guide

1. General Performance Optimization

  • Enable Hubfolio’s built-in performance settings to minimize unnecessary scripts.
  • Use a lightweight child theme if customization is needed.
  • Reduce external scripts, fonts, and third-party integrations.
  • Optimize Google Fonts by limiting the number of fonts and weights used.

2. Speed Optimization Settings in Hubfolio

3. Image and Media Optimization

  • Compress images using tools like TinyPNG, ShortPixel, or Smush.
  • Convert images to WebP format for better compression and faster loading.
  • Enable lazy loading for images and videos with a plugin like WP Rocket or a native browser feature.
  • Use a Content Delivery Network (CDN) to serve images faster to users across different locations.

Method 1: Use a WordPress Plugin (Recommended)

The easiest way to compress images is by using a plugin. Here are three great options:

1. Smush (Free & Pro)
  • Go to WordPress DashboardPluginsAdd New.
  • Search for “Smush – Lazy Load Images, Optimize & Compress”.
  • Install and activate the plugin.
  • Go to Smush Settings and enable:
    • Bulk Smush to compress all images at once.
    • Lazy Loading to speed up page load times.
    • Resize Images to reduce large image sizes automatically.
2. ShortPixel (Best for Lossless Compression)
  • Install “ShortPixel Image Optimizer” from the Plugins section.
  • Register and get an API Key.
  • Go to SettingsShortPixel.
  • Choose Lossy, Glossy, or Lossless compression.
  • Enable Automatic Image Optimization.
3. TinyPNG (Simple & Efficient)
  • Install “Compress JPEG & PNG images by TinyPNG”.
  • Register and get an API Key.
  • Go to SettingsTinyPNG.
  • Set the compression level and enable Bulk Optimization.

Method 2: Manually Compress Images Before Uploading

If you prefer not to use a plugin, compress images manually before uploading:

  1. Use TinyPNG Online:
    • Visit TinyPNG.
    • Drag and drop images to compress.
    • Download optimized images and upload them to WordPress.
  2. Use Photoshop or Online Tools:
    • In Adobe Photoshop, use File → Export → Save for Web (Legacy).
    • Use WebP format for better compression.

Method 3: Optimize Existing Images in WordPress

If you already have images uploaded, bulk optimize them:

  • Smush: Go to Media → Bulk Smush and optimize all images.
  • ShortPixel: Use the “Bulk Process” feature.
  • TinyPNG Plugin: Compress images automatically in the background.

Final Step: Test Image Optimization

  1. Open your website and inspect page speed using Google PageSpeed Insights or GTmetrix.
  2. Check if images are properly optimized.
  3. Clear cache if needed.

4. Minification & Caching

Would you like help implementing this on your site? 🚀

  • Minify HTML, CSS, and JavaScript files using Autoptimize or WP Rocket.
  • Enable page caching with WP Rocket, W3 Total Cache, or WP Super Cache.
  • Implement object caching using Redis or Memcached for database queries.
  • Optimize database regularly using WP-Optimize or WP-Sweep.
  • Enable browser caching to store static resources on visitors’ devices.

5. Reduce Unused CSS & JavaScript

  • Use Asset CleanUp or Perfmatters to disable unused CSS/JS files on specific pages.
  • Remove unused WordPress plugins and themes that may load unnecessary scripts.
  • Disable jQuery Migrate if it is not needed by your plugins or theme.

6. Render-Blocking Resources Fix

  • Defer or async load JavaScript files using a plugin like Async JavaScript.
  • Inline critical CSS with Autoptimize to prevent layout shifts.
  • Remove unnecessary third-party scripts, such as unused tracking codes.

7. Optimize Largest Contentful Paint (LCP)

  • Optimize above-the-fold images by using properly sized and compressed files.
  • Improve server response time by using a high-performance hosting provider.
  • Use a fast-loading CDN to distribute assets efficiently.
  • Reduce the impact of third-party scripts by delaying their execution.

8. Reduce Cumulative Layout Shift (CLS)

  • Set explicit width and height for images, iframes, and ads.
  • Avoid inserting dynamic ads or embeds above existing content.
  • Preload fonts to ensure they load properly before rendering text.
  • Use proper font display strategies to prevent layout shifts.

9. Optimize DOM Size

  • Avoid excessive nested elements in page builders like Elementor or WPBakery.
  • Reduce the number of elements in headers, footers, and sidebars.
  • Use efficient HTML and CSS structures to keep the DOM clean and simple.

10. WooCommerce-Specific Optimization (If Applicable)

  • Optimize WooCommerce AJAX cart fragments to prevent excessive requests.
  • Reduce the size of product images while maintaining quality.
  • Minimize the number of checkout page scripts and unnecessary fields.
  • Enable lazy loading for WooCommerce product images
  • Since WordPress 5.5, lazy loading is enabled by default for images. WooCommerce product images should already be lazy-loaded automatically. To ensure this:
  • Check WordPress Version – Update to the latest version.
  • Inspect Image HTML – Right-click an image and inspect the img tag. It should have loading="lazy".

11. Advanced Optimization Techniques

  • Implement server-level caching with Redis, Varnish, or Nginx FastCGI Cache.
  • Use a lightweight Hubfolio child theme variant if heavy customizations slow performance.
  • Consider using AMP (Accelerated Mobile Pages) for faster mobile page speeds.
  • Utilize Cloudflare APO (Automatic Platform Optimization) for WordPress.

12. Security and Database Optimization

  • Harden WordPress security by disabling XML-RPC and using a firewall like Wordfence.
  • Regularly clean up the database by removing post revisions, spam comments, and transients.
  • Optimize database queries using plugins like WP-Optimize or Query Monitor.
  • Use secure authentication methods, such as two-factor authentication (2FA), to protect admin accounts.

13. Performance Settings in Hubfolio Theme

These settings in the Hubfolio Theme Options can be adjusted to improve performance:

Performance Settings

  1. Default WP Block Styles
    • Turn Off: Disables the default Gutenberg block styles to reduce unnecessary CSS loading.
    • Effect: This helps improve performance if you are not using Gutenberg for content creation.
  2. Emoji Script
    • Turn Off: Disables the wp-emoji-release.min.js script, which loads WordPress emojis.
    • Effect: Improves loading speed by removing an unnecessary JavaScript file.
  3. Font Awesome (fa)
    • Turn Off: Disables the Font Awesome icon pack from loading.
    • Effect: Reduces the number of external font requests and improves page load time.
    • Note: If your website uses Font Awesome icons, you may need to load them manually via a CDN or custom CSS.
  4. Elementor Icons (eicon)
    • Turn Off: Disables the default Elementor icon pack from being loaded.
    • Effect: Optimizes performance if you do not use Elementor icons in your design.
  5. Elementor Animations
    • Turn Off: Disables Elementor’s built-in animations.
    • Effect: Improves speed and prevents unnecessary animations from affecting page load time.
 class=

Best Practice Recommendations

  • Turn off all unnecessary settings to reduce unused CSS and JavaScript.
  • Test website speed before and after changes using Google PageSpeed Insights or GTmetrix.
  • Enable only the features you need to avoid breaking any design elements.

14. Testing & Monitoring Performance

  • Regularly test with Google PageSpeed Insights, GTmetrix, and WebPageTest.org.
  • Monitor real user performance with Google Lighthouse and New Relic.
  • Track website speed over time using Pingdom or Cloudflare analytics.
  • Continuously optimize based on performance insights and user experience data.

By implementing these steps, you should see a significant improvement in your Hubfolio theme’s performance, user experience, and overall website speed