Success on social media sites can bring serious traffic to your WordPress blog. However, hundreds or thousands of visitors to your site in a short period of time can crash your web sever if. A good web host is essential, although, ensuring your blog not wasting valuable bandwidth on poorly optimized images, and unnecessary scripts and widgets is also important. So how do you optimize your WordPress install for the best performance? Here are some key tips:
I think having attractive images in your articles is a key part of blogging, but I also think you need to optimize images so that they not any larger than they need to be. If you are lucky enough to have a copy of Photoshop, it is ideal for this task. A few rules which will help you out are:
- Save images that use a limited pallet as .gif or .PNG. i.e a logo that just uses red, white and blue.
- Save images that use the full color spectrum of colors as .jpg i.e a photo of yourself.
If you are saving for the Internet you should use “Save for web”. The aim is to get the final file size as small as possible without wrecking the appearance of the image.
PNG & Gif (indexed): Set the total amount of color to the lowest value possible without effecting appearance of the product. You can play with dither, for some images it will help remove artifacts, by adding a bit of noise. Raise the value of Web snap as high as you can go without making the final product look ugly.
Jpg (RGB): Lower the quality to as low as possible without making the final product look ugly, and without adding too many artifacts, you can also add some blur which may remove so ugly artifacts, but don’t get too carried away.
Make sure that if you are resizing images that you set the mode to RGB. Indexed images don’t resize well.
If you don’t have Photoshop, the same principles apply for any application. Make sure you use the appropriate format. And use optimizing tools to make the file size as small as possible without making the final product look ugly.
You should ensure that images are cropped to remove any unnecessary parts, and resized to the correct final size. Don’t waste valuable bandwidth by using html code to resize an image.
Use A Minimalist Theme
Attractive graphics and excessive use of plug-ins in your theme can add to the file size of your site, and raise your loading time. So selecting a minimalist theme is a great way to reduce the size of your WordPress blog. Here are some great minimalist themes:
My Favorites include:
Brian Gardner’s Silhouette:
Enable Object Cache
By default WordPress doesn’t the enable object cache, but you can enable it easily by adding these lines at your wp-config.php files:
and to set it’s expiration time you can add this line :
Reduce Overall Latency by Reducing HTTP Requests
PlanetEnjoy writes about the importance of reducing HTTP requests:
Every HTTP request, or loading each item on your website, has an average round-trip latency of 0.2 seconds. So if your site is loading 20 items, regardless of whether they are stylesheets, images or scripts, that equates to 4 seconds in latency alone (on your average broadband connection).
So it is important to ensure that you are not including an unnecessary amount of HTTP requests.
Don’t Rely on Other Sites!
If you are loading content from other web sites it is going to slow your loading time. For example both the widgets at the bottom of this page load from other servers, Blogrush and Blogcatlog. If either of these servers are having bad days the widgets can take an age to load. This is part of the reason why I have them in the footer, so any lag doesn’t stop any other content from loading. Ad networks, badges, widgets, images, scripts may all be loading content from other servers. For optimal performance you need to rely as little as possible on other servers.