13 Great WordPress Speed Tips & Tricks for MAX Performance

Performance is a key factor for any successful website. And since WordPress is becoming more popular than ever, it will only be at its best when raised in the proper conditions. Here are a few things to try if you find that your WordPress site is not performing as well as it could be due to high traffic or hidden issues you don’t know about.

Some Basic & Simple Steps

1. Upgrade to latest WordPress release

WordPress 2.7 have manny performance improvements over previous versions. So you better upgrade to latest release to make use of this.

2. Remove unnecessary Plugins & upgrade current ones

Remove any plugins that you aren’t using. Deactivate them and physically delete them from your web server. Deactivated plugins will affect the speed of a site because the WordPress checks to see if they are activated or not. Also you must stay up to date with the latest versions of the plugins you are currently using. Developers release new versions because they’ve modified the code in some way to make the plugin work better.

3. Minimize PHP and database queries

I read about this great tip on Wpcandy’s simple ways to speed up WordPress post. It makes a lot of sense, cutting down on PHP and database queries. Each time a page on your site loads, if your browser has to execute any PHP queries, it adds to the load time. If you replace the PHP queries with static HTML, every time a page loads, your browser just reads the HTML.

4. Optimize and Repair your Database from myPhpAdmin

Every week or so you should login to your myPhpAdmin and optimize your db. Locate your WordPress DatabaseTables, check all the tables in the Check Boxes, select the Optimise Tables Option and repair. You would be surprised how well this trick might work, it saved more than 10% of my current database size.
Wordpress Speed 5 in 13 Great WordPress Speed Tips & Tricks for MAX Performance

Take a good care of your Images

5. Use Reliable image hosting service

Try moving the common web images, CSS, JavaScript and other static files to Amazon S3 Storage service and you will notice the average CPU load / memory requirement of the web server will be reduced a lot. Read this step by step guide.
Wordpress Speed 6 in 13 Great WordPress Speed Tips & Tricks for MAX Performance
You can also try this WordPress plugin, WP-Offload will boost the performance of your blog by seamlessly offloading static content like images, documents and movies. This will greatly reduce bandwidth consumption and the number of HTTP requests issued to your web server. Additional features such as remote image manipulation and thumbnail generation are provided.

6. Optimize your images with this great tool

Shrink O’Matic is an AIR application to easily (batch) resize (shrink) images. It handles JPGs, GIFs and PNGs. Simply drag and drop images and they’ll be resized as you wish! Options allow you to choose the output sizes, names and formats.
Wordpress Speed 1 in 13 Great WordPress Speed Tips & Tricks for MAX Performance

Great Advices for better performance

7.Install WP Super Cache Plugin

I guess many of you know why we always insist on using this plugin. This plugin generates static html files from your dynamic WordPress blog. After an html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts and will not actually load any content from the database at all therefore the post will load faster with less stress on your server.

8.PHP Speedy WP

PHP Speedy WP can quickly and easily speed up your WordPress site and improve your blog’s response time without too much effort on your side by allowing us to automatically combine all JS and CSS files into only two files – which in turn helps greatly with page loading times. CSS Background Images are automatically converted to data URIs. This is useful in reducing the amount of HTTP requests even further. And, importantly, it’s compatible with Internet Explorer, even though it doesn’t support data URIs. Unfortunately, PHP speedy comes with few flaws out of box that need fixing: Combined JavaScript is placed at the top of the page instead at the bottom, it does not work with WP Super Cache. In order to get this two working like we want them, you have to check this great article by Prelovac to make few adjustments to both plugins.
Wordpress Speed 3 in 13 Great WordPress Speed Tips & Tricks for MAX Performance

9.WP CSS

This plugin GZIP and strip whitespace from your CSS files. It allows you to confidently use @import inside a CSS file and not worry about what happens on the user’s end. It will look through your style.css file and put any @import files into it. A cache expiry time can also be set. You can also add CSS files to a specific page or post and putting all of them into one file.

10.DB Cache

This plugin caches every database query with given lifetime. It is very fast and uses small disk space for caching.
I didn’t try this plugin yet but I’ve read many reviews recommending it. Let me know what do you guys think about it so we can update this post with correct information about its performance.

11.Speed up access to your favorite frameworks via the AJAX Libraries API

The AJAX Libraries API is an attempt to make Web applications faster for developers in simple ways by becoming a content distribution network and loading architecture for popular javascript libraries including:
You can either link to the source code directly:
  1. <script type="text/javascript"  
  2.     src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script>  
Or you can use Google’s API:
  1. <script type="text/javascript" src="http://www.google.com/jsapi"></script>  
  2. <script type="text/javascript">google.load("prototype""1.6.0.2");</script>  
By using the google.load() method, your application has high speed, globally available access to a growing list of the most popular, open source and up to date JavaScript libraries.

12.Display page loading time + number of queries

Here is a simple code to insert on your template to know how long it took for your page to load, or how many sql queries were executed. This tip is very good for knowing how well is your WordPress blog is optimized.
  1. <?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?>  seconds.  

13.Optimize DB

MySQL is a great database, but it doesn’t clean itself up the way it should sometimes. This plugin runs an optimize table command on your WordPress tables, effectively defragmenting it. This is very useful for tables that are frequently updated. The interface is very simple at the moment: just one button: Optimize Now, and some info on how much space will be saved. It looks like this:
Wordpress Speed 4 in 13 Great WordPress Speed Tips & Tricks for MAX Performance


Display the number of SQL queries on your blog

If you want to display how many SQL queries have been made to your database as I’ve done on this blog like this:
53 queries in 0.788 seconds
Just open the footer.php in your theme folder and paste the following code at anywhere you like:
1
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds
Another code for displaying that but except regular visitors and search engine bots, we will use a conditional function to do that:
1
2
3
<?php if (is_user_logged_in()) { ?>
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.
<?php } ?>
The get_num_queries() function returns the number of executed query during your page loading.


Count the number of comments on your WordPress blog

This article will guide you how to display the number of comments on your blog (of course those are approved comments) by a simple php code below.
1
2
3
4
5
6
<?php
global $wpdb;
$num_comments = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_approved = '1'");
if ($num_comments > 0) $num_comments = number_format($num_comments);
echo "There are " . $num_comments . " comments on my blog";
?>
Paste the code to places you like in your theme's php files. And this is a live demo 
There are 1,172 comments on my blog
In the next article, I will guide you how to count the number of posts/pages on your blog. Remember to read!


Awesome WordPress hacks to make your blogger life easier

WordPress hacks are always a popular topic here at Cats Who Code. Today, I have compiled hacks that will make your blogger life easier, by optimizing and simplifying how your WordPress blog works. Enjoy!

Hardcode to make WordPress faster

Hardcoding is generally not a good practice, however in the case of an established website, hardcoding your blog url, site url, template path and stylesheet path will make your blog run faster.
When a function such as bloginfo('url') is called, WordPress executes a query to your database to get the value, except if the value can be found on your wp-config.php file.
To hardcode those constants, edit wp-config.php and paste the following (Don’t forget to change the values!):
view sourceprint?
1.define('WP_HOME', 'http://seo-ho.blogspot.com/'); // blog url
2.define('WP_SITEURL', 'http://seo-ho.blogspot.com/'); // site url
3.define('TEMPLATEPATH', '/absolute/path/to/wp-content/themes/cwc5');
4.define('STYLESHEETPATH', '/absolute/path/to/wp-content/themes/cwc5');
Source: http://digwp.com/2009/07/optimize-wordpress-performance-with-the-wp-config-php-file/

Set HTML editor as the default

I know a lot of tech-savvy persons who don’t really like WordPress “visual” editor. Personally, I don’t use it because I’m used to writing HTML, and also because WYSIWYG editors are more likely to produce bad, not valid or dirty code.
If you prefer using the HTML editor, then what about making it your blog default? Just paste the line below into your theme functions.php file, and you’re done.
view sourceprint?
1.add_filter('wp_default_editor', create_function('', 'return "html";'));
Source: http://www.wprecipes.com/how-to-set-html-editor-as-the-default-in-wordpress

Make term edition a lot easier

For some reason, WordPress uploader won’t let you upload some filetypes, such as Textmate’s .tmCommand. If you need to upload those files to your WordPress blog, here is a very nice snippet that will allow you to do it.
Simply paste the following code on your functions.php file. If needed, you can add more file types by adding them on line 4, separated by a pipe (|)
view sourceprint?
01.<?php
02.function addUploadMimes($mimes) {
03.    $mimes = array_merge($mimes, array(
04.        'tmbundle|tmCommand|tmDragCommand|tmSnippet|tmLanguage|tmPreferences' => 'application/octet-stream'
05.    ));
06. 
07.    return $mimes;
08.}
09.?>
10. 
11.add_filter('upload_mimes', 'addUploadMimes');
Source: http://www.wprecipes.com/wordpress-tip-allow-upload-of-more-file-types

Remove autolinks in comments

Links in comments can be a good thing when they’re useful and relevant, but unfortunely lots of people are just leaving links in your comments in order to get clicks and backlinks.
As this became a recurrent problem on my blogs, I’ve looked for a solution and found a piece of code that will make urls appears as text, not as links.
As always, the code have to be pasted to your functions.php file.
view sourceprint?
1.remove_filter('comment_text', 'make_clickable', 9);
Source: http://www.wprecipes.com/wordpress-hack-remove-autolinks-in-comments

Easily modify contact info

I always wondered why WordPress still has a Yahoo and a AIM field for user contact information while nowadays, services like Facebook or Twitter became a lot more popular.
This simple hack will remove the AIM, Yahoo and Jabber fields and will replace them with Twitter, Facebook and LinkedIn. Just paste the code below in your functions.php file, and you’re ready to go.
view sourceprint?
01.function extra_contact_info($contactmethods) {
02.    unset($contactmethods['aim']);
03.    unset($contactmethods['yim']);
04.    unset($contactmethods['jabber']);
05.    $contactmethods['facebook'] = 'Facebook';
06.    $contactmethods['twitter'] = 'Twitter';
07.    $contactmethods['linkedin'] = 'LinkedIn';
08. 
09.    return $contactmethods;
10.}
11.add_filter('user_contactmethods', 'extra_contact_info');
Advanced users would probably enjoy this class which allow you to manage user contact info easily.
Source: http://thomasgriffinmedia.com/blog/2010/09/how-to-add-custom-user-contact-info-in-wordpress/

Leverage browser caching via .htaccess

One of the easiest way to improve your blog speed and general user experience is to leverage browser caching to reduce the number of http queries that the server needs to process. In fact, static files like images or PDF documents are not likely to change often so we can improve our blog speed by telling user browsers that they don’t need to download those files again if they’re already on the browser cache.
Open your .htaccess file (located at the root of your WordPress install) and paste the following. Remember to always make a backup before editing .htaccess.
view sourceprint?
01.## EXPIRES CACHING ##
02. 
03.ExpiresActive On
04.ExpiresByType image/jpg "access 1 year"
05.ExpiresByType image/jpeg "access 1 year"
06.ExpiresByType image/gif "access 1 year"
07.ExpiresByType image/png "access 1 year"
08.ExpiresByType text/css "access 1 month"
09.ExpiresByType application/pdf "access 1 month"
10.ExpiresByType text/x-javascript "access 1 month"
11.ExpiresByType application/x-shockwave-flash "access 1 month"
12.ExpiresByType image/x-icon "access 1 year"
13.ExpiresDefault "access 2 days"
14. 
15.## EXPIRES CACHING ##
Source: http://thomasgriffinmedia.com/blog/2010/11/how-to-leverage-browser-caching-in-wordpress-via-htaccess/


10 Easy Ways to Secure your WordPress Blog

Securing your blog is important. With WordPress so popular these days, it’s becoming a bigger and bigger target for hackers. In this post we’ll look at ten easy ways to secure your WordPress blog.

1. WP Security Scan

This very easy to use plugin will sort out some of the basic security issues with WordPress - it'll change your database's name and alert you to flaws in your installation's security, amongst other features.
Download.

2. Protect your plugins

Plugins are an easy way for a hacker to get access to your blog if they've got flaws in them. An easy way for hackers to find out which plugins you're using is to go to /wp-content/plugins/, and they'll find all the plugins that you're using. The solution? Put a blank index.html file in the wp-content/plugins/ folder.

3. Update WordPress

This is super-easy to do, but a surprising number of people don't do it: update WordPress. If you're super-security-conscious then don't upgrade to the next big release immediately (ie 2.8), wait for the bug fixes to come in (ie wait for 2.8.1).

4. Pick a good password

Common sense. Use a good password. Don't use the same password that you use on every site, create something that is easily memorable, with a mix of UPPER and lower case and some numbers in there too. Change your password regularly too.

5. Change the admin user name

By default, the WordPress user name is admin. [Lots]% of people don't change it. Why should you change it? If a hacker has your username, he's halfway there to getting into your site, he just has to guess your password. If the hacker has to guess your username as well, then that's twice as much work to do. It's super easy to migrate posts from one user to another, just create your new user and then delete the admin user. You'll be given the option to migrate posts to another user.

6. Protect your WP-Config.php file

Your WP-Config.php contains your database name, database username and database password. It's something to protect.
Just add the following code to your .htaccess file:
# protect wpconfig.php
 
order allow,deny from all
Source - Nometech.com

7. Hide your WordPress version

First off, go into your header.php file and remove the meta data (something like <meta name="generator" etc). Trouble is, WordPress adds in the meta data automatically! How do you remove it? Paste this code into your functions.php file.
<?php remove_action('wp_header', 'wp_generator'); ?>
Source - ProBlogDesign

8. Limit the number of times user can enter their password (wrongly)

The Login LockDown plugin will lock out users if they enter their password wrong too many times. You can choose how many times users can enter their password and also how long they're locked out for via a neat options page.
Download

9. Limit WP-Admin access by IP

This isn't something that I do personally, as I blog on a fair number of different computers, but if you're just on the one, with a fixed IP, then this is a great hack for you: you can restrict access to the wp-admin directory with a spluginimple .htaccess hack:
order deny, allow
allow from a.b.c.d. #your static ip
deny from all
Source - Nometech

10. Login via SSL

If your host has an SSL certificate then you can use this great little plugin to login via SSL. The Admin SSL plugin "secures login page, admin area, posts, pages - whatever you want - using Private or Shared SSL."
Download
Source: catswhocode.com


Gforums Premium WordPress Forums Plugin


Turn Your WordPress Site Into Forums site!
Just Imagine How cool it would be if you can Turn your wordpress site into a forums site or discussion board!.This was impossible till Yesterday but, not today!
Introducing The wordpress  gForums wordpress forums theme!

The Revolutionary WordPress forums theme that turns your wordpress blog site to forums(Discussion board) in seconds!

Download:
http://megaupper.com/files/SD3XKNPP/gForums_v1.0.zip
http://www.filehit.net/fisier/110005
http://www.mediafire.com/file/zy0zgn2ymmn/gForums_v1.0.zip
http://uploadbud.com/files/1K35LTFT/gForums_v1.0.zip
http://www.uploadjockey.com/download/8052764/gForums_v1.0.zip


How do you get backlinks fast

Create LinkBacks is one of the most important tasks for SEOer to optimize website search engine. Seoer always create a new backlinks not stop, however, while creating backlinks there are too many questions so we can complete a backlinks. This article will address some questions and help the newbie like me can create the backlinks as possible:
* How do I get backlinks fast?
* How much should build links every week, every month?
Does google have a fine website if I make too many links?
The answer to these questions will be thoroughly examined in this article. Let's start.
The backlinks built by nature.
"Nature" is mentioned here is that when consumers find and visit your Web site or through search engines or other sources, they see or read the contents and liked it so they link with it.
Of course visitors are not always related to it. So, this number may be very small, especially in Vietnam few people have the habit of sharing the news of foreign political and social life ... If you have a successful website without using any type of service SEO How, for example, link building, and you earn only a few natural links style in a month with some nice domain names.
Here are some sample data from the successful site (no link building services from SEO companies):
You'll notice that each site receives only up to 4 links per month from the website domain name beautiful. And at least one link per month. Data average of 2 links per month.
Note these pages have no problem with indexing or ranking. The data is to prove that backlinks do not need to create a large number of newly created good ranking results, it is important that it needs a star quality and natural properties to be sure.
Thing to remember when creating backlinks a "quality score of" other AOE pediatric doctors. With Google, links are highly linked to from within the site's content. These are quality links that will have a positive impact on your rankings. The growth of the link depends on the development of website content.
Remember that if you develop more quality content every day, the amount of viewers will increase significantly less than or update website content. With this strategy you would hope to receive more than one link that you put in it. For example, the site received comments as typical of the coment VNN been hacked, or have medical Wikileaks claims to Vietnam.
Forum is continually updated, as well as the blog, so you can expect a large number of visitors, may be related to a large number of your customers monthly
Slow and fast link acquisition may not hurt
A natural link is fast or slow the natural elements standing decision
for example, the site creates a large amount of public interest, such as Wikileaks. Consider what happened when Julian Assange released secret documents and confidential for your website Wikileaks. It creates great publicity, but also created a large number of links to your site.
So to answer the question: "How quickly I'll get links to my website?" "How much should build links every week, every month?" ... Then remember that If you are building a large number of links to your site, but want the number of links to your website reached a relative it is necessary to have a number of reasons. A good method is to create public opinion from your site. There are many simple and effective way to do this:
* Publication of controversial content or virus - Wikileaks is an example: publishing the story of the secret government will certainly create a lot of attention. VNN or hacked as well as disturbing public opinion
* Create the spread or through a video that interested readers can not be ignored.
* Spread over the image, this might be regarded as a strong spread globally, but should be legal, it's easy to scrape the ice germ;;). But there are so many things can spread, but still legally related to social life. Or a certain unique products from our store.
Some webmasters actively building backlinks. But it looks bad to build a large number backlinks to a site not updated at all or very little about its contents.