<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tiger Technologies Blog &#187; Useful Tips</title>
	<atom:link href="http://blog.tigertech.net/category/useful-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tigertech.net</link>
	<description>Behind the scenes at tigertech.net</description>
	<lastBuildDate>Tue, 14 May 2013 21:43:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>WordPress 3.0.2 update (and mod_security rule)</title>
		<link>http://blog.tigertech.net/posts/wordpress-3-0-2/</link>
		<comments>http://blog.tigertech.net/posts/wordpress-3-0-2/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 23:02:52 +0000</pubDate>
		<dc:creator>Robert Mathews</dc:creator>
				<category><![CDATA[Tech Corner]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=1644</guid>
		<description><![CDATA[If you use WordPress blog software on your site, be sure to upgrade to WordPress 3.0.2 as soon as possible. The upgrade contains an important security fix for a vulnerability that allows any WordPress &#8220;author&#8221; to become an &#8220;administrator&#8221;. Although all WordPress users should upgrade right away, we&#8217;ve added security rules to our servers to [...]]]></description>
				<content:encoded><![CDATA[<p>If you use WordPress blog software on your site, be sure to upgrade to <a href="http://wordpress.org/news/2010/11/wordpress-3-0-2/">WordPress 3.0.2</a> as soon as possible. The upgrade contains an important security fix for a vulnerability that allows any WordPress &#8220;author&#8221; to become an &#8220;administrator&#8221;.</p>
<p>Although all WordPress users should upgrade right away, we&#8217;ve added security rules to our servers to protect our Web hosting customers who haven&#8217;t yet upgraded. Other people may find the rules useful if they use <a href="http://www.modsecurity.org/">mod_security</a> on Apache Web servers. The rest of this post contains more technical details.</p>
<p><span id="more-1644"></span></p>
<h3>The WordPress bug</h3>
<p>The exact nature of the security flaw is described in <a href="http://blog.sjinks.pro/wordpress/858-information-disclosure-via-sql-injection-attack/">this blog post</a>. Simply put, if an author of a post creates a trackback that contains a single quote character in WordPress 3.0.1 or earlier, they can make WordPress run database commands of their choosing. Those database commands could be used to make the author an administrator, for example.</p>
<p>To block this, we&#8217;ve added a mod_security rule that prevents anyone from creating a trackback URL that includes a single quote character (which is extremely unlikely to occur legitimately):</p>
<p><code>SecRule SCRIPT_BASENAME "^post\.php$" "deny,status:412,auditlog,chain"<br />
SecRule ARGS_POST:trackback_url "'"</code></p>
<p>Again, we&#8217;ve already applied this rule to our servers, so our Web hosting customers are protected. But if you run a server that hosts WordPress blogs, you should consider adding this mod_security rule to protect your users, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/wordpress-3-0-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoiding problems with missing images in WordPress</title>
		<link>http://blog.tigertech.net/posts/wordpress-missing-images/</link>
		<comments>http://blog.tigertech.net/posts/wordpress-missing-images/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 22:02:36 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Tech Corner]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=1321</guid>
		<description><![CDATA[WordPress installations handle missing image files very inefficiently by default, running the entire WordPress script to build a custom &#8220;404 Page Not Found&#8221; page rather than simply letting Apache return an immediate default &#8220;404&#8243; response. Running the WordPress script when not necessary is a huge waste of processor time. For example, WordPress might be able [...]]]></description>
				<content:encoded><![CDATA[<p>WordPress installations handle missing image files very inefficiently by default, running the entire WordPress script to build a custom &#8220;404 Page Not Found&#8221; page rather than simply letting Apache return an immediate default &#8220;404&#8243; response. Running the WordPress script when not necessary is a huge waste of processor time. For example, WordPress might be able to only process 8 requests per second for a missing image when WordPress generates a custom &#8220;404&#8243; page, but Apache can return process over 1,000 raw &#8220;404&#8243; responses per second. If your Web site contains references to missing files, this default WordPress behavior can be driving up your CPU usage unnecessarily. We&#8217;ve seen poorly-configured Web sites spend a significant portion of their CPU time processing missing images.</p>
<p><span id="more-1321"></span></p>
<p>There are many sources of missing image file references. Themes and plugins can generate them. Your site may be missing a <a href="http://support.tigertech.net/favicon">favicon.ico</a> file. Some RSS news readers make a lot of requests for files named apple-touch-icon.png and apple-touch-icon-precomposed.png, which most Web sites do not have. Check your Web site&#8217;s analytics report (such as <a href="http://support.tigertech.net/awstats">AWStats</a>) or raw log files to see what image files are missing from your site.</p>
<p>If you&#8217;re a Tiger Technologies customer running WordPress, you already benefit from a global rule we implemented for missing favicon.ico files (as discussed in <a href="/posts/favicon-files-and-wordpress/">a previous blog post</a>). We&#8217;ve also recently updated our WordPress Performance page with extra tips on returning faster &#8220;404&#8243; results for <a href="http://support.tigertech.net/wordpress-performance#use-real-files-for-jmp">other missing files such as robots.txt</a> and for <a href="http://support.tigertech.net/wordpress-performance#don8217t-run-jmp">all missing images</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/wordpress-missing-images/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Even better performance from WP Super Cache</title>
		<link>http://blog.tigertech.net/posts/even-better-performance-from-wp-super-cache/</link>
		<comments>http://blog.tigertech.net/posts/even-better-performance-from-wp-super-cache/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 04:12:05 +0000</pubDate>
		<dc:creator>Robert Mathews</dc:creator>
				<category><![CDATA[Tech Corner]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WP Super Cache]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=1237</guid>
		<description><![CDATA[In a previous post, we talked about how increasing the WP Super Cache &#8220;Expire time&#8221; from 1 hour to 48 hours can help the performance of WordPress blogs. Here&#8217;s another tip that can help dramatically: Remove &#8220;bot&#8221;, &#8220;ia_archive&#8221;, &#8220;slurp&#8221;, &#8220;crawl&#8221;, &#8220;spider&#8221; and &#8220;Yandex&#8221; from the Rejected User Agents box in the WP Super Cache plugin [...]]]></description>
				<content:encoded><![CDATA[<p>In a <a href="/posts/better-performance-from-wp-super-cache/">previous post</a>, we talked about how increasing the WP Super Cache &#8220;Expire time&#8221; from 1 hour to 48 hours can help the performance of WordPress blogs.</p>
<p>Here&#8217;s another tip that can help dramatically: Remove &#8220;bot&#8221;, &#8220;ia_archive&#8221;, &#8220;slurp&#8221;, &#8220;crawl&#8221;, &#8220;spider&#8221; and &#8220;Yandex&#8221; from the <strong>Rejected User Agents</strong> box in the WP Super Cache plugin settings. (In most cases, this will leave the box completely empty.)</p>
<p><span id="more-1237"></span></p>
<p>Those &#8220;Rejected User Agents&#8221; prevent cached pages from being created when a search engine &#8220;visits&#8221; your site. The FAQ says this is because there&#8217;s no point creating a cached file for a page that isn&#8217;t popular, which may be true for sites that don&#8217;t have many posts and aren&#8217;t that busy. The author of the plugin is wisely being conservative to avoid problems on hosting companies that use &#8220;NFS&#8221; disks where saving a cached file can be slow.</p>
<p>We don&#8217;t use NFS like that, though. And on a busy site with lots of archived posts, there&#8217;s a very good chance that a page that&#8217;s indexed by a search engine will be reindexed or viewed several times within the next couple of days. Allowing these pages to be cached can make a big difference. Besides, there&#8217;s no good reason <i>not</i> to cache a copy of the page, since you should be sending the same page to search engines as you do to actual users.</p>
<p>We removed those &#8220;Rejected User Agents&#8221; on a busy site with several thousand archived posts, with the &#8220;Expire time&#8221; set to 48 hours (172800 seconds) as we recommend, and here&#8217;s what happened to that site&#8217;s CPU usage:</p>
<div style="text-align: center;"><img src="http://www.tigertech.net/images/blog/2010-06-16-cpu-load.png" alt="CPU load after WP Super Cache change" width="620" height="180" /></div>
<p>As you can see, the average load dropped by almost half as more and more pages were cached. That&#8217;s another way of saying that the average page loading speed almost doubled. Those are pretty good results for a change that took just a few seconds to make.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/even-better-performance-from-wp-super-cache/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Protect your WordPress login</title>
		<link>http://blog.tigertech.net/posts/protect-your-wordpress-login/</link>
		<comments>http://blog.tigertech.net/posts/protect-your-wordpress-login/#comments</comments>
		<pubDate>Thu, 27 May 2010 22:39:58 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Industry Observations]]></category>
		<category><![CDATA[Tales From the Support Team]]></category>
		<category><![CDATA[Tech Corner]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=1190</guid>
		<description><![CDATA[Do you login to your WordPress blog securely? Are your username and password encrypted so that &#8220;hackers&#8221; can&#8217;t steal them and then break into your blog? (Probably not!) By default, each WordPress blog is configured to send the login username and password as plain (unencrypted) text. If a hacker can see what you are sending [...]]]></description>
				<content:encoded><![CDATA[<p>Do you login to your <a href="http://support.tigertech.net/wordpress">WordPress</a> blog securely? Are your username and password encrypted so that &#8220;hackers&#8221; can&#8217;t steal them and then break into your blog? (Probably not!)</p>
<p>By default, each WordPress blog is configured to send the login username and password as plain (unencrypted) text. If a hacker can see what you are sending during your login, they can easily steal your username and password. This can happen if you have a virus installed on your computer. It can also happen if your computer is virus-free but connects via WiFi. If your main computer uses a wireless connection, or if you or other users of your blog ever login with their laptops &#8212; blogging from a coffee shop, anyone? &#8212; remember that these connections can be insecure, and could be susceptible to revealing your password.</p>
<p>You can protect your blog by installing an &#8220;SSL certificate&#8221; and configuring WordPress to require secure logins. Your browser will then encrypt your username and password so that no one can intercept them.</p>
<p><span id="more-1190"></span></p>
<p>Traditionally, only online stores used SSL certificates because they were very expensive. But SSL certificate prices have dropped quite a bit recently, and they&#8217;re now low enough that we think SSL certificates should be widely used to protect all logins and other sensitive data.</p>
<p>If you are a Tiger Technologies customer, you can <a href="http://support.tigertech.net/ssl">get an SSL certificate</a> for a great price. (One type of certificate, a &#8220;self-signed certificate&#8221;, is even free if you&#8217;re already on our Gold or Platinum hosting plans.) If you&#8217;re not a Tiger Technologies customer, you can <a href="http://www.google.com/search?q=SSL+certificate">search for companies selling SSL certificates</a> or <a href="http://www.google.com/search?q=free+self-signed+certificate">search for free self-signed certificates</a>.</p>
<h3>Configuring WordPress</h3>
<p>Once you have an SSL certificate installed on your site, it&#8217;s easy to configure WordPress to use secure logins. Simply add this line anywhere to your wp-config.php file (after the opening “&lt;&#63;php” line):</p>
<p><code>define(&#39;FORCE_SSL_ADMIN&#39;, true);</code></p>
<p>This will ensure that your username and password are submitted to WordPress securely; all of your subsequent work (creating posts, etc) will be secure as well. You&#8217;ll see your Web browser&#8217;s &#8220;padlock&#8221; icon when you are using a secure connection. The WordPress &#8220;<a href="http://codex.wordpress.org/Administration_Over_SSL">Administration Over SSL</a>&#8221; page has more details.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/protect-your-wordpress-login/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>WordPress security thoughts</title>
		<link>http://blog.tigertech.net/posts/wordpress-security-thoughts/</link>
		<comments>http://blog.tigertech.net/posts/wordpress-security-thoughts/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 20:42:14 +0000</pubDate>
		<dc:creator>Robert Mathews</dc:creator>
				<category><![CDATA[Tales From the Support Team]]></category>
		<category><![CDATA[Tech Corner]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=1115</guid>
		<description><![CDATA[In the last few days, there&#8217;s been a lot of talk on the Internet about the security of WordPress blog software. Several shared hosting companies apparently allow customers to view the text of other customer&#8217;s files by default, and that allows malicious customers to discover the database password of another site (from the &#8220;wp-config.php&#8221; file) [...]]]></description>
				<content:encoded><![CDATA[<p>In the last few days, there&#8217;s been a <a href="http://www.thetechherald.com/article.php/201015/5493/WordPress-driven-sites-compromised-due-to-permission-settings">lot of talk</a> on the Internet about the security of <a href="http://support.tigertech.net/wordpress">WordPress</a> blog software.</p>
<p>Several shared hosting companies apparently allow customers to view the text of other customer&#8217;s files by default, and that allows malicious customers to discover the database password of another site (from the &#8220;wp-config.php&#8221; file) and alter the site.</p>
<p><span id="more-1115"></span></p>
<p>Some security researchers think this is a WordPress flaw, but we agree with the WordPress folks that <a href="http://wordpress.org/development/2010/04/file-permissions/">that&#8217;s nonsense</a>. The real problem is that these hosting companies are allowing customers to view each other&#8217;s files, which shows a reckless disregard for security.</p>
<p>For the record, this kind of attack is impossible on our servers. We prevent customers from viewing each other&#8217;s files. In particular, we use <a href="http://httpd.apache.org/docs/2.2/suexec.html">suEXEC</a> to run each user&#8217;s scripts under a separate Unix user ID, and we ensure that your files are protected from other users at the file system level.</p>
<p>In fact, we go a step further than even most reasonably secure companies: we protect your files even if you change every possible file and directory to be world-writable (<a href="http://support.tigertech.net/world-writable">mode 777</a>), using an additional layer of Linux &#8220;access control list&#8221; rules on your top-level directories. We also automatically reset the bad directory permissions for you, just to be sure there are always two levels of protection.</p>
<p>So you don&#8217;t need to worry about this kind of attack; &#8220;we&#8217;ve got your back&#8221;.</p>
<h3>A different attack on wp-config.php</h3>
<p>Separately and coincidentally, our security systems detected a different type of attack on a &#8220;wp-config.php&#8221; file today. Some &#8220;hackers&#8221; on the Internet are trying to load files named &#8220;wp-config.php~&#8221; with a tilde character at the end. In most cases, that file won&#8217;t exist, but if you&#8217;ve edited your &#8220;wp-config.php&#8221; file with some text editors, it creates a &#8220;wp-config.php~&#8221; version as a backup copy.</p>
<p>This is an interesting attack. Of course, it&#8217;s not possible to load this file in a Web browser and see the source:</p>
<p><code>http://example.com/wp-config.php</code></p>
<p>However, it <strong>is</strong> possible to see the source of this file if it exists:</p>
<p><code>http://example.com/wp-config.php~</code></p>
<p>That&#8217;s because the server doesn&#8217;t recognize that the &#8220;.php~&#8221; file contains PHP code, so it shows the visitor the contents (source) of the file, with disastrous results because it contains passwords.</p>
<p>We&#8217;ve fixed this potential attack by blocking all requests for filenames ending in &#8220;.php~&#8221; on our servers, since it appears that nobody is using this legitimately.</p>
<p>If you run your own Web servers, this simple <a href="http://www.modsecurity.org/">mod_security</a> rule will do the trick:</p>
<p><code>SecRule REQUEST_FILENAME "\.php~$" "msg:'PHP file backup exploit',deny,status:412,auditlog"</code></p>
<p>(Just so it&#8217;s clear, we&#8217;ve already done this for our customers; that rule is mentioned in the hope that it might be useful to someone else. We also <a href="http://wordpress.org/support/topic/387895">mentioned this issue on the WordPress support forums</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/wordpress-security-thoughts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WP Super Cache and FeedBurner</title>
		<link>http://blog.tigertech.net/posts/wp-super-cache-and-feedburner/</link>
		<comments>http://blog.tigertech.net/posts/wp-super-cache-and-feedburner/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 23:56:15 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Tales From the Support Team]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WP Super Cache]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=980</guid>
		<description><![CDATA[We&#8217;ve got a lot of customers running WordPress, and we definitely recommend running WP Super Cache to improve performance. It can help dramatically! But recently we&#8217;ve seen a number of our customers getting hammered by a ton of requests from FeedBurner. Usually the request is of this form: /somepost?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=SomeCampaignString We&#8217;ve also seen FeedBurner going crazy [...]]]></description>
				<content:encoded><![CDATA[<p>We&#8217;ve got a lot of customers running WordPress, and we definitely <a href="http://support.tigertech.net/wordpress-performance">recommend running WP Super Cache to improve performance</a>. It can help dramatically!</p>
<p>But recently we&#8217;ve seen a number of our customers getting hammered by a ton of requests from FeedBurner. Usually the request is of this form:</p>
<p>/somepost?utm_source=feedburner&#038;utm_medium=feed&#038;utm_campaign=SomeCampaignString</p>
<p>We&#8217;ve also seen FeedBurner going crazy and making thousands of duplicate requests. One of the sites we host has gotten 45,000 simple status requests (HTTP &#8220;HEAD&#8221; requests) from FeedBurner today, for no good reason that we can see.</p>
<p><span id="more-980"></span></p>
<p>Unfortunately, the default rules of WP Super Cache prevent it from caching any request with a query that contains an equal sign. So all of these requests are being unnecessarily run freshly each time, rather than being served from the cache.</p>
<p>There&#8217;s an easy fix to this. Open your Web site&#8217;s .htaccess file. Look for the section of lines for WP Super Cache, and find the line which tests <kbd>%{QUERY_STRING}</kbd>. Insert this new line of text immediately above the existing line:</p>
<p><code>RewriteCond %{QUERY_STRING} ^utm_source=(feedburner|twitterfeed) [OR]</code></p>
<p>The new line (ending with <kbd>[OR]</kbd>) must come before the existing <kbd>%{QUERY_STRING}</kbd> line. After inserting, the two lines should look exactly like this:</p>
<p><code>RewriteCond %{QUERY_STRING} ^utm_source=(feedburner|twitterfeed) [OR]<br />
RewriteCond %{QUERY_STRING} !.*=.*</code></p>
<p>There are four very similar blocks right next to each other in the .htaccess file. Be sure to add the new line to the same place in each block.</p>
<p>That&#8217;s the only change you&#8217;ll have to make! WP Super Cache will now be able to cache requests for normal pages that come from FeedBurner or Twitterfeed. If your Web site was being abused by FeedBurner (or Twitterfeed), you should see a definite improvement.</p>
<p><em style="color: #777;">Update April 2012: Newer versions of the WP Super Cache plugin have four places that need to be changed, rather than two places. We&#8217;ve updated the post to reflect this.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/wp-super-cache-and-feedburner/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Super-fast database writes with INSERT DELAYED</title>
		<link>http://blog.tigertech.net/posts/insert-delayed/</link>
		<comments>http://blog.tigertech.net/posts/insert-delayed/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 00:20:13 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Tech Corner]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=973</guid>
		<description><![CDATA[Many Web sites write data to a database. Usually, the data absolutely must be properly saved, so the default way of adding records (using an SQL &#8220;INSERT&#8221; statement) ensures that the data is permanently stored on the server&#8217;s disks. Doing that takes a relatively long time in computer terms &#8212; it&#8217;s much slower than most [...]]]></description>
				<content:encoded><![CDATA[<p>Many Web sites write data to a database. Usually, the data absolutely must be properly saved, so the default way of adding records (using an SQL &#8220;INSERT&#8221; statement) ensures that the data is permanently stored on the server&#8217;s disks. Doing that takes a relatively long time in computer terms &#8212; it&#8217;s much slower than most things computers do.</p>
<p>In some cases, you might be storing data that&#8217;s not quite so important. And if it means your application can run much faster, you might be willing to risk a very small chance of data loss. That&#8217;s where MySQL&#8217;s &#8220;INSERT DELAYED&#8221; statement, which works with MyISAM table types (but not InnoDB tables), can be useful. (Tables are created as type MyISAM by default, so most tables are eligible to benefit from this tip.)</p>
<p><span id="more-973"></span></p>
<p>Adding the word &#8220;DELAYED&#8221; to your statement tells MySQL to remember the data to be added and return immediately to your application. MySQL will then write the data as soon as the database isn&#8217;t busy. This lets your insertion happen (effectively) immediately, and reduces the load on the database (and server). Using this technique can give your application a huge performance gain.</p>
<p>Since the record is not written immediately, there is a very small chance that the data will be lost before it&#8217;s written to the disk. However, the odds of this happening are very small. It would only happen if MySQL crashed before it had a moment of idle time to write out the record, if the server lost power, or if some similar unexpected event happened.</p>
<p>Using &#8220;INSERT DELAYED&#8221; is recommended for applications that do not absolutely depend upon records being immediately written. Any data which is only referred to at a later time (rather than on-demand) or in a summary fashion is a good candidate for using &#8220;INSERT DELAYED&#8221;. Some examples are logging the IP address of each visitor, or tracking ad impressions for each page viewed on your Web site. Be sure to read the <a href="http://dev.mysql.com/doc/refman/5.0/en/insert-delayed.html">official documentation</a> for full details and additional considerations.</p>
<p>If you want to use &#8220;INSERT DELAYED&#8221;, first check the documentation to see if your application already supports it. If it does not, you&#8217;d need to modify the application. If you have any questions about whether a particular database table is a good candidate for using &#8220;INSERT DELAYED&#8221;, just ask us and we&#8217;ll take a look.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/insert-delayed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better performance from WP Super Cache</title>
		<link>http://blog.tigertech.net/posts/better-performance-from-wp-super-cache/</link>
		<comments>http://blog.tigertech.net/posts/better-performance-from-wp-super-cache/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 18:58:22 +0000</pubDate>
		<dc:creator>Robert Mathews</dc:creator>
				<category><![CDATA[Tech Corner]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WP Super Cache]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=922</guid>
		<description><![CDATA[If you use the WP Super Cache WordPress plugin (and you should, if you use WordPress), it has a settings page section titled &#8220;Expiry Time &#038; Garbage Collection&#8221;. It sets the &#8220;Expire time&#8221; to 3600 seconds by default, and warns that you should set it lower on a busy site. That advice makes sense if [...]]]></description>
				<content:encoded><![CDATA[<p>If you use the <a href="http://support.tigertech.net/wordpress-performance">WP Super Cache</a> WordPress plugin (and you should, if you use WordPress), it has a settings page section titled &#8220;Expiry Time &#038; Garbage Collection&#8221;. It sets the &#8220;Expire time&#8221; to 3600 seconds by default, and warns that you should set it lower on a busy site.</p>
<p>That advice makes sense if you have a sudden surge of traffic to a single page. However, if your site is generally very busy across all pages (for example, if you have an archive of hundreds or thousands of posts that are constantly being indexed by search engines), we&#8217;ve found that you should do the opposite to improve performance: set it much higher. We recommend setting it to <strong>172800 seconds</strong> (which is 48 hours). This can cut your CPU usage in half, which will speed up your site.</p>
<p><span id="more-922"></span></p>
<p>The reason for this is that when WP Super Cache creates a cached page, it wants to make sure that those pages don&#8217;t build up forever. Every ten minutes or so, it looks through them all and deletes any that are older than the &#8220;expire time&#8221;.</p>
<p>On some servers that use a network file system called &#8220;NFS&#8221;, looking through a large number of files causes performance problems. That&#8217;s why the WP Super Cache author recommends making them expire quickly: it reduces the number of files it has to examine each time.</p>
<p>On our servers, we don&#8217;t use NFS and looking through lots of files does not cause a performance problem. Leaving the files for a longer time is safe and increases the chance that a page will already be cached when it&#8217;s needed.</p>
<p>If you&#8217;re a Tiger Technologies customer who makes this change and you want to see how it affects the CPU usage, just let us know and we can provide you with details.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/better-performance-from-wp-super-cache/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>WordPress 2.8.6 security update</title>
		<link>http://blog.tigertech.net/posts/wordpress-2-8-6-security-update/</link>
		<comments>http://blog.tigertech.net/posts/wordpress-2-8-6-security-update/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 21:44:42 +0000</pubDate>
		<dc:creator>Robert Mathews</dc:creator>
				<category><![CDATA[Tech Corner]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=863</guid>
		<description><![CDATA[If you use WordPress blog software on your site, be sure to upgrade to WordPress 2.8.6. The upgrade contains important security fixes. Upgrading is usually easy with the built-in WordPress &#8220;update now&#8221; feature. Although all WordPress users should upgrade, we&#8217;ve added security rules to our servers to protect our Web hosting customers who haven&#8217;t yet [...]]]></description>
				<content:encoded><![CDATA[<p>If you use WordPress blog software on your site, be sure to upgrade to <a href="http://wordpress.org/development/2009/11/wordpress-2-8-6-security-release/">WordPress 2.8.6</a>. The upgrade contains important security fixes. Upgrading is usually easy with the built-in WordPress &#8220;update now&#8221; feature.</p>
<p>Although all WordPress users should upgrade, we&#8217;ve added security rules to our servers to protect our Web hosting customers who haven&#8217;t yet upgraded. Other people may find the rules useful if they use <a href="http://www.modsecurity.org/">mod_security</a> on Apache Web servers. The rest of this post contains more technical details.</p>
<p><span id="more-863"></span></p>
<h3>Surprising Apache script behavior</h3>
<p>One of the fixes in WordPress 2.8.6 compensates for a peculiar and surprising feature (or bug, if you prefer) in the Apache Web server: in many cases, it will run a file with a name like &#8220;image.php.jpeg&#8221; as a PHP script.</p>
<p>Some software (like WordPress 2.8.5 and earlier) can be configured to allow strangers to upload JPEG and other files to your site &#8212; but it checks only the &#8220;.jpeg&#8221; file extension to see if the uploaded file is safe. So a &#8220;hacker&#8221; could upload a malicious PHP script named &#8220;image.php.jpeg&#8221;, then &#8220;view the image&#8221; in a Web browser&#8230; but the server would actually run the PHP script.</p>
<p>Because of that, we&#8217;ve added a mod_security rule that prevents site visitors from requesting certain file extensions that include &#8220;.php.&#8221; in their name. (There are <a href="http://core.trac.wordpress.org/ticket/11122">other possible solutions</a>, but testing has shown this is the least intrusive to our existing customers.)</p>
<p>Here&#8217;s a mod_security rule that accomplishes that (adjust the extensions to suit your taste; these are the WordPress 2.8.5 allowed extensions):</p>
<p><code>SecRule REQUEST_FILENAME "\.php[456]?\.(asf|asx|avi|bmp|gif|ico|jpe|jpeg|jpg|png|tif|tiff|wax|wmv|wmx)$" "deny,status:412,auditlog"</code></p>
<h3>WordPress brute force attacks</h3>
<p>Another recently reported attack against WordPress (which is unrelated to version 2.8.6 in particular) involves &#8220;brute force&#8221; attempts to guess the administrator password. The proper solution is to choose a good password for your blog (not a word from the dictionary!), but some people don&#8217;t do that.</p>
<p>To reduce the risk of successful attacks against our customers, we limit each IP address to 25 &#8220;wp-login.php&#8221; attempts within a five minute period. Here&#8217;s how you can do that with mod_security:</p>
<p><code>SecAction phase:1,initcol:ip=%{REMOTE_ADDR},nolog<br />
SecRule REQUEST_LINE "post .*/wp-login" "nolog,phase:1,setvar:ip.wordpress_login=+1,deprecatevar:ip.wordpress_login=5/60"<br />
SecRule IP:WORDPRESS_LOGIN "@gt 25" "deny,status:412,auditlog,chain"<br />
SecRule REQUEST_LINE "post .*/wp-login"</code></p>
<p>This unfortunately doesn&#8217;t prevent &#8220;distributed&#8221; attacks in which many different IP addresses submit different password guesses, but it will help in many cases.</p>
<h3>Summary</h3>
<p>So: if you use WordPress yourself, be sure to update. And if you provide blog hosting services for others, consider adding the mod_security rules to your Apache server.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/wordpress-2-8-6-security-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress 2.8.4 security update</title>
		<link>http://blog.tigertech.net/posts/wordpress-2-8-4-security-update/</link>
		<comments>http://blog.tigertech.net/posts/wordpress-2-8-4-security-update/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 00:05:31 +0000</pubDate>
		<dc:creator>Robert Mathews</dc:creator>
				<category><![CDATA[Tech Corner]]></category>
		<category><![CDATA[Useful Tips]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.tigertech.net/?p=709</guid>
		<description><![CDATA[If you use WordPress blog software on your site, be sure to upgrade to WordPress 2.8.4 as soon as possible. The upgrade contains important security fixes. Although all WordPress users should upgrade right away, we&#8217;ve added security rules to our servers to protect our Web hosting customers who haven&#8217;t yet upgraded. Other people may find [...]]]></description>
				<content:encoded><![CDATA[<p>If you use WordPress blog software on your site, be sure to upgrade to <a href="http://wordpress.org/development/2009/08/2-8-4-security-release/">WordPress 2.8.4</a> as soon as possible. The upgrade contains important security fixes.</p>
<p>Although all WordPress users should upgrade right away, we&#8217;ve added security rules to our servers to protect our Web hosting customers who haven&#8217;t yet upgraded. Other people may find the rules useful if they use <a href="http://www.modsecurity.org/">mod_security</a> on Apache Web servers. The rest of this post contains more technical details.</p>
<p><span id="more-709"></span></p>
<p>The first thing to be concerned about is the problem fixed in version 2.8.4. Earlier versions allowed strangers to repeatedly reset the administrator&#8217;s password to a random string of text. This doesn&#8217;t allow the stranger to gain access to your blog, but it sure is annoying.</p>
<p>The exploit works because PHP interprets HTTP parameters that end with two square brackets, like this:</p>
<p><code>key[]=</code></p>
<p>&#8230; as an array, and WordPress didn&#8217;t check for that possibility. These mod_security rules block any parameters to wp-login.php that contain square brackets:</p>
<p><code>SecRule REQUEST_FILENAME "/wp-login\.php$" "deny,status:412,auditlog,chain"<br />
SecRule ARGS_NAMES "\["</code></p>
<p>So that will prevent strangers from resetting passwords.</p>
<p>In addition to that, we've discovered something else interesting. Earlier versions of WordPress (all versions before 2.8.3) seem to contain more of a security problem than previously thought.</p>
<p>The release announcements for versions <a href="http://wordpress.org/development/2009/07/wordpress-2-8-1/">2.8.1</a> and <a href="http://wordpress.org/development/2009/08/wordpress-2-8-3-security-release/">2.8.3</a> said "admin pages added by certain plugins could be viewed by unprivileged users, resulting in information being leaked", then "I missed some places when fixing the privilege escalation issues for 2.8.1".</p>
<p>Allowing unprivileged users to see information they shouldn't see is undesirable, but again, it doesn't seem to allow strangers to take over your blog.</p>
<p>Unfortunately, we've found that the bug does actually allow clever unprivileged attackers to change some of the blog settings in version 2.8.2 and earlier. And a really clever attacker can leverage this into a "remote code exploit" by taking advantage of a strange PHP feature called "<a href="http://www.php.net/manual/en/language.types.string.php">Complex (curly) syntax</a>". The blogs of two of our customers were hijacked today by an exploit that does exactly this.</p>
<p>We won't go into full details yet, because it doesn't seem that the vulnerability has been published elsewhere (we've contacted the WordPress folks in case they weren't aware). But we will say that the attack can't succeed unless the server allows people to request "wp-admin" URLs with two consecutive slashes, so the following mod_security rule blocks it:</p>
<p><code>SecRule REQUEST_FILENAME "wp-admin.*//" "deny,status:412,auditlog"</code></p>
<p>So there are several reasons to make sure you've upgraded your own blog to 2.8.4. (The WordPress "automatic upgrade" feature usually makes this easy.) And if you run a server that hosts WordPress blogs, consider adding the two mod_security rules mentioned above to protect your users.</p>
<p><em>Update September 6: The new security problem we mentioned above is  being widely discussed in posts like <a href="http://wordpress.org/development/2009/09/keep-wordpress-secure/">How to Keep WordPress Secure</a> and <a href="http://lorelle.wordpress.com/2009/09/04/old-wordpress-versions-under-attack/">Old WordPress Versions Under Attack</a>. Although our customers have been protected against this particular new attack since August 12, as described above, you should certainly still upgrade your copy of WordPress to protect against other attacks.</em></p>
<p><em>Final update: The technical details of the problem in WordPress 2.8.2 and earlier were that WordPress was not trimming double slashes from paths like <kbd>/wp-admin//options-permalink.php</kbd>, which allowed anyone to load it. In addition, the “options-permalink.php” file was missing the <kbd>if ( !current_user_can('manage_options') )</kbd> check that prevented any registered user from changing the permalink structure by accessing such a URL. So anyone who could register could also change the permalink structure. And a third issue meant that changing the permalink structure to include the bizarre text <kbd>({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)</kbd> caused WordPress to run remote code. The WordPress folks fixed these three bugs <a href="http://core.trac.wordpress.org/changeset/11761/trunk/wp-includes/vars.php">here</a>, <a href="http://core.trac.wordpress.org/changeset/11761/trunk/wp-admin/options-permalink.php">here</a>, and <a href="http://core.trac.wordpress.org/ticket/9602">here</a>, respectively.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tigertech.net/posts/wordpress-2-8-4-security-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.423 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-19 17:36:41 -->
