<?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>The Theme Foundry &#187; Tutorials</title>
	<atom:link href="http://thethemefoundry.com/blog/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://thethemefoundry.com/blog</link>
	<description>Handcrafted WordPress themes &#38; professional support</description>
	<lastBuildDate>Mon, 19 Jul 2010 21:59:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Titan 1.26 released</title>
		<link>http://thethemefoundry.com/blog/titan-1-26-released/</link>
		<comments>http://thethemefoundry.com/blog/titan-1-26-released/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 21:13:41 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Titan]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/blog/?p=1777</guid>
		<description><![CDATA[Titan 1.26 has been released and includes our new logo uploader as well as WordPress 3.0 menu support! Head over to the downloads page to grab your copy. Titan PRO child theme updated to version 1.25 The Titan PRO child theme has been upgraded to version 1.25. If you have customized your PRO child theme [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="Titan" src="http://thethemefoundry.com/blog/wp-content/uploads/titan.png" class="aligncenter" /> </p>
<p>Titan 1.26 has been released and includes our new logo uploader as well as WordPress 3.0 menu support! Head over to the <a href="http://thethemefoundry.com/downloads/">downloads page</a> to grab your copy.</p>
<h3>Titan PRO child theme updated to version 1.25</h3>
<p>The Titan PRO child theme has been upgraded to version 1.25.  If you have customized your PRO child theme please read through the <a href="/tutorials/#basics-upgradingpro">upgrade instructions</a>. If you plan on using the diff file, please note the vast majority of the changes have been made in the <code>/functions</code> folder. I would recommend replacing that folder entirely with the new version and using the diff file to make the rest of your changes.</p>
<p><a href="http://thethemefoundry.com/downloads/diff/titanpro125_diff.txt">Titan PRO child theme 1.25 diff file</a></p>
<p><span id="more-1777"></span></p>
<h3>Titan 1.25 Changelog</h3>
<ul>
<li><em>New PRO Feature:</em> Added an easy to use logo uploader!</li>
<li><em>New PRO Feature:</em> WordPress 3.0 menu support!</li>
<li><em>Bug Fix:</em> Fixed various translation strings.</li>
<li><em>Bug Fix:</em> Replaced several deprecated functions and options.</li>
<li><em>Miscellaneous:</em> Code cleanup changes.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/titan-1-26-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OC WordCamp theme workshop video</title>
		<link>http://thethemefoundry.com/blog/theme-workshop-video/</link>
		<comments>http://thethemefoundry.com/blog/theme-workshop-video/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 05:46:22 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/blog/?p=1703</guid>
		<description><![CDATA[Download the slides &#8594; I presented a theme customization workshop at WordCamp Orange County earlier this year. The workshop covered 6 theme customization &#8220;best practices&#8221;. Unfortunately, the video is a bit stretched and not completely clear at times, but it still should be helpful if you are new to theme customization. New video library coming [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/blog/wp-content/uploads/theme-workshop.pdf">Download the slides &rarr;</a></p>
<p>I presented a theme customization workshop at WordCamp Orange County earlier this year. The workshop covered 6 theme customization &#8220;best practices&#8221;. Unfortunately, the video is a bit stretched and not completely clear at times, but it still should be helpful if you are new to theme customization. </p>
<p><span id="more-1703"></span></p>
<p><embed src="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.21" type="application/x-shockwave-flash" width="640" height="360" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=rQ3V4cpx&amp;width=640&amp;height=360&amp;locksize=no&amp;dynamicseek=true&amp;hd=true"></embed></p>
<h3>New video library coming soon!</h3>
<p>I am currently working on a video tutorial library for our members. The new library will include screencasts detailing some of these best practices and how to use them effectively with our themes. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/theme-workshop-video/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How-to: Lifestream with WordPress</title>
		<link>http://thethemefoundry.com/blog/lifestream-microblog-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/lifestream-microblog-wordpress/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 16:45:38 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[lifestreaming]]></category>
		<category><![CDATA[microblogging]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jestro.com/?p=466</guid>
		<description><![CDATA[Are you looking to implement a lifestreaming / microblogging solution for WordPress that makes it easy to share links to interesting content along with regular blog posts? Why lifestreaming? Lifestreaming fosters a more direct, personal, and valuable relationship with your readers by making your blog more open and &#8220;real&#8221;. Your blog is your mothership and [...]]]></description>
			<content:encoded><![CDATA[<p>Are you looking to implement a <a href="http://en.wikipedia.org/wiki/Lifestreaming">lifestreaming</a> / <a href="http://en.wikipedia.org/wiki/Microblogging">microblogging</a> solution for WordPress that makes it easy to share links to interesting content along with regular blog posts?</p>
<p><span id="more-466"></span></p>
<h3>Why lifestreaming?</h3>
<p>Lifestreaming fosters a more direct, personal, and valuable relationship with your readers by making your blog more open and &#8220;real&#8221;. <a href="http://webworkerdaily.com/2009/08/22/your-blog-is-your-mothership/">Your blog is your mothership</a> and microblogging is a great way to keep your mothership unique and fresh.</p>
<h3>Can I do it with WordPress?</h3>
<p>I took a look around and there are a few plugins that provide this functionality along with a theme or two that have it built in. If you like the themes that offer this functionality then by all means go grab one of those and get microblogging! When it comes to plugins I am a big believer in home-rolling your own solution if it isn&#8217;t too hard. This has three distinct and important advantages over using a plugin:</p>
<ul>
<li><strong>Speed:</strong> Your blog uses fewer resources, staying light and quick.</li>
<li><strong>Future-proof and reliable:</strong> Fewer moving parts, less likely to break.</li>
<li><strong>Worry Free:</strong> Avoid worrying about unsupported/outdated plugins.</li>
</ul>
<p>As you can see, I think a custom solution is the clearly the best way to go. Let&#8217;s learn how to set up our lifestream inside a basic WordPress theme sans plugins.</p>
<h3>What we need</h3>
<p>The first step is to determine what new types of posts you want to include in your lifestream: photos, links, quotes, etc.  For this example we are going to use links but you can replicate this same functionality in any of the above categories.</p>
<p>Here are the two important pieces we need implement to get up and running:</p>
<ul>
<li><strong>Post Setup</strong>: Create a publish a post for our new links category.</li>
<li><strong>Presentation Layer</strong>: Present readers with a unique view of posts in our special links category.</li>
</ul>
<h3>Post Setup</h3>
<p>Below are the quick and easy steps for creating your new post:</p>
<ol>
<li>Log in to your WordPress admin panel and create a new post.</li>
<li>Add a new category called <strong>links</strong> and make sure the box is checked for that category. </li>
<li>Add a new custom field to the post by scrolling down to the <em>Custom Fields</em> section of the post editor. For the <em>Name</em> use <strong>link</strong> and for the <em>Value</em> type a test URL.</li>
</ol>
<p>Now your post is ready, go ahead and publish it. If you were following these steps for something else, like quotes or photos, name your category and custom field appropriately (eg. quotes or photos).</p>
<h3>Presentation Layer</h3>
<p>For the presentation layer we need to focus on two template files: index.php  and single.php. Open up your theme&#8217;s index.php template file and look for the loop.</p>
<pre class="prettyprint"><code>&#60;?php if (have_posts()) : ?&#62;
&#60;?php while (have_posts()) : the_post(); ?&#62;
  &#60;div &#60;?php post_class() ?&#62; id="post-&#60;?php the_ID(); ?&#62;"&#62;
    &#60;h2&#62;&#60;a href="&#60;?php the_permalink() ?&#62;" rel="bookmark" title="Permanent Link to &#60;?php the_title_attribute(); ?&#62;"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;&#60;/h2&#62;
    &#60;small&#62;&#60;?php the_time('F jS, Y') ?&#62; &#60;!-- by &#60;?php the_author() ?&#62; --&#62;&#60;/small&#62;
    &#60;div class="entry"&#62;
      &#60;?php the_content('Read the rest of this entry &raquo;'); ?&#62;
    &#60;/div&#62;
    &#60;p class="postmetadata"&#62;&#60;?php the_tags('Tags: ', ', ', '&#60;br /&#62;'); ?&#62; Posted in &#60;?php the_category(', ') ?&#62; | &#60;?php edit_post_link('Edit', '', ' | '); ?&#62;  &#60;?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?&#62;&#60;/p&#62;
  &#60;/div&#62;
&#60;?php endwhile; ?&#62;
</code></pre>
<p>We need to tell WordPress to display our <strong>links</strong> category posts differently on our homepage. We also want to style the post title differently to indicate it is a link, not a regular blog post.  Let&#8217;s do just that by replacing line 4 (which displays the post title) with this:</p>
<pre class="prettyprint"><code>&#60;?php if ( in_category( 'links' )) : ?&#62;
  &#60;div class="link"&#62;Link&#60;/div&#62;
  &#60;h4&#62;&#60;a href="&#60;?php echo get_post_meta($post-&#62;ID, 'link', true); ?&#62;" rel="bookmark"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;&#60;span&#62;&#60;a href="&#60;?php the_permalink() ?&#62;" rel="bookmark" title="Permanent Link to &#60;?php the_title_attribute(); ?&#62;"&#62;#&#60;/a&#62;&#60;/span&#62;&#60;/h4&#62;
&#60;?php else : ?&#62;
  &#60;h2&#62;&#60;a href="&#60;?php the_permalink() ?&#62;" rel="bookmark" title="Permanent Link to &#60;?php the_title_attribute(); ?&#62;"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;&#60;/h2&#62;
&#60;?php endif; ?&#62;</code></pre>
<p>Below is a line-by-line breakdown of the code we just inserted.</p>
<ol>
<li>If we are in the category named links.</li>
<li>Output a basic div containing the word &#8220;link&#8221; that we can style later. This is to notify readers that this post is a link and not a regular blog post.</li>
<li>Output the link we specified in the Custom Fields section of our post and a hash (#) linking to our original post. The title of our post now links to the external link instead of the blog post itself.</li>
<li>If we are not in the category named links use this code instead.</li>
<li>Output the normal post title wrapped in a link to the original post.</li>
<li>End the If statement.</li>
</ol>
<p>We need to repeat the same process for the single.php template.</p>
<pre class="prettyprint"><code>&lt;?php if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;
  &lt;h1&gt;&lt;?php the_title()?&gt;&lt;/h1&gt;
  &lt;p&gt;&lt;?php the_tags('Tags for this entry: ', ', ', '.'); ?&gt;&lt;/p&gt;
  &lt;div id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class(); ?&gt;&gt;
    &lt;div class="entry single"&gt;
      &lt;?php the_content(); ?&gt;
    &lt;/div&gt;
    &lt;p class="postmetadata"&gt;This entry was posted by &lt;?php the_author() ?&gt; at &lt;?php the_time('g:i a') ?&gt; on &lt;?php the_time('F jS, Y') ?&gt;.&lt;/p&gt;
  &lt;/div&gt;
&lt;?php endwhile; ?&gt;
&lt;?php comments_template('', true); ?&gt;
&lt;?php else : ?&gt;
&lt;?php endif; ?&gt;</code></pre>
<p>Let&#8217;s replace the post tags (line 4) with a message to visit the external link.</p>
<pre class="prettyprint"><code>&lt;?php if ( in_category( 'links' )) : ?&gt;
  &lt;p&gt;Visit this link:&lt;br /&gt;&lt;a href="&lt;?php echo get_post_meta($post-&gt;ID, 'link', true); ?&gt;" rel="bookmark"&gt;&lt;?php echo get_post_meta($post-&gt;ID, 'link', true); ?&gt;&lt;/a&gt;
&lt;?php else : ?&gt;
  &lt;p&gt;&lt;?php the_tags('Tags for this entry: ', ', ', '.'); ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;</code></pre>
<p>The code we just inserted will display the external link when we are in the <strong>links</strong> category and the tags for the post when we are not.</p>
<h3>Ready to rock!</h3>
<p>Now use your finely tuned CSS skills to get everything looking great and you are ready to rock!</p>
<p><strong>Bonus Tip:</strong> WordPress provides <a href="http://codex.wordpress.org/WordPress_Feeds#Categories_and_Tags">category specific feeds</a> out of the box, so why not use them? Your readers will have the option to pick and choose what part of your lifestream they want to follow.</p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/lifestream-microblog-wordpress/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Optimize Apache for WordPress</title>
		<link>http://thethemefoundry.com/blog/optimize-apache-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/optimize-apache-wordpress/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 01:15:51 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.jestro.com/?p=164</guid>
		<description><![CDATA[If you made the decision to move your WordPress install from shared hosting to a shiny new VPS you should consider optimizing Apache by making some tweaks to your httpd.conf file. Apache is a fast, reliable, and flexible server but is heavy on resources by default. If you are running a small VPS, and using [...]]]></description>
			<content:encoded><![CDATA[<p>If you made the decision to move your WordPress install from shared hosting to a shiny new VPS you should consider optimizing <a href="http://httpd.apache.org/">Apache</a> by making some tweaks to your <a href="http://httpd.apache.org/docs/1.3/configuring.html">httpd.conf</a> file. Apache is a fast, reliable, and flexible server but is heavy on resources by default. If you are running a small VPS, and using it just for WordPress, you can make some small tweaks to your configuration and get some significant performance gains. </p>
<p><span id="more-164"></span></p>
<h3>Trim Down Those Modules</h3>
<p>Open up the <code>httpd.conf</code> file on your server in your favorite text editor and look for a bunch of lines starting with <code>LoadModule</code>. It should look something like this:</p>
<pre class="prettyprint"><code># Example:
# LoadModule foo_module modules/mod_foo.so
# LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so</code></pre>
<p>The actual list will be much longer but you get the idea. You can disable these modules by &#8220;commenting them out&#8221;. Which essentially amounts to adding a <code>#</code> in front of the line like so:</p>
<pre class="prettyprint"><code># LoadModule auth_basic_module modules/mod_auth_basic.so</code></pre>
<p>You are going to disable a bunch of these modules that a basic WordPress website does not require. In fact, I want you to comment out every module <strong>EXCEPT FOR</strong> the following:</p>
<pre class="prettyprint"><code>LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so</code>
</pre>
<p>One of the lines you probably commented out was this one:</p>
<pre class="prettyprint"><code>LoadModule negotiation_module modules/mod_negotiation.so</code></pre>
<p>This provides some functions for auto-completing mistyped URL&#8217;s  that you don&#8217;t really need. It also is required if you are serving multilingual pages. If that is the case then <strong>DO NOT</strong> comment out the above module.</p>
<p>If you did in fact comment out the <code>mod_negotiation.so</code> module you will need to make a couple more tweaks. Find these two lines (they are in different locations) and comment them out:</p>
<pre class="prettyprint"><code>LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW</code></pre>
<pre class="prettyprint"><code>ForceLanguagePriority Prefer Fallback</code></pre>
<p>You should see a significant performance boost after disabling those modules. They were eating up a good size chunk of your limited system resources.</p>
<h3>Apache MPM Prefork Module</h3>
<p>Another handy tweak is to make some adjustments to the <a href="http://httpd.apache.org/docs/2.0/mod/prefork.html">Apache MPM prefork module</a>. This is assuming you are using Apache in prefork mode, which is highly recommended and likely if you are on a small VPS.</p>
<p>This module controls the number of processes and spare processes Apache will start and run. This is especially important if you are running a small VPS that is handling MySQL and Apache. Unless you are getting slammed with really heavy traffic on a regular basis (in which case you should be on a dedicated server) there is no need to be running the default configuration.  Find these lines in your <code>httpd.conf</code> file:</p>
<pre class="prettyprint"><code>&#60;IfModule prefork.c&#62;
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
&#60;/IfModule&#62;</code></pre>
<p><a href="http://httpd.apache.org/docs/2.0/mod/prefork.html#minspareservers">MinSpareservers</a> and <a href="http://httpd.apache.org/docs/2.0/mod/prefork.html#maxspareservers">MaxSpareServers</a> control the number of spare processes your webserver is permitted to run and <a href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#startservers">StartServers</a> controls how many are started by default.</p>
<p><a href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#serverlimit">ServerLimit</a> controls the maximum configured value for <a href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxclients">MaxClients</a>.  Reducing MaxClients on a webserver that is serving dynamic content (e.g. WordPress) can make a big difference. If you experience a traffic spike on your VPS and your MaxClients is set too high your server will more than likely get stuck in an endless loop of swapping pages from physical memory to virtual memory, commonly referred to as <a href="http://en.wikipedia.org/wiki/Thrash_(computer_science)">thrashing</a>. The accepted way of calculating an appropriate MaxClients value is dividing your total available system memory by the size per Apache process. For example,  if you had a 500MB left for Apache to use and each Apache process was using around 10MB you would set your MaxClients to (512-12) / 10 = 50. To check real time memory usage on your VPS <a href="http://articles.slicehost.com/2007/9/7/system-monitoring-with-top">use top</a>.</p>
<p><a href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a> limits the number of requests a child server will handle during it&#8217;s life. We can safely reduce this value and realize a small gain.</p>
<p>So let&#8217;s go ahead and pare down those values:</p>
<pre class="prettyprint"><code>&#60;IfModule prefork.c&#62;
StartServers       3
MinSpareServers    3
MaxSpareServers   10
ServerLimit      50
MaxClients       50
MaxRequestsPerChild  2000
&#60;/IfModule&#62;</code></pre>
<p>Remember these are not concrete &#8220;best&#8221; values, they depend on the size of your VPS and how small or large you Apache process is.</p>
<h3>Optimize Your KeepAlive</h3>
<p><a href="http://httpd.apache.org/docs/2.2/mod/core.html#keepalive">KeepAlive</a> allows your visitors to issue multiple requests over the same TCP connection, in theory this helps improve latency because your visitors can request your webpage, images, and javascripts all over one connection. Unfortunately, Apache must use a worker process to service each and every request. The worker process stays busy servicing each request for a full 15 seconds by default, even if your visitor is no longer using it! This means you have less worker processes available on your system at any given time. With the limited system resources you have on your small VPS we always want open worker processes to be <strong>actually working</strong>. One way of accomplishing this is turning off <code>KeepAlive</code>. Find this line in your <code>httpd.conf</code> file:</p>
<pre class="prettyprint"><code>KeepAlive On</code></pre>
<p>and change it to:</p>
<pre class="prettyprint"><code>KeepAlive Off</code></pre>
<p>If you have a site with lots of images and javascripts it is usually better leave <code>KeepAlive</code> <strong>turned on</strong> and make some additional tweaks.</p>
<p>If you decide to leave <code>KeepAlive</code> <strong>turned on</strong> it is important you change the default <a href="http://httpd.apache.org/docs/2.0/mod/core.html#keepalivetimeout">KeepAliveTimeout</a> value. This prevents unused connections from staying open for excessive amounts of time. Find this line in your <code>httpd.conf</code> file:</p>
<pre class="prettyprint"><code>KeepAliveTimeout 15</code></pre>
<p>You want to leave this connection open for 2 seconds, just long enough for the client to request most if not all of the necessary files. So change that line to:</p>
<pre class="prettyprint"><code>KeepAliveTimeout 2</code></pre>
<p>If you are going to leave <code>KeepAlive</code> on you will want to increase <a href="http://httpd.apache.org/docs/2.0/mod/core.html#maxkeepaliverequests">MaxKeepAliveRequests</a>. Setting this higher allows more requests per connection and increases efficiency. Find this line:</p>
<pre class="prettyprint"><code>MaxKeepAliveRequests 100</code></pre>
<p>and change it to:</p>
<pre class="prettyprint"><code>MaxKeepAliveRequests 200</code></pre>
<h3>Adjust Timeout</h3>
<p>Another minor tweak that will give you a small performance boost as well as help reduce the effects of a DOS attack is changing the <a href="http://httpd.apache.org/docs/2.2/mod/core.html#timeout">TimeOut Directive</a>. This directive tells Apache how many seconds to wait while receiving an incoming request, processing it, and sending back a response. Find this line:</p>
<pre class="prettyprint"><code>Timeout 120</code></pre>
<p>and change it to:</p>
<pre class="prettyprint"><code>Timeout 40</code></pre>
<h3>Restart Apache and Enjoy!</h3>
<p>Now restart Apache and enjoy your performance boost! Always remember to backup your <code>httpd.conf</code> file in case something goes wrong. Keep in mind this is just a sample configuration and we aren&#8217;t responsible if it breaks something on your server.</p>
<h3>Additional Resources</h3>
<ul class="star-list">
<li><a href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-2.html?ca=dgr-lnxw01LAMPTuningP2">Tuning Lamp Systems, Part 2: Optimizing Apache and PHP</a></li>
<li><a href="http://httpd.apache.org/docs/1.3/misc/perf-tuning.html">Apache Performance Notes</a></li>
<li><a href="http://www.perlcode.org/tutorials/apache/tuning.html">Apache Performance Tuning</a></li>
<li><a href="http://www.serverwatch.com/tutorials/article.php/3436911">Optimizing Apache Server Performance</a></li>
<li><a href="http://www.xs4all.nl/~thomas/apachecon/PerformanceTuning.html">Performance-tuning Apache</a></li>
<li><a href="http://perl.apache.org/docs/1.0/guide/performance.html#Choosing_MaxClients">Choosing MaxClients</a></li>
<li><a href="http://2bits.com/articles/tuning-the-apache-maxclients-parameter.html">Tuning the Apache MaxClients parameter</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/optimize-apache-wordpress/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Easy Upgrading With Child Themes</title>
		<link>http://thethemefoundry.com/blog/easy-upgrading-wordpress-child-themes/</link>
		<comments>http://thethemefoundry.com/blog/easy-upgrading-wordpress-child-themes/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 02:06:17 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Vigilance]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[upgrading]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://themes.jestro.com/vigilance/?p=386</guid>
		<description><![CDATA[A quick tutorial on using WordPress &#8220;Child Themes&#8221; to upgrade Vigilance while maintaining your custom CSS, adding custom functions, and eventually adding custom templates (WordPress 2.7) adding custom templates. Important: You will need Vigilance 1.1 or later for the child theme to work correctly. If you are running an older version of Vigilance, upgrade now. [...]]]></description>
			<content:encoded><![CDATA[<p>A quick tutorial on using WordPress &#8220;Child Themes&#8221; to upgrade Vigilance while maintaining your custom CSS, adding custom functions, and <del datetime="2009-09-18T06:08:13+00:00">eventually adding custom templates (WordPress 2.7)</del> adding custom templates.</p>
<p><span id="more-386"></span></p>
<p><strong>Important:</strong> You will need Vigilance 1.1 or later for the child theme to work correctly. If you are running an older version of Vigilance, <a href="http://themes.jestro.com/vigilance/download/">upgrade now</a>.</p>
<h2>Step 1: Download</h2>
<p>Download this basic child theme for Vigilance:</p>
<p><a href='http://themes.jestro.com/blog/wp-content/uploads/my_vigilance.zip'>Vigilance Child Theme</a></p>
<h2>Step 2: Unzip and Upload</h2>
<p>Unzip and upload this theme into your <code>wp-content/themes</code> directory just as you would any other theme.</p>
<p><strong>Note:</strong> The theme must be in it&#8217;s own directory, just like any other theme, e.g. <code>themes/my_vigilance</code></p>
<div id="attachment_389" class="wp-caption alignright" style="width: 150px"><img src="http://themes.jestro.com/blog/wp-content/uploads/vigilance-childtheme.png" alt="Activate the Child Theme" title="Vigilance Child Theme" width="140" height="130" class="size-full wp-image-389" /><p class="wp-caption-text">Activate the Child Theme</p></div>
<h2>Step 3: Activate</h2>
<p>Log in to your WordPress installation and click <em>Appearance</em> then <em>Themes</em>. Find the child theme, it will look like the image on the right. Click on the theme and activate it.</p>
<h2>Step 4: Customize</h2>
<p>You can now make all of your custom CSS changes from within the child theme. Simply edit the <code>style.css</code> file. You can find it in your <code>/themes/myvigilance</code> folder. You can also add custom functions and template files. These changes will work as long as you have the child theme activated.</p>
<h2>How It Works</h2>
<p>Your new child theme inherits all of the templates and styles from the parent theme (Vigilance in this case), <strong>but</strong> any styles added in the <code>style.css</code> file in the child theme&#8217;s folder will <strong>override</strong> any default theme styles. You may also include custom <a href="http://codex.wordpress.org/Function_Reference">functions</a> by adding them to  the included <code>functions.php</code> file. <del datetime="2009-09-18T06:08:13+00:00">When <a href="http://codex.wordpress.org/Version_2.7">WordPress 2.7</a> is released you will be able to use custom templates in your child theme. </del>. You can now use custom templates in your child theme.</p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/easy-upgrading-wordpress-child-themes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Recent posts in your WordPress sidebar</title>
		<link>http://thethemefoundry.com/blog/recent-posts-sidebar-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/recent-posts-sidebar-wordpress/#comments</comments>
		<pubDate>Sat, 31 May 2008 16:00:27 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.jestro.com/?p=56</guid>
		<description><![CDATA[While developing for WordPress you sometimes need to create a &#8220;non-widgetized&#8221; custom sidebar. You would also like to have a list of your most recent posts in that custom sidebar. Unfortunately, WordPress doesn&#8217;t have a &#8220;recent posts&#8221; template tag. Here is a simple, easy to implement PHP file you can use to generate a list [...]]]></description>
			<content:encoded><![CDATA[<p>While developing for WordPress you sometimes need to create a &#8220;non-widgetized&#8221; custom sidebar. You would also like to have a list of your most recent posts in that custom sidebar. Unfortunately, WordPress doesn&#8217;t have a &#8220;recent posts&#8221; <a href="http://codex.wordpress.org/Template_Tags">template tag</a>.</p>
<p>Here is a simple, easy to implement PHP file you can use to generate a list of recent posts in your custom &#8220;non-widgetized&#8221; sidebar. </p>
<p><span id="more-56"></span></p>
<p>Download this file: <a href="/blog/wp-content/uploads/recent_posts.zip">recent_posts.php</a>. Now, upload it to the wp-content/themes/yourtheme directory, and insert the following code in your <code>sidebar.php</code> file where you want your recent posts list to appear:</p>
<p><code>&lt;?php include (TEMPLATEPATH . "/recent_posts.php"); ?&gt;</code></p>
<p>If you open up <code>recent_posts.php</code> in your favorite text editor you have the ability to change how many posts you want to display. You can also be more specific in what posts you want to display by passing different arguments to <a href="http://codex.wordpress.org/Template_Tags/query_posts">query_posts</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/recent-posts-sidebar-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert a local WordPress XAMPP installation into a live site</title>
		<link>http://thethemefoundry.com/blog/xampp-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/xampp-wordpress/#comments</comments>
		<pubDate>Tue, 17 Jul 2007 22:44:11 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://www.jestro.com/uncategorized/convert-local-wordpress-xampp-installation-into-live-site/</guid>
		<description><![CDATA[I recently found this quick and easy tutorial on installing XAMPP Lite locally on Windows XP. This provides a great environment for testing and developing WordPress websites from your PC. The next logical step is converting this nice local installation into a live site as quickly and easily as possible. I found some excellent instructions [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found this <a href="http://geeksaresexy.blogspot.com/2006/06/installing-wordpress-locally-under.html">quick and easy tutorial</a> on installing <a href="http://www.apachefriends.org/en/xampp-windows.html">XAMPP Lite</a> locally on Windows XP. This provides a great environment for testing and developing WordPress websites from your PC. The next logical step is converting this nice local installation into a live site as quickly and easily as possible. I found some excellent instructions from <a href="http://www.tamba2.org.uk/wordpress/">The Tamba2 WordPress Guides</a>. These guides contain almost all the information used in this tutorial. I really just combined a bunch of the provided information to accomplish this specific task. I put all the instructions together here in a quick, and (hopefully) easy to follow tutorial. Let&#8217;s get started. </p>
<p><span id="more-25"></span></p>
<h3>Export Your Database</h3>
<p><img src="/blog/wp-content/uploads/save-as-file.png" alt="Make sure you check the save as file box." title="Save As File" width="200" height="150" class="alignright border size-full wp-image-70" />First, we need to export your local XAMPP MySQL database. While XAMPP is running, navigate to <code>http://localhost/phpMyAdmin/</code>. Next, click on the database name you want to export in the menu on the left. Your database tables should be displayed and you should see some tabs running across the top. Click the <strong>export tab</strong> at the top.</p>
<p>Make sure you <strong>check the &#8220;save as file&#8221; box</strong> and then <strong>click the go button</strong> in the lower right. This will create an .sql file for us to import later. Remember where it is saved.</p>
<h3>The Import</h3>
<ol>
<li>Log in to your hosting account or your webserver and create a new MySQL database for WordPress, call it whatever you want.</li>
<li>Once you have created your new database, find PHPMyAdmin, and open it.</li>
<li>Click the name of the database you just created from the dropdown menu.</li>
<li>At the top of the screen it should say &#8220;Server: your_server(probably localhost)   Database: your_database_name&#8221;</li>
<li><strong>Click the Import Tab.</strong></li>
<li>Now click the Browse Button and browse to the location where you saved your *.sql file in the first part of the tutorial.</li>
<li><strong>Click Go at the bottom.</strong></li>
<li>You should get a message at the top stating: &#8220;Import has been successfully finished, XXX queries executed.&#8221;</li>
</ol>
<p><em><strong>Important:</strong> If you are importing an extremely large database, over 5MB, you may suffer from a timeout and failed import. If this is the case you need to manually upload your data in parts. See <a href="http://www.tamba2.org.uk/wordpress/restore/">Podz detailed instructions for restoring</a> if you are having this problem</em></p>
<h3>A couple quick changes</h3>
<p>Now we need to make a couple quick changes to the database. Click on the <strong>Structure tab</strong> at the top and then click the little picture in the wp-options row as seen below.</p>
<p><img src="/blog/wp-content/uploads/wp_options.png" alt="Click the options table" title="Click the options table" width="200" height="150" class="size-full aligncenter wp-image-76" /></p>
<p>You should now see a list with a column showing all of the option_name values: siteurl, blogname, blogdescription, etc. You need to change two of them. The first is the very first option, <strong>siteurl</strong>. Click the little pen button on the left side of the <strong>siteurl</strong> table row. It is directly to the left of the big red X. You should now see something similar to this:</p>
<p><img src="/blog/wp-content/uploads/siteurl.png" alt="Siteurl Option" title="Siteurl Option" width="400" height="300" class="size-full aligncenter wp-image-86" /></p>
<p>Type your new blog URL in the big text box. <strong>Important:</strong> Make sure you do not add a forward slash <code>/ </code> at the end of the URL.</p>
<p><strong>Click Go.</strong></p>
<p>Your <strong>siteurl</strong> row should now display your new blog URL instead of localhost or whatever IP address it was showing before.</p>
<p>Now you <strong>must repeat</strong> this same exact operation on a different option row with the option_name of <strong>home</strong>. You may have to use the pagination to view the second page of option rows to find it. It is option_id #39 on a normal WordPress install.</p>
<p>Your new database is now ready to go, exit PHPMyAdmin.</p>
<h3>Edit, Upload, and Go!</h3>
<p>Browse to your local WordPress installation.</p>
<p>Open up your <code>wp-config.php</code> file and input the MySQL details (username, password, etc.) of the new database you created in the previous step.</p>
<p>Save and close <code>wp-config.php</code>.</p>
<p>Upload the <strong>ENTIRE</strong> contents of your local WordPress folder to the new location on your webserver. This new location <del datetime="2006-07-17T21:33:41+00:00">should</del> <strong>must</strong> be the same one you used in the first part of this tutorial when changing the <strong>siteurl</strong> and <strong>home</strong> values in phpMyAdmin. This is important. If the locations are different, it will not work.</p>
<p>Your done, navigate to your new &#8220;live&#8221; WordPress powered website and enjoy.</p>
<p><em><strong>Note:</strong> If you want to continue using your local installation you can keep your updated <code>wp_config.php</code> file and add the following lines of code to your local version of the file(this will override the two option values we changed earlier in phpMyAdmin):</em></p>
<pre class="prettyprint"><code>//*Set Path
define('WP_HOME', 'http://localhost' );
define('WP_SITEURL', 'http://localhost');</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/xampp-wordpress/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Convert HTML to WordPress</title>
		<link>http://thethemefoundry.com/blog/html-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/html-wordpress/#comments</comments>
		<pubDate>Tue, 09 May 2006 00:44:45 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.jestro.com/uncategorized/convert-xhtml-css-to-wordpress/</guid>
		<description><![CDATA[When I first decided to convert a static HTML design to WordPress I did some searching for a tutorial to help me get started with the basics. Surprisingly, I didn&#8217;t find anything that was very complete or easy to follow. For that reason I decided to write a very basic tutorial on how to convert [...]]]></description>
			<content:encoded><![CDATA[<p>When I first decided to convert a static HTML design to WordPress I did some searching for a tutorial to help me get started with the basics. Surprisingly, I didn&#8217;t find anything that was very complete or easy to follow. For that reason I decided to write a very basic tutorial on how to convert a static XHTML/CSS template into a <a href="http://codex.wordpress.org/Theme_Development">WordPress Theme</a>. If you are an absolute beginner at developing WordPress themes then this should help you get started. This tutorial assumes you already have a basic understanding of HTML and CSS. It also assumes you have already built a website in XHTML and CSS and have it ready for conversion. Don&#8217;t worry about XHTML vs. HTML, it doesn&#8217;t matter for this tutorial.</p>
<p><span id="more-22"></span></p>
<h3>How WordPress Works</h3>
<p>WordPress works in a rather straightforward manner but it may seem confusing if you are completely new to the concept. WordPress relies on PHP to <strong>call on</strong> different parts of your content from the <a href="http://en.wikipedia.org/wiki/DBMS">database management system</a> it stands on. For example, look in your <code>/wp-content/themes/default/</code> directory and open the <code>header.php</code> file. As you scroll through the code notice the PHP calls, they start with a <code>&lt;?php</code> and end with a <code>?&gt;</code>. Look at line 15 and notice the call for your stylesheet URL:</p>
<pre class="prettyprint"><code>&lt;link rel="stylesheet" href="&lt;?php bloginfo('stylesheet_url'); ?&gt;" type="text/css" media="screen" /&gt;</code></pre>
<p>This line uses PHP to look-up your stylesheet&#8217;s location from the database. This basic function of <strong>retrieving</strong> or <strong>calling</strong> some kind of data from your database and using PHP to display it in your XHTML is how WordPress works. Throughout this process you will be <strong>substituting</strong> PHP for different parts of your content and your code. This will make editing easier in the long run, as you will find out. Now that you understand the basics of how WordPress works, lets get started.</p>
<h3>First Things First</h3>
<p>The first step is to create a new folder and name it whatever you want your theme to be called. Next, create two new files, <code>style.css</code> and <code>index.php</code> and place them in the folder. Believe it or not, these are the only two files you actually need for a WordPress theme. Now copy and paste the code from your original CSS file into the <code>style.css</code> file you just created. At the top add the following code:</p>
<pre class="prettyprint"><code>/*
Theme Name: Replace with your Theme's name.
Theme URI: Your Theme's URI
Description: A brief description.
Version: 1.0
Author: You
Author URI: Your website address.
*/</code></pre>
<p>These comments simply help WordPress properly identify the theme. Your stylesheet is now ready to go.</p>
<h3>Chop It Up</h3>
<p>Now let&#8217;s start chopping up your XHTML. Remember how we talked about WordPress using PHP to call data from your database? Well WordPress can also use PHP to call different files from within your template folder. Imagine your current XHTML code chopped up into 4 (or more) different sections. For example, take a look at the layout and corresponding XHTML of this page. The header comes first, followed by the sidebar, then the content, and finally the footer. Instead of keeping these 4 parts of the XHTML together in one file, you are going to put each of them in their own separate file. Then call on them one by one using PHP.</p>
<p>So go ahead and sort through your XHTML code and place some markers in the 4 places where you plan on cutting the code into 4 separate sections.</p>
<p><em><strong>Note:</strong> These next steps assume you have your page set up left to right: header, content, sidebar, footer. If your page is ordered differently you will have to switch a couple of these steps around, but I am sure you can figure that out.</em></p>
<p>Now create 3 new files (<code>header.php</code>, <code>sidebar.php</code>, <code>footer.php</code>) and place them in your theme directory. Next take a look at the <code>header.php</code> file from the default theme we looked at earlier.  Notice all the PHP that is used in between the <code>&lt;head&gt;</code> tags. You will want to keep most of this code. First, remove lines 18 &#8211; 29 and copy the rest of the <code>&lt;head&gt;</code> section into your new <code>header.php</code> file. Now open up your original XHTML file and copy the code you marked off for your header (1st section) into your new <code>header.php</code> file (underneath the <code>&lt;head&gt;</code> section). Save and close.</p>
<p>Now open up your new <code>index.php</code> file. Copy the second part of your original XHTML code, the content (2nd section) into your new <code>index.php</code> file. Save and close.</p>
<p>Getting the hang of it?</p>
<p>Next open up your new <code>sidebar.php</code> file, copy the sidebar (3rd section) of your original code into the <code>sidebar.php</code> file. Finally, copy the original footer (4th section) of code into your new <code>footer.php</code> file.</p>
<h3>Put It Back Together</h3>
<p>Your original code should now be chopped up into 4 different files (<code>header.php, index.php, sidebar.php, footer.php</code>). Let&#8217;s put it back together using a few lines of PHP. Open up your <code>index.php</code> file, it should contain the XHTML from the content (2nd section) of your original code.  Add this line at the very top of the file:</p>
<pre class="prettyprint"><code>&lt;?php get_header(); ?&gt;</code></pre>
<p>Now go to the absolute bottom of your <code>index.php</code> file and add these two lines:</p>
<pre class="prettyprint"><code>&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;</code></pre>
<p>These 3 simple lines of PHP are telling WordPress to fetch and display your <code>header.php</code>, <code>sidebar.php</code>, and <code>footer.php</code> files within your <code>index.php</code> file. <strong>Your code is now officially put back together.</strong> Now, if you want to edit your sidebar you can just edit your <code>sidebar.php</code> file, instead of sorting through your <code>index.php</code> to find it. The same goes for your <code>header.php</code> and your <code>footer.php</code>.</p>
<h3>The Loop</h3>
<p>Your <code>index.php</code> is almost finished. The final step is to insert the actual content into the code. Luckily, WordPress uses PHP for this as well. <a href="http://codex.wordpress.org/The_Loop">The Loop</a> is the PHP function WordPress uses to call and display your posts from the database they are saved in. Look in your <code>/wp-content/themes/default/</code> directory and open the file <code>index.php</code> file.  Copy everything in between <code>&lt;?php get_header(); ?&gt;</code> and <code>&lt;?php get_sidebar(); ?&gt;</code> to your clipboard. Now paste it into your new theme&#8217;s <code>index.php</code> file inside of whichever <code>div</code> you are using to hold your content. You just inserted a basic version of the loop into your code. WordPress will use the loop to display your posts and comments on your website.</p>
<h3>The End</h3>
<p>Now upload your theme folder to <code>/wp-content/themes/</code>. Then log into WordPress and activate your theme. Wasn&#8217;t that easy?</p>
<p>This tutorial covered the basics for converting your theme to WordPress. To further customize and enhance your theme start looking at the <a href="http://codex.wordpress.org/Main_Page">WordPress Codex</a>, specifically <a href="http://codex.wordpress.org/Template_Tags">Template Tags</a> and <a href="http://codex.wordpress.org/Templates">Template Files</a>. You can use template tags in your sidebar, in your header, or your footer to call menus, categories, posts, etc. As you learn more about template tags and template files you will discover the endless possibilities for customizing your new WordPress blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/html-wordpress/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
	</channel>
</rss>
