ShahiLanding

How to Optimize Landing Page Performance

This step-by-step tutorial shows you how to make your landing pages load lightning-fast for maximum conversions.

What You’ll Learn

By the end of this tutorial, you’ll know how to:

    1. Measure page performance
    2. Optimize images
    3. Minify CSS and JavaScript
    4. Enable caching
    5. Reduce page weight
    6. Fix performance issues
    7. Achieve 90+ PageSpeed score
    8. Time Required: 20-30 minutes
      Difficulty: Intermediate
      Prerequisites: Published landing page

      Why Performance Matters

      Impact on Conversions

      `
      Page Load Time → Conversion Rate
      1 second: → 100% baseline
      2 seconds: → 94% (-6%)
      3 seconds: → 82% (-18%)
      4 seconds: → 69% (-31%)
      5 seconds: → 55% (-45%)
      `

      Every second counts!

      SEO Benefits

    9. Google ranks faster pages higher
    10. Better mobile search rankings
    11. Lower bounce rates
    12. Higher engagement
    13. User Experience

    14. Professional impression
    15. Reduced frustration
    16. Mobile-friendly
    17. Competitive advantage
    18. Step 1: Measure Current Performance

      Use Google PageSpeed Insights

    19. Visit PageSpeed Insights
    20. Enter your landing page URL
    21. Click Analyze
    22. Wait for results (30-60 seconds)
    23. Understand Your Scores

      `
      Performance Score:
      90-100: Excellent ✅
      50-89: Needs improvement ⚠️
      0-49: Poor ❌

      Mobile Score: [Your score]
      Desktop Score: [Your score]
      `

      Key Metrics

      Core Web Vitals:

    24. LCP (Largest Contentful Paint): < 2.5s
    25. FID (First Input Delay): < 100ms
    26. CLS (Cumulative Layout Shift): < 0.1
    27. Other Metrics:

    28. FCP (First Contentful Paint): < 1.8s
    29. TTI (Time to Interactive): < 3.8s
    30. TBT (Total Blocking Time): < 200ms
    31. Speed Index: < 3.4s
    32. Record Baseline

      Write down your current scores:
      `
      Before Optimization:

    33. Mobile Performance: __/100
    34. Desktop Performance: __/100
    35. LCP: __ seconds
    36. Page Weight: __ MB
    37. `

      Step 2: Enable ShahiLandin Performance Features

      Access Performance Settings

    38. Go to ShahiLandin → Settings
    39. Click Performance tab
    40. Enable Key Features

      Check these boxes:

      Enable Performance Optimization
      Minify CSS
      Minify JavaScript
      Enable Asset Mirroring
      Lazy Load Images
      Defer Non-Critical CSS
      Remove Query Strings from Static Resources

      Configure Caching

      Browser Cache Duration: 7 days (default)

      Enable Server-Side Caching: ✅ (if available)

      Save Changes

      Click Save Changes button.

      Step 3: Optimize Images

      Images are usually the #1 performance bottleneck.

      Current Image Audit

      Run this in browser console (F12):

      `javascript
      // Find all images and their sizes
      let images = document.querySelectorAll(‘img’);
      let totalSize = 0;
      images.forEach(img => {
      fetch(img.src)
      .then(res => res.blob())
      .then(blob => {
      console.log(img.src, (blob.size / 1024).toFixed(2) + ‘ KB’);
      totalSize += blob.size;
      });
      });
      `

      Compress Images

      Before uploading images to landing page:

      Online Tools (Free):

    41. TinyPNG – PNG/JPEG compression
    42. Squoosh – Advanced options
    43. Compressor.io – Lossy/lossless
    44. Desktop Apps:

    45. Windows: FileOptimizer
    46. Mac: ImageOptim
    47. Cross-platform: GIMP
    48. Target sizes:

    49. Hero images: < 200 KB
    50. Section images: < 100 KB
    51. Icons: < 20 KB
    52. Logos: < 30 KB
    53. Use Correct Image Formats

      `
      JPEG: Photos, complex images
      PNG: Logos, icons, transparency
      WebP: Modern format (smaller, better quality)
      SVG: Icons, logos, simple graphics
      `

      Convert to WebP

      Using online converter or command line:

      `bash

      Install cwebp (macOS)

      brew install webp

      Convert image

      cwebp input.jpg -q 80 -o output.webp
      `

      Implement Responsive Images

      Use srcset for different screen sizes:

      `html
      Hero Image
      `

      Add Lazy Loading

      Add loading="lazy" to images below the fold:

      `html
      Testimonial
      `

      ShahiLandin can add this automatically if Lazy Load Images is enabled in settings.

      Step 4: Minify CSS

      Remove Unused CSS

      Edit your landing page CSS and remove:

    54. Unused styles
    55. Commented code
    56. Redundant declarations
    57. Before (bloated):
      `css
      / Old styles /
      .old-button {
      background: red;
      }

      / Another comment /
      .header {
      background: #ffffff;
      color: #000000;
      padding-top: 20px;
      padding-right: 20px;
      padding-bottom: 20px;
      padding-left: 20px;
      }
      `

      After (clean):
      `css
      .header {
      background: #fff;
      color: #000;
      padding: 20px;
      }
      `

      Use Shorthand Properties

      `css
      / Before /
      .box {
      margin-top: 10px;
      margin-right: 20px;
      margin-bottom: 10px;
      margin-left: 20px;
      border-width: 1px;
      border-style: solid;
      border-color: #000;
      }

      / After /
      .box {
      margin: 10px 20px;
      border: 1px solid #000;
      }
      `

      Remove Redundant Rules

      `css
      / Redundant /
      .button {
      background: blue;
      }
      .button {
      background: red; / This overrides anyway /
      }

      / Clean /
      .button {
      background: red;
      }
      `

      Enable Auto-Minification

      ShahiLandin automatically minifies CSS if Minify CSS is enabled in Performance settings.

      Manual minification:
      Use CSS Minifier

      Step 5: Optimize JavaScript

      Remove Console Logs

      `javascript
      // Remove before production
      console.log(‘Debug info’);
      console.warn(‘Warning’);
      console.error(‘Error’);
      `

      Combine Similar Functions

      Before (repetitive):
      `javascript
      document.querySelector(‘.btn-1’).addEventListener(‘click’, function() {
      alert(‘Button 1 clicked’);
      });
      document.querySelector(‘.btn-2’).addEventListener(‘click’, function() {
      alert(‘Button 2 clicked’);
      });
      document.querySelector(‘.btn-3’).addEventListener(‘click’, function() {
      alert(‘Button 3 clicked’);
      });
      `

      After (efficient):
      `javascript
      document.querySelectorAll(‘[class^=”btn-“]’).forEach(btn => {
      btn.addEventListener(‘click’, () => {
      alert(btn.textContent + ‘ clicked’);
      });
      });
      `

      Defer Non-Critical JavaScript

      Add defer to script tags:

      `html



      `

      Or move scripts to bottom of page (before ).

      Enable Auto-Minification

      ShahiLandin minifies JavaScript if Minify JavaScript is enabled.

      Manual minification:
      Use JavaScript Minifier

      Step 6: Reduce External Requests

      Audit Current Requests

      Open DevTools (F12) → Network tab → Refresh page

      Count requests:

    58. Images: __
    59. CSS files: __
    60. JavaScript files: __
    61. Fonts: __
    62. Third-party: __
    63. Goal: < 30 total requests

      Combine CSS Files

      Instead of:
      `html`

      Combine into single file:
      `html`

      Inline Critical CSS

      For CSS needed immediately:

      `html

      `

      Then load full CSS asynchronously:

      `html `

      Remove Unnecessary Third-Party Scripts

      Common culprits:

    64. ❌ Multiple analytics tools (pick one)
    65. ❌ Unused social sharing buttons
    66. ❌ Decorative animations/effects
    67. ❌ Unused font weights
    68. Example: Loading Google Fonts

      Before (loading 6 font weights):
      `html `

      After (loading 2 weights):
      `html `

      Savings: 4 HTTP requests removed

      Self-Host Critical Resources

      Instead of loading jQuery from CDN:
      `html



      `

      ShahiLandin’s Asset Mirroring feature automatically mirrors external assets locally.

      Step 7: Enable Caching

      Browser Caching (Automated)

      ShahiLandin automatically sets cache headers for:

    69. Images: 7 days
    70. CSS: 7 days
    71. JavaScript: 7 days
    72. Fonts: 30 days
    73. WordPress Caching Plugins

      Install a caching plugin for better performance:

      WP Super Cache (Free, Easy)

    74. Install from Plugins → Add New
    75. Activate
    76. Settings → WP Super Cache
    77. Caching On (Recommended)
    78. Click Update Status
    79. W3 Total Cache (Free, Advanced)

    80. Install and activate
    81. Performance → General Settings
    82. Enable:
    83. – ✅ Page Cache
      – ✅ Minify
      – ✅ Browser Cache

    84. Save settings
    85. WP Rocket (Premium, Best)

    86. Purchase and install
    87. Settings → WP Rocket
    88. Everything is auto-configured
    89. Just activate
    90. Recommended: WP Rocket for best results

      CDN (Content Delivery Network)

      Serve assets from global network.

      Cloudflare (Free)

    91. Sign up at cloudflare.com
    92. Add your domain
    93. Update nameservers at domain registrar
    94. Enable:
    95. – Auto Minify (CSS, JS, HTML)
      – Brotli compression
      – Browser Cache TTL: 4 hours

    96. Wait 24-48 hours for propagation
    97. Other CDN Options:

    98. StackPath: Premium CDN
    99. BunnyCDN: Affordable, fast
    100. KeyCDN: Pay-as-you-go
    101. Step 8: Fix Common Performance Issues

      Issue 1: Render-Blocking Resources

      Problem: CSS/JS blocks page rendering

      Solution: Defer or async load

      `html



      `

      Issue 2: Large Images

      Problem: Hero image is 2 MB

      Solution: Compress and use WebP

      `html Hero `

      Issue 3: Slow Server Response (TTFB)

      Problem: Server takes > 600ms to respond

      Solutions:

    102. ✅ Enable caching plugin
    103. ✅ Use better hosting
    104. ✅ Enable CDN
    105. ✅ Optimize database
    106. ✅ Reduce PHP processing
    107. Issue 4: Too Many HTTP Requests

      Problem: 100+ requests

      Solution: Combine files, remove unused scripts

      Issue 5: Cumulative Layout Shift (CLS)

      Problem: Content jumps as page loads

      Solution: Set dimensions on images/videos

      `html

      Photo


      Photo
      `

      Or use CSS:

      `css
      img {
      aspect-ratio: 16 / 9;
      width: 100%;
      height: auto;
      }
      `

      Issue 6: Unused JavaScript

      Problem: Loading libraries you don’t use

      Solution: Remove or replace with vanilla JS

      Before (using jQuery for simple task):
      `javascript
      $(document).ready(function() {
      $(‘.button’).click(function() {
      alert(‘Clicked’);
      });
      });
      `

      After (vanilla JS):
      `javascript
      document.querySelector(‘.button’).addEventListener(‘click’, () => {
      alert(‘Clicked’);
      });
      `

      Step 9: Mobile Optimization

      Viewport Meta Tag

      Ensure this is in your HTML :

      `html

      `

      Mobile-First CSS

      Write CSS for mobile first, then scale up:

      `css
      / Mobile first (default) /
      .container {
      padding: 20px;
      }

      / Tablet and up /
      @media (min-width: 768px) {
      .container {
      padding: 40px;
      }
      }

      / Desktop /
      @media (min-width: 1024px) {
      .container {
      padding: 60px;
      }
      }
      `

      Touch-Friendly Elements

      Make buttons easy to tap:

      `css
      .button {
      min-height: 44px; / Apple’s recommended minimum /
      padding: 12px 24px;
      font-size: 16px; / Prevents zoom on iOS /
      }
      `

      Test on Real Devices

      Use Chrome DevTools:

    108. F12 → Toggle device toolbar
    109. Test on: iPhone, iPad, Android
    110. Check performance, layout, interactions
    111. Step 10: Advanced Optimizations

      Preload Critical Assets

      `html

      `

      DNS Prefetch for External Domains

      `html `

      Use Modern Image Formats

      Serve WebP with JPEG fallback:

      `html Fallback `

      Code Splitting

      Load JavaScript only when needed:

      `javascript
      // Load heavy chart library only when user clicks “View Stats”
      document.querySelector(‘#view-stats’).addEventListener(‘click’, async () => {
      const { Chart } = await import(‘./chart.js’);
      new Chart(data);
      });
      `

      Enable Gzip/Brotli Compression

      Add to .htaccess (Apache):

      `apache

      Enable Gzip


      AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json

      Enable Brotli (if available)


      AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript

      `

      Or use Cloudflare (auto-enabled).

      Database Optimization

      Run these WP-CLI commands:

      `bash

      Optimize database tables

      wp db optimize

      Clean up revisions

      wp post delete $(wp post list –post_type=’revision’ –format=ids)

      Clean up transients

      wp transient delete –all
      `

      Or use plugin: WP-Optimize

      Step 11: Monitor Performance

      Set Up Continuous Monitoring

      Google Search Console

    112. Verify site ownership
    113. Go to Core Web Vitals report
    114. Monitor LCP, FID, CLS over time
    115. Real User Monitoring (RUM)

      ShahiLandin tracks real performance metrics:

    116. ShahiLandin → Statistics
    117. View Performance tab
    118. See:
    119. – Average load time
      – LCP by device
      – Page size trends

      Weekly Check-In

      Every week, run PageSpeed Insights test:

    120. Compare to baseline
    121. Look for regressions
    122. Address new issues
    123. Performance Budget

      Set limits and stick to them:

      `
      Performance Budget:

    124. Page Weight: < 1 MB
    125. Total Requests: < 30
    126. Load Time (Mobile): < 3s
    127. PageSpeed Score: > 90
    128. `

      Troubleshooting

      “Still Slow After Optimization”

      Check:

    129. Hosting quality (shared hosting is slow)
    130. Large unoptimized images still present?
    131. Caching plugin active?
    132. CDN configured correctly?
    133. Database bloated with revisions?
    134. Solution: Upgrade hosting or contact support

      “Caching Plugin Breaks Page”

      Solution:

    135. Exclude ShahiLandin pages from cache
    136. WP Super Cache → Advanced → Add to rejected URIs: /landing-page/
    137. “Images Not Lazy Loading”

      Check:

    138. Performance → Lazy Load Images enabled?
    139. Images have proper markup?
    140. JavaScript errors in console?
    141. Solution: Add loading="lazy" manually

      “PageSpeed Score Dropped”

      Causes:

    142. New third-party script added
    143. Images not compressed
    144. Caching expired
    145. Plugin conflict
    146. Solution: Re-run optimization steps

      Summary

      You’ve learned how to:

    147. ✅ Measure performance with PageSpeed Insights
    148. ✅ Enable ShahiLandin performance features
    149. ✅ Optimize and compress images
    150. ✅ Minify CSS and JavaScript
    151. ✅ Reduce external HTTP requests
    152. ✅ Enable caching (browser, plugin, CDN)
    153. ✅ Fix common performance issues
    154. ✅ Optimize for mobile
    155. ✅ Implement advanced optimizations
    156. ✅ Monitor performance continuously
    157. Result: Lightning-fast landing pages that convert better!

      Performance Checklist

      Before launching any landing page:

    158. ✅ All images compressed (< 200 KB each)
    159. ✅ CSS minified
    160. ✅ JavaScript minified and deferred
    161. ✅ Caching plugin installed
    162. ✅ Total page weight < 1 MB
    163. ✅ Mobile PageSpeed score > 85
    164. ✅ Desktop PageSpeed score > 90
    165. ✅ LCP < 2.5 seconds
    166. ✅ CLS < 0.1
    167. ✅ Tested on real mobile device
    168. Related Tutorials

    169. How to Create Your First Landing Page
    170. How to Import HTML Landing Page
    171. Settings & Configuration

Need Help? See Performance Issues troubleshooting guide.

Share this article

Was this article helpful?

Help us improve our documentation

Still need help?

Our support team is ready to assist you with personalized guidance for your workspace.

Submit a support ticket