Speed up Your Joomla Site for Ultimate Performance

42
HOW TO SPEED UP YOUR JOOMLA SITE? Tenko Nikolov CEO, SiteGround

description

Presented at JoomlaDay Sydney 2013 by Tenko Nikolov , CEO, SiteGround.

Transcript of Speed up Your Joomla Site for Ultimate Performance

Page 1: Speed up Your Joomla Site for Ultimate Performance

HOW TO SPEED UP YOUR JOOMLA SITE?

Tenko NikolovCEO, SiteGround

Page 2: Speed up Your Joomla Site for Ultimate Performance

Before We Begin – Who’s That Guy Tenko?

17+ Years IT Experience

8+ Years CEO of SiteGround

7+ years of Joomla! Experience

Love travelling the world

Addicted to fast things &

Photography

Page 3: Speed up Your Joomla Site for Ultimate Performance

Site speed affects your Google Rankings!

Keep readers/customers happy & paying

Be able to handle more visitors

Go green and save $$$ from servers

WHY BOTHER DOING IT?

Page 4: Speed up Your Joomla Site for Ultimate Performance

Faster Joomla! = Optimizations

KEEPCALM

IT’S NOT

ROCKET SCIENCE

Page 5: Speed up Your Joomla Site for Ultimate Performance
Page 6: Speed up Your Joomla Site for Ultimate Performance

Keep your Joomla! updated

Choose extensions wisely

Deactivate unused extensions, upgrade

used

Simplify your templates as much as

possible

GENERAL GUIDELINES

Page 7: Speed up Your Joomla Site for Ultimate Performance

Simple Front Page Is Better

Fancy stuff – only if you really need it

Remove unnecessary large images

Use fewer internal/external links – add

sitemap

Avoid loading content from remote servers

Page 8: Speed up Your Joomla Site for Ultimate Performance

APPLICATION LEVEL OPTIMIZATIONS

Page 9: Speed up Your Joomla Site for Ultimate Performance

Enable Compression

Natively supported by Joomla! – no extensions needed

Requires mod_gzip/deflate to be enabled on the server

Site

Global Configuration

Server

Page 10: Speed up Your Joomla Site for Ultimate Performance

Enable Joomla! Cache

Enable the “System – Cache” plugin

Page 11: Speed up Your Joomla Site for Ultimate Performance

Recommended Cache Settings

Site

Global Configuration

System

Cache Settings

Page 12: Speed up Your Joomla Site for Ultimate Performance

Some .htaccess Magic

Get the code:http://goo.gl/ze09B

How it works:- Etag – Tells browsers that an image/unit does not need to be reloaded

- Expires Headers – Set different expiration dates for various file types

- AddOutputFilterByType DEFLATE – minifies the compiled HTML source

code

Page 13: Speed up Your Joomla Site for Ultimate Performance

Some .htaccess Magic

The code:

FileETag MTime Size AddOutputFilterByType DEFLATE text/html text/css application/javascriptExpiresActive OnExpiresDefault "now plus 1 hour" ExpiresByType text/css "now plus 1 week“ExpiresByType application/javascript "now plus 1 week" ExpiresByType application/x-javascript "now plus 1 week”

Page 14: Speed up Your Joomla Site for Ultimate Performance

More Optimizations: Images, CSS & JS

Resize images – never upload 2560x1600

pictures

Smush your images

Minify and combine CSS and JS files

Use image sprites

Page 15: Speed up Your Joomla Site for Ultimate Performance

Sounds Nice, How Do I Begin?

Use smush.it

Photoshop/

Fireworks

Joomla! Extensions

Page 16: Speed up Your Joomla Site for Ultimate Performance

Some Highly Rated Extensions JCH Optimize – Combines JS and CSS,

Combines images in sprites, Minify and Compress

Jbetolo – same as above but + CDN support

JotCache – improves the Joomla! built in Core Cache

Cache Cleaner – easily clean the cache from the Joomla! admin panel

Page 17: Speed up Your Joomla Site for Ultimate Performance

JCH Optimize

Enable the “System – JCH Optimize” plugin

Page 18: Speed up Your Joomla Site for Ultimate Performance

JCH Optimize Settings

Page 19: Speed up Your Joomla Site for Ultimate Performance

Google mod_pagespeed

An open-source Apache module - compress, combine and cache

Needs to be installed/configured by a System Administrator

Available on SiteGround servers *

Page 20: Speed up Your Joomla Site for Ultimate Performance

Check How’s Your Website Doing

Google Page Speed Insights - http://

goo.gl/zPkxx

YSlow - http://goo.gl/qIios

GTmetrix - http://gtmetrix.com/

Page 21: Speed up Your Joomla Site for Ultimate Performance

Some Results – Default Joomla!

No Optimizati

ons

Cache/ Compres

sion

.htaccess

rules

JCH

Page Load Time 1.61s 1.49s 1.32s 1.02s

Total Page Size 563KB 162KB 162KB 151KB

Number of Requests

35 35 35 19

Page Speed Grade

F (41%) B (65%) B (87%)

A (91%)

YSlow Grade C (70%) B (66%) B (86%)

A (92%)

Page 22: Speed up Your Joomla Site for Ultimate Performance

SERVER LEVEL OPTIMIZATIONS

Page 23: Speed up Your Joomla Site for Ultimate Performance

Use CDN

YOUR VISITORSLOCATION MATTERS!

Page 24: Speed up Your Joomla Site for Ultimate Performance

CDN Features

CDN will make your website faster

CDN will help avoid unneeded I/O on your hard drives

CDN will appeal to both Google and your visitors

Page 25: Speed up Your Joomla Site for Ultimate Performance

Software Tweaks

Use fast and secure PHP like FastCGI Move PHP binaries to RAM Move TMP to RAM Move MySQL to a separate hard drive:

RAID & SSD Enable MySQL query cache Use TMPFS for MySQL’s tmpdir

Page 26: Speed up Your Joomla Site for Ultimate Performance

Opcode/Object Caching

FastCGI + APC PHP extension

Memcached and PHP/MySQL

eAccelerator 

Page 27: Speed up Your Joomla Site for Ultimate Performance

Joomla Interaction with Your Database

First request goes to the database server

Page 28: Speed up Your Joomla Site for Ultimate Performance

Object Caching

First request goes to the database server

Objects are also stored in Memcached

Page 29: Speed up Your Joomla Site for Ultimate Performance

Object Caching

All consecutive requests are forwarded to the Memcached server

Page 30: Speed up Your Joomla Site for Ultimate Performance

How PHP works

Scanning

Lexing

Parsing

Compilation

Opcode

Execution

Page 31: Speed up Your Joomla Site for Ultimate Performance

Opcode Execution

PHP Opcode Caching

Page 32: Speed up Your Joomla Site for Ultimate Performance

Reverse Proxy Servers

Page 33: Speed up Your Joomla Site for Ultimate Performance

Reverse Proxy Servers

Page 34: Speed up Your Joomla Site for Ultimate Performance

Reverse Proxy Servers

Page 35: Speed up Your Joomla Site for Ultimate Performance

Reverse Proxy Servers

Page 36: Speed up Your Joomla Site for Ultimate Performance

Custom PHP/MySQL configuration

Memcached/PHP APC

Joomla! friendly reverse proxy

setup

Our Own Solution: The SUPERCACHER

Page 37: Speed up Your Joomla Site for Ultimate Performance

Final Results: Joomla + VirtueMart

No Optimizati

ons

Application Level

Optimizations

Server Level

Optimizations

Page Load Time 5.22s 3.49s 1.09s

Total Page Size 1.89MB 0.67MB 0.67MB

Number of Requests

76 28 28

Page Speed Grade

F (41%) B (85%) A (92%)

YSlow Grade C (70%) B (84%) A (94%)

Page 38: Speed up Your Joomla Site for Ultimate Performance

Some Key Takes

Speed optimization is a process – do it

regularly

Always test!

Choose a well optimized host

Page 39: Speed up Your Joomla Site for Ultimate Performance

QUESTIONS TIME

Page 40: Speed up Your Joomla Site for Ultimate Performance

We now have something special for Australia!

Free .com.au domain 24/7 Aussie toll free Payments in AUD

Page 41: Speed up Your Joomla Site for Ultimate Performance

JoomlaDay Sydney Exclusive Offer

Get It At:www.siteground.com/australia

Page 42: Speed up Your Joomla Site for Ultimate Performance

THANK YOU!

Tenko [email protected] @tnikolov