Website speed directly impacts user experience, search engine rankings, and conversion rates. Research by Google shows that 53% of mobile users abandon sites that take longer than 3 seconds to load. On shared hosting, where resources are distributed among multiple accounts, optimisation becomes even more important. This guide covers proven strategies to maximise your website's performance on SakuraHost shared hosting.

Measure Before You Optimise

Before making changes, establish a performance baseline using free testing tools. This allows you to measure the impact of each optimisation and identify the biggest bottlenecks.

Google PageSpeed Insights: Provides both mobile and desktop performance scores along with specific recommendations. Aim for a score of 90 or above.
GTmetrix: Offers detailed waterfall analysis showing how each resource loads, helping you identify slow-loading elements.
Chrome DevTools: Press F12 in Chrome, go to the Network tab, and reload your page to see loading times for every resource.

Image Optimisation

Images typically account for 50-80% of a webpage's total size. Optimising images is the single most impactful change you can make.

Best Practices for Images

  • Compress images: Use tools like TinyPNG, Squoosh, or ShortPixel to reduce file sizes by 60-80% without visible quality loss.
  • Use modern formats: Convert images to WebP format, which offers 25-35% better compression than JPEG. Most modern browsers support WebP.
  • Resize appropriately: Do not upload a 4000px wide image if it only displays at 800px. Resize images to their actual display dimensions before uploading.
  • Implement lazy loading: Add loading="lazy" to image tags so images below the fold only load when the user scrolls to them.
<!-- Lazy loading example --> <img src="product-photo.webp" alt="Product description" width="800" height="600" loading="lazy">

Enable GZIP Compression

GZIP compression reduces the size of text-based resources (HTML, CSS, JavaScript) by up to 70% before they are sent to the browser. Add the following to your .htaccess file in public_html:

# Enable GZIP compression <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/json AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE image/svg+xml </IfModule>

Browser Caching with Expire Headers

Browser caching tells visitors' browsers to store static resources locally, so they do not need to download them again on subsequent visits. Add these rules to .htaccess:

# Browser caching <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/webp "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType text/html "access plus 1 hour" </IfModule>

Minify CSS, JavaScript, and HTML

Minification removes unnecessary whitespace, comments, and formatting from code files, reducing their size. For WordPress sites, plugins like Autoptimize or WP Rocket handle this automatically. For static sites, use build tools or online minifiers before uploading.

Optimise Your WordPress Installation

If you are running WordPress, these specific optimisations can dramatically improve performance:

Use a Caching Plugin

Install and configure a caching plugin such as WP Super Cache (free) or LiteSpeed Cache (free, optimised for our LiteSpeed-enabled servers). Caching stores pre-generated HTML pages so WordPress does not need to execute PHP and query the database for every visit.

Reduce Plugin Count

Each active plugin adds PHP code that executes on every page load. Audit your plugins and deactivate or delete any that are not essential. Aim for no more than 15-20 active plugins.

Clean Up Your Database

WordPress databases accumulate post revisions, spam comments, transient options, and orphaned metadata over time. Use the WP-Optimize plugin to clean and optimise your database tables.

Always Back Up First: Before making any optimisation changes, create a full backup of your website files and database through cPanel > Backup or the JetBackup tool. This ensures you can restore your site if anything goes wrong.

PHP Version Optimisation

Newer PHP versions are significantly faster than older ones. PHP 8.2 and 8.3 offer up to 3x the performance of PHP 7.0. Ensure your account is running the latest compatible PHP version by going to Software > MultiPHP Manager in cPanel. See our knowledge base article on understanding and configuring PHP versions in cPanel for detailed instructions.

Reduce HTTP Requests

  • Combine CSS files: Merge multiple stylesheets into a single file where possible.
  • Combine JavaScript: Bundle multiple script files into fewer files.
  • Use CSS sprites: Combine small icons and graphics into a single sprite sheet image.
  • Inline critical CSS: Embed above-the-fold styles directly in the HTML <head> to eliminate render-blocking requests.

Content Delivery Network (CDN)

A CDN caches your website's static content on servers worldwide, serving it from the location nearest to each visitor. This dramatically reduces latency, especially for visitors outside Tanzania. Cloudflare's free plan is an excellent starting point and also provides DDoS protection and additional security.

Monitor and Iterate

Performance optimisation is an ongoing process. Schedule monthly performance checks using PageSpeed Insights and GTmetrix. In cPanel, monitor your resource usage under Metrics > Resource Usage to ensure your site operates within plan limits.

If your website consistently requires more resources despite optimisation, it may be time to upgrade to a VPS plan. Visit billing.sakurahost.co.tz or contact our team at sms.sakuragroup.co.tz to explore options.

Was this answer helpful? 0 Users Found This Useful (0 Votes)