Website Performance & Optimization¶
A fast-loading website isn't just a nice-to-have — it directly impacts your search engine rankings, user experience, conversion rates, and bounce rates. Studies show that a 1-second delay in page load time can reduce conversions by 7%. This guide covers practical strategies to optimize your website's performance on Salama Hosting.
Why Website Speed Matters¶
- SEO rankings: Google uses page speed as a ranking factor. Faster sites rank higher.
- User experience: Visitors expect pages to load in under 3 seconds. Slower sites lose visitors.
- Conversions: Faster sites have higher conversion rates — especially for e-commerce.
- Mobile users: Mobile connections can be slower, making optimization even more critical in the African market.
- Bounce rate: 53% of mobile users abandon sites that take longer than 3 seconds to load.
Measuring Your Website Speed¶
Before optimizing, measure your current performance using these free tools:
| Tool | URL | What It Measures |
|---|---|---|
| Google PageSpeed Insights | pagespeed.web.dev | Performance score, Core Web Vitals, recommendations |
| GTmetrix | gtmetrix.com | Page load time, total size, requests, waterfall chart |
| Pingdom | tools.pingdom.com | Load time from different locations |
| WebPageTest | webpagetest.org | Detailed performance analysis, filmstrip view |
Key Metrics to Watch¶
- Largest Contentful Paint (LCP): Time for the largest visible element to load. Target: under 2.5 seconds.
- First Input Delay (FID): Time before the page responds to user interaction. Target: under 100ms.
- Cumulative Layout Shift (CLS): Visual stability — how much the layout shifts during loading. Target: under 0.1.
- Time to First Byte (TTFB): How fast the server responds. Target: under 600ms.
- Total page size: Smaller is better. Target: under 3 MB.
- Number of HTTP requests: Fewer requests = faster loading. Target: under 50.
Server-Side Optimization¶
Choose the Right Hosting Plan¶
Your hosting plan directly impacts performance:
| Plan | Best Performance For |
|---|---|
| Shared Hosting | Low-traffic sites (< 10,000 visits/month) |
| VPS Hosting | Medium-traffic sites, multiple sites |
| Dedicated Server | High-traffic, resource-intensive applications |
If your site consistently loads slowly on shared hosting despite optimization, it may be time to upgrade.
PHP Version¶
Using the latest PHP version significantly improves performance:
- PHP 8.x is up to 3x faster than PHP 7.0.
- Update in cPanel: Software → Select PHP Version.
- Update in Plesk: Websites & Domains → PHP Settings.
Server-Side Caching¶
Caching stores pre-generated versions of your pages so the server doesn't rebuild them for every visitor.
LiteSpeed Cache (if available): Your Salama Hosting server may run LiteSpeed. Enable the LiteSpeed Cache plugin in WordPress for automatic server-side caching.
OPcache: OPcache is a PHP accelerator that caches compiled PHP scripts. It's typically enabled by default on Salama Hosting servers.
Enable Gzip/Brotli Compression¶
Compression reduces the size of files transferred between server and browser.
Add to your .htaccess file:
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
AddOutputFilterByType DEFLATE application/javascript application/json
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
AddOutputFilterByType DEFLATE image/svg+xml
</IfModule>
Image Optimization¶
Images are typically the largest files on any webpage. Optimizing them can dramatically improve load times.
Image Format Guide¶
| Format | Best For | Notes |
|---|---|---|
| WebP | Photos & graphics | 25-35% smaller than JPEG, widely supported |
| JPEG | Photographs | Good compression, universal support |
| PNG | Graphics with transparency | Larger files, use only when transparency is needed |
| SVG | Icons, logos | Vector format, infinitely scalable, tiny file size |
| AVIF | Next-gen format | Best compression, growing browser support |
Image Optimization Tips¶
- Resize before uploading. Don't upload a 4000x3000px image if it displays at 800x600px.
- Compress images. Use tools like:
- TinyPNG — Online compression
- ShortPixel — WordPress plugin
- Imagify — WordPress plugin
- Use lazy loading. Images below the fold load only when the user scrolls to them.
html <img src="photo.jpg" loading="lazy" alt="Description"> - Serve responsive images. Use the
srcsetattribute to deliver different sizes for different screens. - Use a CDN for images. Deliver images from servers closer to your visitors.
Browser Caching¶
Browser caching tells visitors' browsers to store static files locally, so they don't re-download them on every visit.
Add to your .htaccess file:
<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 0 seconds"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType application/x-font-woff2 "access plus 1 year"
</IfModule>
Content Delivery Network (CDN)¶
A CDN distributes your website's static files (images, CSS, JavaScript) across servers worldwide, delivering content from the server closest to each visitor.
Benefits¶
- Faster load times for visitors far from your server
- Reduced server load — CDN handles static file delivery
- DDoS protection — CDN absorbs malicious traffic
- High availability — Even if your server is down, cached content remains accessible
Popular CDN Options¶
| CDN | Free Plan | Notes |
|---|---|---|
| Cloudflare | Yes | Most popular, includes DNS and security |
| BunnyCDN | Trial | Affordable, pay-per-use pricing |
| KeyCDN | Trial | Developer-friendly, fast setup |
Setting Up Cloudflare¶
- Create a free account at cloudflare.com.
- Add your domain and scan existing DNS records.
- Update your nameservers at your registrar to Cloudflare's nameservers.
- Configure caching rules, SSL mode, and optimization settings.
Tip: If you use Cloudflare, set SSL mode to Full (Strict) and enable Always Use HTTPS.
WordPress-Specific Optimization¶
Caching Plugins¶
| Plugin | Features | Free Plan |
|---|---|---|
| LiteSpeed Cache | Server-side caching, image optimization, CDN | Yes |
| W3 Total Cache | Page cache, database cache, CDN integration | Yes |
| WP Super Cache | Simple page caching | Yes |
| WP Rocket | All-in-one optimization (premium) | No |
Database Optimization¶
Over time, WordPress databases accumulate overhead (post revisions, spam comments, transients).
Using WP-Optimize plugin:
- Install and activate WP-Optimize.
- Go to WP-Optimize → Database.
- Select cleanup options (revisions, spam, trash, transients).
- Click Run Optimization.
Schedule regular cleanups to keep your database lean.
Reduce Plugins¶
Each active plugin adds PHP code that runs on every page load:
- Audit your plugins. Deactivate and delete plugins you don't use.
- Replace multiple plugins with one that does it all (e.g., one SEO plugin instead of several).
- Test plugin impact. Deactivate plugins one at a time and measure load time to identify slow ones.
Optimize WordPress Settings¶
- Limit post revisions: Add to
wp-config.php:php define('WP_POST_REVISIONS', 5); - Disable pingbacks and trackbacks: Go to Settings → Discussion and uncheck.
- Set a reasonable excerpt length instead of showing full posts on archive pages.
- Use a lightweight theme. Heavy themes with dozens of features you don't use slow your site significantly.
Minification and Concatenation¶
Minification removes unnecessary characters (spaces, comments, line breaks) from CSS, JavaScript, and HTML files.
Concatenation combines multiple CSS or JS files into fewer files, reducing HTTP requests.
How to Minify¶
- WordPress: Use plugins like Autoptimize, WP Rocket, or LiteSpeed Cache.
- Manual: Use online tools like minifier.org.
- Build tools: Use Webpack, Gulp, or similar if you're a developer.
Monitoring Performance Over Time¶
Don't just optimize once — monitor performance regularly:
- Set up Google Search Console — Monitors Core Web Vitals and alerts you to issues.
- Use uptime monitoring — Services like UptimeRobot (free) alert you when your site goes down.
- Track speed regularly — Run PageSpeed Insights monthly and note your scores.
- Monitor resource usage — Check CPU, RAM, and disk usage in your control panel to spot limits.
Performance Optimization Checklist¶
- [ ] Choose the right hosting plan for your traffic level
- [ ] Use the latest PHP version (8.x)
- [ ] Enable Gzip/Brotli compression
- [ ] Optimize and compress all images
- [ ] Enable browser caching
- [ ] Install and configure a caching plugin (WordPress)
- [ ] Set up a CDN (Cloudflare recommended)
- [ ] Minify CSS, JavaScript, and HTML
- [ ] Reduce the number of plugins/extensions
- [ ] Optimize your database regularly
- [ ] Use lazy loading for images and videos
- [ ] Keep WordPress core, themes, and plugins updated
- [ ] Monitor page speed scores monthly
Need Help?¶
If your website is loading slowly or you need optimization assistance:
- Email: support@salamahosting.com
- Phone: 0702 499 649 / 0783 975 685
- Support Ticket: Submit via your client portal
Our technical team can audit your website performance and recommend specific improvements.