Optimizing Your WordPress Site

47
Optimizing WordPress Findable, Future-Proof & Fast Phil Buckley July 2016 Raleigh SEO Meetup 19 things that you need to know

Transcript of Optimizing Your WordPress Site

Page 1: Optimizing Your WordPress Site

Optimizing WordPressFindable, Future-Proof & Fast

Phil Buckley July 2016 Raleigh SEO Meetup

19 things that you need to know

Page 2: Optimizing Your WordPress Site

Themes

@1918 2

Page 3: Optimizing Your WordPress Site

Choose a sustainable theme

@1918 3

Although you can change themes anytime you want, it’s not as easy as it seems. Different themes use different features, image sizes and widgets.

Choose a theme as if you’ll never change it… because you probably won’t.

Page 4: Optimizing Your WordPress Site

Don’t Modify the HTML

@1918 4

It’s easy to add a snippet into the header.php file for your theme. Don’t do it.

Theme updates will overwrite that modification. Use the power of functions.php to inject into your templates.

Page 5: Optimizing Your WordPress Site

Use Child Themes

@1918 5

When you update a theme, everything except the images and content can change. If you modify a template, it will get overwritten with the next theme update… unless you are modifying a child theme.

Using (or creating) a child theme allows you to update the main theme without overwriting the child’s mods.

Page 6: Optimizing Your WordPress Site

Plugins

@1918 6

Page 7: Optimizing Your WordPress Site

Limit Plugins

@1918 7

There’s a plugin for everything, but you probably don’t need most of them. They can slow down your site, cause security problems and even break other features.

Try to accomplish what you need without a plugin first, use plugins only to accomplish important things.

Page 8: Optimizing Your WordPress Site

Essential Plugins

@1918 8

You can live without most plugins, but here’s some that I always install:• Akismet (spam killer)• Cookies for Comments (human spam killer)• Jetpack (WordPress additional functionality)• Yoast SEO (SEO simplified)

Page 9: Optimizing Your WordPress Site

Spam

@1918 9

Page 10: Optimizing Your WordPress Site

Build a Comment Blacklist

@1918 10

Spammers never sleep. Build out a blacklist that contains phrases that trigger either moderation or spamming.

Activate Akismet before you go live!

Mine runs from “-online” to “Zyrtec” and if a comment contains any of those words, it gets flagged for moderation.

Page 11: Optimizing Your WordPress Site

Permalinks

@1918 11

Page 12: Optimizing Your WordPress Site

Use Better Permalinks

@1918 12

You can choose any URL structure you want, so don’t default to example.com/?p=123.

I usually recommend a Custom Structure:http://example.com/%category%/%postname%

Page 13: Optimizing Your WordPress Site

Build Smarter Slugs

@1918 13

You can edit the URL of the page to be slightly different than the title of your post.

Page 14: Optimizing Your WordPress Site

Titles

@1918 14

and other stuff close by

Page 15: Optimizing Your WordPress Site

Titles vs Headlines

@1918 15

When you write in the “Enter Title Here” box, Wordpress will use that for the page title and page headline (h1) by default.

You don’t have to accept the defaults!

Page 16: Optimizing Your WordPress Site

Titles vs Headlines

@1918 16

Page 17: Optimizing Your WordPress Site

@1918 17

Title

Slug

Headline

Page 18: Optimizing Your WordPress Site

Meta Description

@1918 18

Don’t think of this as a “description” of the page. Think of it as an AdWords snippet for the page.

Clickability is the key. Make me want to click your result.

Page 19: Optimizing Your WordPress Site

Meta Description

@1918 19

Page 20: Optimizing Your WordPress Site

Images

@1918 20

Page 21: Optimizing Your WordPress Site

@1918 21

Stock Photos

Page 22: Optimizing Your WordPress Site

Featured Images

@1918 22

This is the image that will be shared with your link when you post to social media – choose something interesting.

A great image can increase click throughs over 400%

Page 23: Optimizing Your WordPress Site

Scrolling

@1918 23

Try to insert an image (or something non-text) often enough that when visitors scroll down the page, it’s never just a giant block of text.

Page 24: Optimizing Your WordPress Site

@1918 24

Hooks

Page 25: Optimizing Your WordPress Site

Actions & Filters

@1918 25

//* Change the footer text *//add_filter('genesis_footer_creds_text', ‘my_footer_creds_filter');function my_footer_creds_filter( $creds ) {

$creds = '[footer_copyright] &middot; <a href="http://1918.me">1918.me</a>';

return $creds;}//* Add additional fields to user accounts *//function my_new_contactmethods( $contactmethods ) { //** Add Twitter */ $contactmethods['twitter'] = 'Twitter profile URL'; //** Add Facebook */ $contactmethods['facebook'] = 'Facebook profile URL';

Page 26: Optimizing Your WordPress Site

//* Change the footer text *//

@1918 26

Page 27: Optimizing Your WordPress Site

@1918 27

//* Add additional fields to user accounts *//

Page 28: Optimizing Your WordPress Site

//* Add additional fields to user accounts *//

@1918 28

Page 29: Optimizing Your WordPress Site

@1918 29

Smarter Code

Added local business schema markup to the footer.

Page 30: Optimizing Your WordPress Site

@1918 30

Frameworks

Page 31: Optimizing Your WordPress Site

Smart Frameworks

@1918 31

Some themes sit on top of a “framework” that adds additional hooks for you to manipulate.

The framework is a parent theme and the “designed theme” is a child theme.

Page 32: Optimizing Your WordPress Site

Typical Theme Installation

@1918 32

Page 33: Optimizing Your WordPress Site

Smart Frameworks I’ve Tried

@1918 33

• Genesis by Studiopress• Headway• Divi by Elegant Themes• Thesis 2.0 by DIY themes

Page 34: Optimizing Your WordPress Site

Genesis Framework

@1918 34

Using the Simple Hooks plugin I can inject code snippets.

This example is adding GA, Font Awesome CSS and the Facebook tracking pixel.

Page 35: Optimizing Your WordPress Site

Forms

@1918 35

Page 36: Optimizing Your WordPress Site

Default Forms

@1918 36

WordPress comes with a perfectly good form, but it’s functionality is limited.

For serious forms, you’ll want to buy a better solution.

I recently started using NinjaForms and love it.

Page 37: Optimizing Your WordPress Site

Default Forms

@1918 37

WordPress comes with a perfectly good form, but it’s functionality is limited.

For serious forms, you’ll want to buy a better solution.

I recently started using NinjaForms and love it.

Page 38: Optimizing Your WordPress Site

Conditional Logic

@1918 38

If a visitor answers question 1, display question 2, otherwise jump to question 3.

Example: this question only appears if 2 previous questions have certain answers.

Page 39: Optimizing Your WordPress Site

Performance

@1918 39

Page 40: Optimizing Your WordPress Site

Faster is Better

@1918 40

User and search bots like sites that respond quickly.

You have more control over it than you know.

Page 41: Optimizing Your WordPress Site

Hosting

@1918 41

You get what you pay for… to a point.

Decide up front what you can afford, then find the best for that price. If $100/year seems like crazy-expensive luxury, you will be limited in your choices.

Think of all the crap you spend $10/month on now.

Page 42: Optimizing Your WordPress Site

Does Hosting Really Matter?

@1918 42

Page 43: Optimizing Your WordPress Site

Waterfall

@1918 43

Check your WordPress site with a tool that tracks download speed.

• Gtmetrix• Pingdom• Web Page Test

Page 44: Optimizing Your WordPress Site

Waterfall Tests

@1918 44

Page 45: Optimizing Your WordPress Site

Caching

@1918 45

Think about how often the parts of your site change. You could probably take advantage of aggressive caching. WP Super Cache actually builds out static html pages to load your site even faster.

W3 Total Cache is also a great free option.

Page 46: Optimizing Your WordPress Site

Canonicalization

@1918 46

Make sure your site is properly canonicalized! If you’re not sure what that means, think of it as www or non-www version of your site.

Pick one version and stick with it.

Page 47: Optimizing Your WordPress Site

A Canonicalization True Story

@1918 47

There was a site that responded to both www and non-www with a 200 (OK) code. This was the problem when you asked for the non-www version…

1. Request non-www version of the site.2. Web server looks in the folder where WordPress will serve the page.3. Sees in the .htaccess file that it should check the cached file (look at you caching files!)4. Checks the cache for that file – it doesn’t exist.5. Back to WordPress to create that page on the fly.6. WordPress has to make a request to the database, where it realizes the url to serve should be the www version of the site.7. Web server now returns the headers for the 301 redirect.8. Web server now returns to the folder from step 2.9. Sees the .htaccess file that it should check for the cached file just like before.10. Checks for the cached file, it still doesn’t exist.11. WordPress generates that file on the fly and starts to load the page.