The Need For Speed (Part 1)

aka Sometimes your site isn’t fast enough.

Google hates slow sites. So do mobile users. If your site isn’t fast enough, visitors will visit someone else’s site.

Speed-Of-Light-Tobias-600px
Speed Of Light https://www.flickr.com/photos/91369701@N00/473868198/

So after doing some research I discover a few things about my site.

1) It was slow

2) My pictures are too big

3) My provider might be slow

So I went to work figuring out what I could do to speed up my WordPress site.

Compress Me

One of the first things I learned was I needed to enable compression. This was not something I could do inside of WordPress but instead inside of cPanel on my hosting providers control panel. The back-end web server your hosting provider is using is probably Apache or Nginx. Inside Cpanel, there should be a place that says “Optimize Website” go there and turn on compression. Basically your web browser supports compressed web pages. The web server can send the pages to you compressed and your browser will decompress them on the fly. Smaller files, faster content delivery.
Optimize Website

 

WARNING: Before trying any of this, please backup your site. Click here for tutorials on how to backup your site.

Sometimes Shrinkage Can be a Good Thing

I needed to do something about my pictures. The perfectionist side of me wants to display pictures in amazing detail and high pixel rates but if you are just looking at the pictures on a mobile phone, you won’t be able to see how beautiful they are fully rendered so I can afford to reduce the number of pixels in order to speed up my site. Most of the time we seem to post the largest pictures in the world into our page. Sure everyone has fast Internet (or actually they don’t.) According to a Pew Study in August 2013, only 70% of America has access to broadband Internet. So assume someone is still looking at your site using a 56k modem with your site.

Two plugins I have used are “WP Smush It” which uses Yahoo’s image shrinker but doesn’t work with images over 2 Meg and “EWWW Image Optimizer” Both are free and work great. Under the Media menu after you install “EWWW Image Optimizer” you will see “Bulk Optimize” and “Unoptimized Images” “Bulk Optimize” will optimize any un-optimized images.

Bulk-Optimize-Progress-Ewwww

Two options you will have to fight your perfectionism over are lossy images. These settings are found under Settings, EWWW Image Optimizer, Basic Settings. Will the reduction be such that people notice or will you speed up your site by making your images smaller.

ewww-image-optimizer-settings

Next I looked for Caching plugins for WordPress.

If I just had Enough Cache

Caching works two ways depending on the caching methodology. Caching is loading your web pages into the memory of the web server rather than reading the files from the hard drive your server is hosted on. Memory will almost always be faster than hard drives. Memory works in nanoseconds while hard drives work in milliseconds. Next some caching plugins optimize your site by turning your dynamic PHP pages into static HTML. Since WordPress runs with PHP as its primary programming language, PHP code is interpreted as opposed to compiled and executed. When you visit pages on your WordPress site they are dynamically interpreted and sent by the web server to your browser.  By rendering the pages into HTML and storing it in memory, the PHP engine that interprets the page doesn’t have to do much if any work. This makes pages load faster, this and your cPanel selection that says compress HTML means your site appears even faster to your visitors.

Plugins I am using:

Autoptimize – speeds up your site by minifying your CSS (Cascading Style Sheets) and JavaScript. Minifying is the process of basically removing the white space in CSS and JavaScript by concatenating and compressing your scripts.It works in tandem with other caching plugins. “Optimize HTML Code” and “Optimize CSS Code” will be on by default but you may want to consider and test other options.

Autoptimize

 

WP Widget Cache – “Cache the output of your blog widgets. Usually it will significantly reduce the SQL queries to your database and speed up your site.” according to their info on WordPress.org. Basically it pre-fetches and then caches things that require database queries in your Widgets so they don’t have to query the database every time someone visits a page.

WP-Widget-Cache-Options

 

And finally the last piece of my Cache scheme is a plugin called WordFence Security. Now you may know WordFence as a WordPress firewall (that could take an entire article all by itself) but did you know WordFence also has caching capability? Well, now you do. WordFence uses their Falcon Engine for caching.

WordFence-Caching

 

WordFence is of course not the only Caching game in town.

WP Total Cache – is a very good caching plugin. It does things many of the individual plugins mention above do. Unfortunately working with plugins can be a trial and error process. So one week this plugin worked better than others, the next week it didn’t do as well. Why? It has to do with content, the mix of plugins your site has, and your hosting provider. If your provider doesn’t have some of the libraries needed by the plugin, it can’t do its best. So it is important you are aware of what is required.

Quick Cache Lite Edition – This plugin requires a higher version of PHP than my current provider offers (They are working on it) so I couldn’t fully test it. It has good reviews but it is a lite version so to get all the bells and whistles you have to buy their paid version. As I have already paid for the pro version of WordFence, I use it instead and it works with my current version of PHP.

Read my post (“The Need For Speed (Part 2)“) about testing site speed for more information.

10 Things I am Pretty Sure I am sure about WordPress

 

 

The title for this is inspired by Alton Brown who gives a talk called “10 Things I am pretty sure I am sure about Food”. It changes over time as he swaps out different elements but is very funny all the same.

See my Links page for links to all plugins mentioned in this article.

1. What the heck is WordPress?

WordPress is a web based content management system. There are four things it has to have to live. An OS, the operating system. This can be Linux, Windows, Mac OS. There are probably others but those are the top three. It has to have a web server, usually it is Apache but lately more and more providers are using Nginx. It needs to have a database, this is usually in 99% of the installs, MySQL an open source database platform. And lastly and this is non-negotiable, it has to have a programming language called PHP. Now you don’t really have to know much about any of that if you are using a hosting provider and they say they support WordPress and with WordPress powering 21+% of the Internet’s websites run on WordPress. According to managewp.com, 74.6 million websites depend on WordPress. Some of the biggest websites in the world depend and run their site on WordPress. NBC Sports, TED, TechCruch, CNN, CBS, Time, The New York Times, Dow Jones, UPS, just to name a few. Okay so some of you are probably stuck at the first sentence about WordPress, content management system. You give it content, a blog post, a picture, a video, whatever and WordPress makes it easy to publish.

2. WordPress is very easy to get started with.

WordPress has the famous five minute install. And if your hosting provider has Scriptalicious or other automation scripts, it could happen in three.

The issue with easy is that often you are given choices and lulled into a false sense of accomplishment because, hey, this is a wizard. I can’t pick a wrong answer, right? Also it is very customizable in that you can use themes to give it a certain look and you can use what are called plugins to give your WordPress functionality it either doesn’t have or that needs to be improved.

3. Every Picture tells a story.

Blogging is a visual art. WordPress makes it super easy to post pictures to your site. And pictures are often what draws people to read your content. Here are some easy ways to find “free” pictures for your site. Go to images.google.com in your browser, type in what you are searching for and then we need to change a search setting. You want to select, “Search tools” and then select “Labeled for reuse with modification” This means whoever posted the image said it was okay to download it and modify it for any purpose you want including commercial use. If you are blogging for fun and not for profit, you can choose “Labeled for noncommercial reuse with modification”. Granted this will mean there aren’t a lot of images as not every one designates. Additionally this isn’t foolproof but it does mean you tried in good faith to use an image no one would mind. Hubspot.com gives away a lot of great free advice on blogging and social media and it also gives away a fair amount of free stock images. You can also get images from flcker.com that are licensed under Creative Commons, but you must read each images licesning. Some give their pictures away but want a blurb about where they came from. Respect other people’s content and usually they will respect yours. Put dashes in your photo names so Google can use the image information to improve indexing of your site. Also, use Alt Text on every picture. This is good for those who can’t see well or at all and for search engines.

Google Image Search by license type

4. I have a need for speed.

Google doesn’t like slow sites and neither do readers on the Internet. Here are some quick tips on how to speed up your WordPress Site.

Squish your pictures. Most of the time we seem to post the largest picture in the world into our page. Sure everyone has fast Internet (or actually they don’t.) According to a Pew Study in August 2013, only 70% of America has access to broadband Internet. So assume someone is still looking at your site using a 56k modem with your site.

Two plugins I have used are “WP Smush It” which uses Yahoo’s image shrinker but doesn’t work with images over 2 Meg and “EWWW Image Optimizer” Both are free and work great.

Next, turn on gzip compression on your site. You can’t do this inside WordPress, instead this is done in Cpanel on your hosting providers site. The backend web server your hosting provider is using is probably Apache or Nginx. Inside Cpanel, there should be a place that says “Optimize Website” go there and turn on compression. Basically your web browser supports compressed web pages. The web server can send the pages to you compressed and your browser will decompress them on the fly. Smaller files, faster content delivery.
Optimize Website

There are more plugins that optimize your site by compressing JavaScript and CSS (Cascading Style Sheets) ahead of time for you by basically removing the white space from inside the file. I use the plugin AutoOptimize. The process of getting rid of the white space in the file is called minifying. It minifies and compresses your JavaScript and CSS files.

Additionally you need a caching plugin of some time. WP Super Cache is one. There are many but that one gets a lot of buzz. Since WordPress pages are usually Dynamic, it takes your dynamic page and turns in into a static page. This means the PHP engine on your web server that creates the page on the fly and then sends it doesn’t have to do the rendering part. So pages are faster as the static pages are loaded into the memory of your hosting provider’s web servers. RAM is always faster than reading from a hard drive. If you have a page that really is dynamic, you can remove that page from caching so that it is rendered and them delivered. I will talk about another plugin that does caching in a minute. You can only run one caching plugin or bad things happen.

There are more ways to speed up your site but those are good starts.

Also test your site using Google Page Speed or Pingdom.com.

5. How to make search engines love you aka My Grandma uses the MSN search box

If rare exception, if Google doesn’t know about you, you don’t exist. In case you didn’t know it, all the cool kids run Chrome as their web browser of choice. But my Grandma’s computer came with Internet Explorer and it is the only browser she knows. And when she brings up IE, it brings up the MSN page by default. And as soon as the page loads it changes focus to the search box. How many of you have seen people type in the web address into the MSN search box aka Bing and then click on the first link on the search results page? And this is how they go everywhere. Also Grandma is running IE8 but that is another problem for another day. She is patient but I don’t look forward to explaining Chrome is also a browser to her.

MSN IE Search Box

 

So I worked on a site for an organization. Their hosting provider was super expensive and so when I took over I asked if I could move the hosting and move to WordPress. The last thing I said was it would be cheaper and easier to manage. And of course, they said yes. So I moved it. But how I surf the Internet is not how all people search the Internet. So I started getting complaints some of the group could not find their site. They said they were going to a another site with a similar name. So I called one of them up and they told me how they got to our site. MSN. So we were not the top hit on MSN. So I went into action. This meant I needed to do two things. 1)Put the site on MSN’s web crawler and 2)Put it on Google’s. While Google does 80% of search in the world, it is not the search engine of MSN, Bing is. Google and Bing both have webmaster tools. And both like sitemaps. A sitemap is an XML (extensible markup language) representation of the structure and layout of your site. So I use a plugin (that nags to get you to buy their pro version but the free one is fine) called “Google Sitemap”. This creates the XML file for you.

Here is a snippet of what mine looks like:

My Google Site Map

Or click this link to see the sitemap of this site. It changes as I add new content to the site.

In order to access Google webmaster tools, you have to have a Gmail account. Sorry, no way around it. Go to https://www.google.com/webmasters/tools That is where you go to register your site. It will make you download a file that you have to upload to the root of your website that Google will go and find to be sure you own the site. Because you put their special file in the right place, you must own the site, right? You can learn so much about your site after it has been online a bit. Google knows how many search and view your page. It actually knows how long people spend on your page as well. For Bing, you have to have an Outlook or Hotmail account. Go to http://www.bing.com/toolbox/webmaster login with your Microsoft account and basically same deal as Google, sitemap, upload special file. Dot Dot Dot. Google will tell you if your site has malware on it or if you have pages erroring out. All free stuff.

Google Webmaster Tools

 

Anyway, after I did that, the organization’s site was the first hit if they typed in the right keywords. Making sure your pages have good descriptive meta data is important too but I have more to cover. I told you about “Google Sitemap”. Also “Verify Bing Webmaster Tools” is another good plugin to have.

6. Locking the front door is a waste if you don’t lock the back door too.

When you setup your WordPress site, do not use the username admin. That used to be the default and well, hackers figured that out. I get two or three emails a day from my firewall telling me people are trying to log in with admin as the user. Good luck because it isn’t that. Don’t name your database the default names suggested by the WordPress install either. Sure this is “Security through Obscurity” which essentially means because you didn’t make it easy, most hackers will move along. I go into great detail about how I handle my security here.

7.  Always Backup before you go Forward

Before you allow that plugin to update or allow the latest version of WordPress to install, you must backup. I go into great detail about backups here.

8. When Themes and Plugins Go Rogue

Sometimes bad things happen to good themes or plugins. Sometimes things get a little technical. To fix, sftp to your site and rename the theme or plugin. Go to this page to read about accessing your site via sftp using Filezilla. Sure the page is really about backups.

Your themes and plugins are located under your site folder under wp-content. Once you get into the directory, you should be able to rename the last plugin or theme you installed. Look at “Last modified” date for clues as to when your installed your last plugin or theme. Once you rename the rogue item, your WordPress site will disable it and revert to default since it isn’t where it remembers it being.

themes plugins directory

9. Feed the Content Monster

The SearchEngineLand website says 97% of blogs fail in the first year. Their owners just stop posting to them and they are zombies on the Internet until the hosting provider bulldozes them over when the last payment check clears. One piece of advice that many swear by and I am going to start following is, create a content calendar. Hubspot has an Excel spreadsheet they offer for free to help with planning. And WP Scheduled Posts is a good free plugin to use to allow you to schedule when posts will well, post. If you have a great day and write two or three blog posts, you won’t want to post them all at once as people will usually read the newest stuff. They may not scroll down to post number three. So schedule your posts (unless they are time sensitive) so they are paced out.

Your Fans will appreciate if you post on a consistent basis and perhaps at a regular interval say, twice a week. It is too much of a grind to create awesome content people want to read seven days a week. Not happening. But if you follow a pattern, people will notice and they will visit your site frequently to read what’s new.

10. Sharing is Caring

You know the best way to build a following for your website? Sharing on social media. So first up, you need to work to build a following using either Twitter, Facebook, Google+, or Pinterest. Now if you are familiar with Pinterest, you may be saying, what? Well, you can post links on Pinterest and it will put the top most picture in your blog and list it on Pinterest. If people click on the picture, it takes them to your blog. I would never have thought of this but Social Media Guru Peg Fitzsimmons, co-author with Guy Kawasaki, of the book The Art of Social Media: Power Tips for Power Users swears by it. She says she has gotten a lot of traction and new followers this way.

Anyway, there are several plugins that as soon as you publish a post, posts a link to Twitter or Facebook for you. “WP to Twitter” is a plugin I have used. Basically you give it access to your Twitter account, choose your favorite URL shortener, Bitly, Tiny.url or whatever and it will post a link to your new content to Twitter. For Facebook, the WordPress Jet Pack has an option to allow it to post to your Facebook page to let people know you have new content. It is a little technical to setup so not quite as easy as the Twitter one. Now the second thing you have to do it make it so your content is super easy to share. Using a plugin like “WP Social Share” or the free version of “Cresta Social Share Counter” are a couple of ways you can put share buttons for most social networks to make it easy for others to share your content. Every plugin I have told you about up until now has been free.

But recently I paid money for a plugin because some people I follow who I have come to respect created a plugin to allow easy sharing. This plugin is called Social Warfare. I am ramping up to get really serious about writing and social media next year and I felt I needed something to make my site very easy to share from. The “Social Warfare” plugin makes it so easy for visitors to share my content and I love the sharing counters which show others how much it was shared. Strangely the most something is shared the more people want to share it more. I have stock in this product. I bought it like everyone else who uses it. And I have noticed others whose sites I follow use it. When I accidently posted something popular once, I was able to see how many times people shared it using my plugin’s links.

 

Here is a links page to every plugin I mentioned.

Links January 2015 Edition