21 ways to make wordpress fast

Post on 22-Jul-2015

194 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

21 Ways to Make WordPress Fast

JMac

21 Ways to Make WordPress Fast

“I hate slow sites. I hate them. I hate slow sites even more than I like fast sites. And there’s a difference…”

Yes, WordPress is slow.

!in_array($focus,'performance');

in_array($focus,'compatibility');

You can make WordPress fast!

But weight…

time[total] = time[client] + time[network]+ time[server] + time[wordpress] + time[database]

Client

Goal

facilitate the browser in rendering the page as quickly as possible

“80-90% of the end-user response time is spent on the front-end. Start there.”

- Steve Sounders, “Performance Golden Rule”

#1 Valid Code

#2 Move CSS to the top, JavaScript to the bottom

#3 Use CSS Image Sprites

.nav-logo-large #nav-logo {! background-image: url(sprite.png);!    background-position: -119px -9px;!    height: 35px;!    width: 111px;!}

Network

Goal• Optimize traffic

• Limit or parallelize requests

• Decrease size and frequency of responses

#4 Multiple/Static Domains

#5 Content Delivery Networks

#6 Minification

#7 Compression

AddOutputFilterByType DEFLATE! text/html! text/css! text/javascript

#8 Resource Caching

Header unset ETag!FileETag None !ExpiresActive On!ExpiresByType image/gif "access plus 6 months"!ExpiresByType image/jpeg "access plus 6 months"!ExpiresByType image/png "access plus 6 months"!ExpiresByType text/css "access plus 6 months"!ExpiresByType text/javascript "access plus 6 months"

#9 Redirects

WordPress

Goals• Facilitate Client goals

• Facilitate Network goals

• Execute as little WordPress code as possible

#10 Trackbacks and Pingbacks

#11 Permalink Settings

#12 Reading Settings

#13 Comments and Gravatar

#14 Sharing Widgets

#15 Use Less Plugins

#16 WordPress Caching

Server

Goal

respond as quickly as possible

#17 Apache Configuration

RewriteEngine On!RewriteRule ^index\.php$ - [L]!RewriteCond %{REQUEST_FILENAME} !-f!RewriteCond %{REQUEST_FILENAME} !-d!RewriteRule . /index.php [L]

FallbackResource /index.php

#18 PHP Caching

#19 Page Caching

Database

Goal

understand how WordPress uses your database

#20 Database Optimizations

#21 Extra Data

tl;dl#16 WordPress Caching

#7 Compression

#8 Resource Caching

#3 Move CSS to the top, JavaScript to the bottom

To the extreme…• Change Hosting

• Reverse Proxy Server (nginx, varnish, etc)

• Don’t use WordPress (in production)

Ask Questions!@gonedark

jason@pureconcepts.net

top related