Dustin Schmidt

Westchester Real Estate, Internet Marketing SEO, and allegorical anecdotes.

10 Great Ways To Optimize Your WordPress Blog

Creating an effective presence in the blogosphere has become far more competitive in recent years. With the steady growth of Facebook and Twitter, blogs are morphing into social media micro sites of their social network affiliates. I only host sites on Linux backed servers for performance and security purposes. Some of the following suggestions can only be applied in a LAMP environment (i.e. – askapache’s .htaccess tweaks).

Here are a few tips and plugins that I have found have worked quite well. I cannot take full credit for these so please make sure to check out the developers associated with each tweak for further information.

1.Install All-in-One SEO Pack by hallsofmontezuma and Google XML Sitemap plugin by Arne Brachhold. Post titles should appear before site name and sitewide keywords should mirror Google Adwords for relevant keyword searches. Also, regularly resubmit and update your xml sitemap and robot.txt files. I know this goes without saying, but it”s something I sometimes forget to do.

2.Install Wp-Super Cache by Donncha O Caoimh. This will greatly speed up page load times. If you use firefox I would install ySlow to see where your site is prior to installation and your load time once you have gzip compression and page caching in place. To make this plugin even more effective check out Askapache”s Hacking WP Super Cache For Speed. His re-writing of the .htaccess file has proven to be quite effective.

3.Make the most out of your .htaccess file – by enabling Gzip Compression, adding an Expires Header, and disabling ETags you can definitely give your WordPress blog a needed boost. Here is a glimpse at some of the things I do with my .htaccess file.  This accomplishes quite a bit and I also block out known malicious IP addresses for additional security.

# Use PHP5CGI as default
AddHandler fcgid-script .php
# CONFIGURE media caching
#
Header unset ETag
FileETag None

Header unset Last-Modified
Header set Expires "Fri, 21 Dec 2012 00:00:00 GMT"
Header set Cache-Control "public, no-transform"

#####################################################
# protect the htaccess file

order allow,deny
deny from all

# disable the server signature
ServerSignature Off
# limit file uploads to 10mb
LimitRequestBody 10240000
# protect wpconfig.php

order allow,deny
deny from all

# disable directory browsing
Options All -Indexes
#block referring domains
RewriteEngine on
RewriteCond %{HTTP_REFERER} digg\.com [NC]
RewriteRule .* - [F]
#####################################################

order deny,allow
deny from 64.211.169.0/24
deny from 210.29.64.13/32
deny from 208.116.53.14/32
deny from 206.212.248.224/27
deny from 206.212.249.128/26
deny from 206.212.250.128/26
deny from 206.212.250.192/28
deny from 216.180.234.184/29
deny from 218.206.193.28
deny from 211.53.188.60
deny from 66.232.147.154
deny from 211.233.5.218
deny from 92.240.68.153
deny from 200.2.210.66
deny from 130.238.142.41/32
deny from 212.190.67.12/32
deny from 122.198.59.142/32
deny from 124.236.241.64/28
deny from 70.42.163.0/28
deny from 63.219.95.0/24
deny from 89.249.68.10/32
deny from 217.74.65.162/32
deny from 116.233.249.68/32
deny from 212.190.121.119/32
deny from 217.74.65.160/29
deny from 91.203.68.0/22
deny from 84.16.240.233/32
deny from 216.245.201.208/32
deny from 212.174.252.221/32
deny from 221.12.41.0/24
deny from 220.248.167.126/32
deny from 140.115.218.107
deny from 140.115.222.178
deny from 81.95.146.98
deny from 211.100.33.61
deny from 70.96.173.248
deny from 60.0.38.85
deny from 221.237.67.107
deny from 202.68.229.38
deny from 140.120.61.137
deny from 122.124.128.121
deny from 219.153.32.98
deny from 61.134.218.209
deny from 61.134.217.119
deny from 194.105.226.8
deny from 61.220.27.241
deny from 194.72.238.61
deny from 61.73.149.109
deny from 208.68.93.26
deny from 140.115.222.90
deny from 12.155.200.45
deny from 90.188.149.210
deny from 209.32.71.102
deny from 159.148.97.48
deny from 219.132.161.232
deny from 65.18.215.149
deny from 217.174.203.41
deny from 70.82.51.98
deny from 209.191.87.218
deny from 140.113.68.21
deny from 85.190.0.3
deny from 201.211.253.125
deny from 67.118.242.129
deny from 193.224.94.68
deny from 217.172.252.32
deny from 140.117.169.42
deny from 201.54.5.106
deny from 68.109.74.164
deny from 80.156.0.107
deny from 87.97.213.236
deny from 216.213.198.162
deny from 209.191.87.215
deny from 66.36.241.247
deny from 89.179.7.169
deny from 203.191.150.65
deny from 140.115.52.177
deny from 203.146.15.99
deny from 222.240.167.85
deny from 218.94.142.3
deny from 200.252.150.150
deny from 213.139.150.21
deny from 140.115.220.135
deny from 62.85.45.65
deny from 74.200.75.85
deny from 218.170.49.73
deny from 82.243.111.231
deny from 61.59.159.175
deny from 195.23.97.173
deny from 59.106.22.214
deny from 200.2.210.66
deny from 61.166.57.232
deny from 60.166.136.152
deny from 195.2.114.31
deny from 83.16.46.66
deny from 200.183.40.66
deny from 60.166.155.155
deny from 62.85.45.65
deny from 74.200.75.85
deny from 72.44.45.152
deny from 85.10.128.148
deny from 218.170.49.73
deny from 18.94.142.3
deny from 67.207.71.171
deny from 160.99.12.238
deny from 77.238.238.17
deny from 202.120.43.208
deny from 61.59.159.143
deny from 85.10.128.148
deny from 74.222.141.194
deny from 61.59.159.175
deny from 140.115.222.165
deny from 59.106.22.214
deny from 195.23.97.173
# Nigerian/African 419 Scammers IP addresses follow:
deny from 12.166.96.32/27 41.189.32.0/19 41.202.0.0/17 41.202.128.0/19 41.202.192.0/19 41.203.96.0/19 41.203.224.0/20 41.204.0.0/17 41.204.128.0/18 41.204.224.0/19 41.205.0.0/19 41.205.160.0/19 41.207.0.0/19 41.207.160.0/19 41.207.192.0/19 41.208.48.0/23 41.208.128.0/18 41.210.0.0/18 41.211.0.0/19 41.211.192.0/18 41.214.0.0/17 41.215.160.0/20 41.217.0.0/17 41.219.128.0/17 41.220.0.0/16 41.221.160.0/20 41.222.24.0/21 41.222.40.0/21 41.222.64.0/21 41.223.24.0/22 41.223.64.0/22 41.223.248.0/22 41.248.0.0/16 41.250.0.0/16 61.11.230.112/29 62.56.128.0/17 62.56.235.0/24 62.56.236.0/24 62.56.244.0/22 62.56.248.0/24 62.128.160.0/20 62.173.32.0/19 62.192.128.0/19 62.192.140.250 62.193.160.0/19 63.70.178.0/24 63.73.58.0/24 63.100.193.0/24 63.103.138.0/24 63.103.139.64/26 63.103.140.0/22 63.109.245.168/29 63.109.247.0/24 63.109.248.128/25 63.122.154.0/24 64.14.48.128/26 62.24.96.0/19 64.86.155.0/24 64.86.210.0/23 64.110.30.0/24 64.110.31.0/24 64.110.64.16/28 64.110.76.0/23 64.110.81.0/24 64.110.93.16/28 64.110.93.176/28 64.110.147.0/24 64.201.33.0/24 65.209.91.0/24 65.209.92.0/24 66.18.64.0/19 66.110.31.0/24 66.178.0.0/17 66.199.241.82 66.205.20.0/24
deny from 77.70.128.0/24 77.70.129.0/26 77.70.137.0/25 77.70.138.0/23 77.73.184.0/21 77.220.0.0/20 78.138.2.0/24 78.138.32.32/27 80.78.16.168/29 80.78.16.176/28 80.78.16.192/28 80.78.17.0/24 80.78.18.88/29 80.78.18.96/27 80.78.18.128/29 80.78.19.16/29 80.78.19.104/29 80.78.19.112/28 80.78.23.16/28 80.87.64.0/19 80.88.128.0/20 80.88.129.0/24 80.88.130.0/24 80.88.131.0/24 80.88.132.0/26 80.88.132.64/27 80.88.132.104/29 80.88.132.128/26 80.88.132.192/27 80.88.132.224/28 80.88.132.240/29 80.88.133.0/25 80.88.134.0/26 80.88.134.64/29 80.88.135.0/24 80.88.136.0/24 80.88.137.0/24 80.88.138.0/25 80.88.138.128/26 80.88.138.192/27 80.88.139.0/25 80.88.139.128/26 80.88.139.192/27 80.88.139.224/28 80.88.140.0/24 80.88.141.0/25 80.88.141.128/27 80.88.142.0/24 80.88.143.128/24 80.88.144.0/23 80.88.146.0/24 80.88.147.0/24 80.88.148.0/24 80.88.149.0/25 80.88.149.128/26 80.88.149.192/28 80.88.150.0/24 80.88.151.0/24 80.88.152.0/24 80.88.153.0/24 80.88.154.32/27 80.88.154.72/29 80.88.154.80/29 80.88.154.96/28 80.88.155.0/25 80.88.155.128/27 80.88.155.160/29 80.89.176.0/24
deny from 80.179.102.0/24 80.179.107.64/27 80.179.107.224/29 80.179.128.0/17 80.231.4.0/23 80.240.192.0/20 80.247.136.0/24 80.247.137.0/24 80.247.141.32/27 80.247.141.64/26 80.247.141.128/25 80.247.142.0/24 80.247.147.16/28 80.247.147.32/29 80.247.147.64/27 80.247.147.96/28 80.247.151.0/24 80.247.153.0/24 80.247.156.0/26 80.247.156.128/28 80.247.157.0/24 80.247.159.0/24 80.248.0.0/20 80.248.64.0/23 80.248.70.0/20 80.248.64.0/20 80.250.32.0/20 80.255.40.48/28 80.255.40.96/29 80.255.40.112/28 80.255.40.128/28 80.255.40.192/28 80.255.40.224/27 80.255.40.240/28 80.255.41.160/28 80.255.43.0/24 80.255.46.0/29 80.255.46.16/28 80.255.46.64/29 80.255.58.160/27 80.255.58.192/26 80.255.59.19 80.255.59.232/29 80.255.59.240/29 80.255.61.0/25 81.18.32.0/20 81.18.40.0/24 81.18.42.0/24 81.23.194.0/27 81.23.194.64/27 81.23.194.128/25 81.23.195.0/24 81.23.196.0/25 81.23.196.128/29 81.23.200.0/21 81.24.0.0/20 81.91.224.0/20 81.199.0.0/16 82.128.0.0/17 82.205.242.0/23 83.137.59.8/29 83.137.61.0/24 83.138.167.40/29 83.229.0.0/17 84.254.188.3 84.254.128.0/18
deny from 155.239.0.0/16 192.116.64.0/18 192.116.128.0/18 192.116.152.0/21 192.118.71.0/24 193.93.96.0/22 193.95.0.0/17 193.110.2.0/23 193.189.0.0/18 193.189.64.0/23 193.189.128.0/24 193.194.64.0/19 193.219.192.0/18 193.220.0.0/16 193.220.26.0/24 193.220.30.0/26 193.220.30.64/27 193.220.31.0/26 193.220.31.64/27 193.220.45.0/25 193.220.47.0/25 193.220.77.0/26 193.220.187.0/26 193.220.187.128/27 195.8.22.0/24 195.10.109.192/26 195.24.192.0/19 195.44.168.0/21 195.44.176.0/21 195.137.13.0/24 195.137.14.0/24 195.166.224.0/19 195.214.240.0/21 195.219.176.0/24 195.225.62.0/23 195.245.108.0/23 196.0.0.0/16 196.1.176.0/20 196.3.60.0/22 196.3.180.0/22 196.20.0.0/19 196.29.96.0/19 196.29.216.0/21 196.29.224.0/20 196.44.96.0/19 196.45.192.0/18 196.128.0.0/10 196.192.0.0/12 196.208.0.0/14 196.220.0.0/19 198.54.0.0/16 204.16.124.0/22 204.118.170.0/24 206.113.97.0/24 208.70.0.0/21 208.78.56.0/21 209.88.163.0/24 209.101.84.0/24 209.159.160.0/20 209.198.240.0/23 209.198.242.16/28 209.198.242.96/29 209.198.242.104/30 209.198.242.108/31 209.198.242.128/27 209.198.246.240/28 212.49.64.0/19 212.60.64.0/19 212.85.192.0/19 212.96.0.0/19 212.100.64.0/19 212.165.128.0/17 212.165.132.64/27 212.165.135.0/24 212.165.140.16/29 212.165.140.64/26 212.165.140.128/25 212.165.141.0/24 212.165.147.0/26 212.165.147.128/26 212.165.183.0/24 212.199.108.0/24 212.199.251.0/24 212.247.93.0/24
deny from 213.136.96.0/19 213.140.62.0/23 213.150.192.0/23 213.154.64.0/19 213.166.160.0/19 213.181.64.0/19 213.185.96.0/21 213.185.106.0/24 213.185.112.0/24 213.185.113.0/26 213.185.113.64/27 213.185.113.96/27 213.185.118.160/27 213.185.118.192/26 213.185.124.0/24 213.187.135.0/24 213.187.145.0/24 213.211.128.0/18 213.211.188.0/24 213.232.96.0/24 213.255.193.0/24 213.255.194.0/24 213.255.195.0/24 213.255.198.0/24 213.255.199.0/24 216.72.104.0/21 216.74.187.0/24 216.118.252.0/24 216.118.253.0/24 216.118.254.0/24 216.129.147.128/28 216.129.159.0/24 216.133.174.0/24 216.139.160.0/19 216.147.132.144/28 216.147.132.160/28 216.147.134.0/24 216.147.159.0/24 216.185.79.0/24 216.236.200.96/28 216.236.202.96/28 216.236.205.0/24 216.236.222.128/26 216.250.195.0/27 216.250.195.64/26 216.250.221.0/24 216.250.222.0/24 216.252.176.0/24 216.252.177.0/24 216.252.231.0/25 216.252.245.0/24 217.10.163.128/26 217.10.163.192/27 217.10.163.224/27 217.10.166.0/26 217.10.166.64/28 217.10.169.0/24 217.10.170.0/24 217.10.171.0/24 217.10.173.0/26 217.10.182.0/27 217.10.184.0/24 217.14.80.0/20 217.15.124.0/25 217.20.240.0/20 217.20.241.0/25 217.20.241.128/29 217.20.241.136/29 217.20.241.144/28 217.20.241.160/29 217.20.241.168/29 217.20.241.176/29 217.20.241.184/29 217.20.241.192/29 217.20.241.200/29 217.20.241.208/29 217.20.242.0/24 217.20.243.16/28 217.20.243.32/27 217.21.64.0/19 217.78.64.0/20 217.117.0.0/20 217.146.3.144/28 217.146.3.160/28 217.146.3.176/29 217.146.3.224/27 217.146.4.64/26 217.146.5.0/24 217.146.6.0/25 217.146.6.160/27 217.146.7.0/24 217.146.8.0/25 217.146.9.0/24 217.146.10.128/25 217.146.11.0/25 217.146.12.0/24 217.146.13.0/24 217.146.14.0/25 217.146.15.0/25 217.146.16.0/27 217.146.16.32/29 217.168.112.0/20 217.194.140.0/22 217.194.144.0/20 217.199.144.0/20 217.212.242.0/23
# Pretoria Z.A. Used by some lottery scammers. Block these CIDRs if you get scammers from Pretoria, but no legit visitors!
deny from 41.241.0.0/16 41.242.0.0/16 41.243.0.0/16 41.246.0.0/16
# Johannesburg Telekom, ZA.
deny from 165.146.0.0/18
# Algeria
deny from 41.200.0.0/15 193.194.64.0/19
# Added Goldenlines.net.il (Israel) because of Open Proxies used by Nigerian scammers
deny from 80.179.244.0/24
# Amsterdam, The Netherlands Versatel Nederland DSL-NAT Customers - Lottery and 419 scammers
deny from 62.59.36.0/22 62.59.40.0/21 62.59.48.0/22 82.93. 82.168.0.0/14 87.249.104.0/23
# Freenet in Germany (freenet.de); Used as spam relay by many Nigerian scammers, in March, 2008.
# Choose one of the following CIDRs:
# Narrow freenet.de CIDR, used by recent scammers:
deny from 195.4.92.0/23
# Full Freenet.de CIDR:
deny from 195.4.0.0/16
# ISPs in Spain, France and Italy, used by many expatriot Nigerian lottery and 419 scammers (Cableuropa, Ibercom, Ono.com, Telefonica)
deny from 62.42.0.0/16 80.25.0.0/16 80.36.0.0/14 81.34.0.0/16 81.202.0.0/15 82.194.64.0/19 84.120.0.0/13 85.39.0.0/16 85.91.64.0/19 88.14.0.0/16 88.202.124.0/27 89.141.0.0/17 147.83.0.0/16 147.96.0.0/16 193.252.22.0/24 195.53.0.0/16 212.121.224.0/19 213.4.0.0/16 213.194.128.0/18 213.194.144.0/20
# 193.252.22.0/24 = orange.fr, in Paris, France. Constant 419 scams coming from their email servers!
# Costa Rica exceptions:
allow from 196.40.0.0/18 196.40.64.0/19
# Newest Nigerian/African ISP additions/subtractions below:
# Jan 23, 2009: Removed 80.255.59.0/24 and replaced it with 80.255.59.232/29 and 80.255.59.240/29 to finetune block to just Nigeria
# Jan 26, 2009: Added 41.205.0.0/19 in Cameroon, used by Nigerian 419 scammers against a dating forum
# Feb 1, 2009: Added 41.208.48.0/24 in South Africa, after repetitive 419 scams
# Mar 8, 2009: Added 41.215.160.0/20 in Ghana for 419 scams
# Mar 11, 2009: Added 78.138.32.32/27 ipmath.com and SkyVision, in Nigeria
# Mar 26, 2009: Added 41.221.160.0/20 Swift Network in Nigeria
# Mar 26, 2009: Expanded CIDR 41.208.48.0/24 to 41.208.48.0/23, after tracing 419 scam email
# Mar 31, 2009: Added 41.202.192.0/19 in Cameroon, for 419 scamming
# Apr 8, 2009: Added 147.96.0.0/16 in Spain, due to 419 lottery scams
# Apr 11, 2009: Added 81.202.0.0/15 in Spain, for spamming
# End Nigerian/African blocklist
# Add other blocked domain names or IP addresses here, starting with "deny from " without quotes
# If you find that you need to poke a hole in the blocklist, for legitimate visitors, follow this example: allow from 123.456.789.0
# Real life example: Some forums have legitimate DSL customers in Mauritius, which is blocked by 196.0.0.0/9, in my blocklist.
# To allow 8192 of these folks in Mauritius into your forums, just add the following directive:
allow from 196.27.64.0/19
# Add "allow from" IP addresses, or CIDR Ranges, after all of the "deny from" items, just before the closing Files tag.
# Everything not included within these deny from ranges is PERMITTED by the allow portion of the directive.

# This prevents web browsers or spiders from seeing your .htaccess directives:
# End of file

# BEGIN WPSuperCache

RewriteEngine On
RewriteBase /
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP_USER_AGENT} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP_USER_AGENT} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]

# END WPSuperCache

# BEGIN WordPress

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

# END WordPress

4.Add a php opcode cacheeAccelerator and xCache are two popular systems. You need to have a good working knowledge of .ssh terminal commands in Linux and must have root access to your server to effectively utilize php optimization and opcode caching. This will help with your blogs ability to perform server-side php functions by creating a stored cache.

5.Make your Permalinks Pretty – SEF canonical urls are a no-brainer yet a lot of blogger still don”t get it. I”m always surprised to find major corporate sites that have sloppy link structure.

6.Make your code Valid XHTML and CSS, consolidating Javascript and CSS into two files – This can be laborious, but it is essential. I am a big fan of semantic tableless CSS. However from what I have read and heard it seems that Googlebot and most other bots don’t really have a problem indexing tables.

7.Write compelling content with solid back links and make sure to ping! - This is not really an optimization technique. It”s more or less a pre-requisite. RSS snippets that leave your readers wanting more is important. Check out Searchengine Land’s 25 Tips To Optimize Your Blog For Readers and Search Engines for more.

8.Deactivate unused plugins – There are several plugins I used every so often for maintenance purposes, but that don’t serve an everyday purpose such as WP-DB Manager, DB Optimize, and Wp-Maintenance (to launch a quick maintenance splash page.)

9.Add rel=no follow to all sites you display in you link directory that have a page rank of 5 or less – This might be considered controversial, but to keep up with the big boys you have to pay careful consideration to who you back link to and why. Back links should fall into a related genre to what the mission your blog desires to achieve. Blogroll links need to also be site related.

10.Marry Facebook and Twitter on your blog – I encourage integrating the Facebook Connect API so users can login with their encrypted Facebook account and add a follow me on Twitter link either in your sidebar or at the bottom of your post page. Including the Sociable social bookmarking plugin by Joost de Valk is also a suggestion. It”s important to create meaningful footprints. If you provide relevant information that readers appreciate they will want to talk about it, share it, and thank you for it. It”s pretty simple. Of course shamelessly self promoting your blog on Facebook and Twitter is a must! That is if you believe in what you write…

I would like to thank askapache, Joost de Valk, and everyone else that contributes to making WordPress a better and more reliable blogging platform. Their knowledge has helped me become better at what I do.

By Dustin at

In Blogging, SEO, Technology, Tutorials, View Comments

  • Dustin
    Thank you Ventego. I appreciate the compliment. Come back any time and if there is something you would like me to write about please let me know.
  • Ventego
    I really like your blog and i respect your work. I'll be a frequent visitor.
Feedback