<?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>Chris K Designs &#187; WordPress</title>
	<atom:link href="http://www.chriskdesigns.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chriskdesigns.com</link>
	<description>WordPress tips, hacks, and plugins.</description>
	<lastBuildDate>Thu, 09 Sep 2010 06:06:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<!-- google_ad_section_end --><!-- google_ad_section_start -->	<item>
		<title>Using x.co with Twitter Tools in WordPress</title>
		<link>http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/</link>
		<comments>http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 05:52:59 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[Updates]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[GoDaddy]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=724</guid>
		<description><![CDATA[So the other day GoDaddy.com released it&#8217;s new URL shortener x.co. They&#8217;ve also built in an API, so from that, we can now use the Twitter Tools WordPress plugin with the x.co URL Shortener. I&#8217;ve hacked together a file based off the Twitter Tools bit.ly plugin that works in conjunction with the main Twitter Tools [...]]]></description>
			<content:encoded><![CDATA[<p>So the other day GoDaddy.com released it&#8217;s new URL shortener x.co. They&#8217;ve also built in an API, so from that, we can now use the Twitter Tools WordPress plugin with the x.co URL Shortener. I&#8217;ve hacked together a file based off the Twitter Tools bit.ly plugin that works in conjunction with the main Twitter Tools plugin without any issues that I&#8217;ve noticed so far. For now you need to do the following:</p>
<ol>
<li>An account with <a href="http://www.x.co" target="_blank">x.co</a> (which is the same as a GoDaddy.com account)</li>
<li>Install <a href="http://wordpress.org/extend/plugins/twitter-tools/" target="_blank">Twitter Tools for WordPress</a></li>
<li>Download <a href="http://www.chriskdesigns.com/projects/twitter-tools-xco.zip" target="_blank">this .zip</a> file and extract it into wp-content/plugins/</li>
<li>Activate the Twitter Tools &#8211; x.co URLs plugin from your plugins list</li>
<li>Login to your x.co account and click on the &#8216;Settings&#8217; tab, copy down your API Key.</li>
<li>From the &#8216;Settings&#8217; menu select &#8216;Twitter Tools&#8217; and you will need to enter your X.co API Key.</li>
<li>That&#8217;s it, you are ready to tweet your posts with x.co shortened URLs!</li>
</ol>
<p>If you have any feedback let me know and I&#8217;d be glad to see what I can do to help you out. I will try and get this up on WordPress.org within the next day or two for installation directly in your WordPress admin area.</p>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Using+x.co+with+Twitter+Tools+in+WordPress+-+http://b2l.me/aqfr9f&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/&amp;t=Using+x.co+with+Twitter+Tools+in+WordPress" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/&amp;title=Using+x.co+with+Twitter+Tools+in+WordPress&amp;selection=So%20the%20other%20day%20GoDaddy.com%20released%20it%27s%20new%20URL%20shortener%20x.co.%20They%27ve%20also%20built%20in%20an%20API%2C%20so%20from%20that%2C%20we%20can%20now%20use%20the%20Twitter%20Tools%20WordPress%20plugin%20with%20the%20x.co%20URL%20Shortener.%20I%27ve%20hacked%20together%20a%20file%20based%20off%20the%20Twitter%20Tools%20bit.ly%20plugin%20that%20works%20in%20conjunction%20with%20the%20main%20" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/&amp;title=Using+x.co+with+Twitter+Tools+in+WordPress" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/&amp;title=Using+x.co+with+Twitter+Tools+in+WordPress" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/&amp;title=Using+x.co+with+Twitter+Tools+in+WordPress" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/&amp;title=Using+x.co+with+Twitter+Tools+in+WordPress" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/using-x-co-with-twitter-tools-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Plugin: Better AdSense Targeting</title>
		<link>http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/</link>
		<comments>http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 13:17:56 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[Updates]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=718</guid>
		<description><![CDATA[Today I&#8217;m releasing the initial version of a new plugin called &#8216;Better AdSense Targeting&#8217;. If you have ever noticed AdSense ads that come up for things totally unrelated to your content? Yeah, that happened to me too. A little secret is that Google has some comments you can put in your site to either use [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m releasing the initial version of a new plugin called &#8216;Better AdSense Targeting&#8217;. If you have ever noticed AdSense ads that come up for things totally unrelated to your content? Yeah, that happened to me too. A little secret is that Google has some comments you can put in your site to either use or ignore sections of your page when determine what ads to display. This plugin takes all the work out of that for you and allows you to choose which sections to use.</p>
<p>Check it out at the <a href="http://chriskdesigns.com/better-adsense-targeting">Better AdSense Targeting</a> page. Let me know what you think in the comments.<br />
<center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=New+Plugin%3A+Better+AdSense+Targeting+-+http://b2l.me/apspeb&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/&amp;t=New+Plugin%3A+Better+AdSense+Targeting" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/&amp;title=New+Plugin%3A+Better+AdSense+Targeting&amp;selection=Today%20I%27m%20releasing%20the%20initial%20version%20of%20a%20new%20plugin%20called%20%27Better%20AdSense%20Targeting%27.%20If%20you%20have%20ever%20noticed%20AdSense%20ads%20that%20come%20up%20for%20things%20totally%20unrelated%20to%20your%20content%3F%20Yeah%2C%20that%20happened%20to%20me%20too.%20A%20little%20secret%20is%20that%20Google%20has%20some%20comments%20you%20can%20put%20in%20your%20site%20to%20eithe" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/&amp;title=New+Plugin%3A+Better+AdSense+Targeting" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/&amp;title=New+Plugin%3A+Better+AdSense+Targeting" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/&amp;title=New+Plugin%3A+Better+AdSense+Targeting" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/&amp;title=New+Plugin%3A+Better+AdSense+Targeting" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/new-plugin-better-adsense-targeting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Dev 101: Hooks</title>
		<link>http://www.chriskdesigns.com/wordpress-dev-101-hooks/</link>
		<comments>http://www.chriskdesigns.com/wordpress-dev-101-hooks/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 03:58:09 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress 101]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=670</guid>
		<description><![CDATA[When I first got into WordPress development, I had no idea how the Core of WordPress was designed. I knew that I wanted my snippet of code to fire at a specific time, but short of hacking it into the theme I was using at the time, I had no clue how to achieve this. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-510" title="WordPress Logo" src="http://www.chriskdesigns.com/wp-content/uploads/2010/05/grey-l.png" alt="" width="120" height="120" />When I first got into WordPress development, I had no idea how the Core of WordPress was designed. I knew that I wanted my snippet of code to fire at a specific time, but short of hacking it into the theme I was using at the time, I had no clue how to achieve this. It was then that I discovered the Hooks of WordPress. Think of WordPress&#8217; Hooks as the OnRamp to the rendering of your WordPress based site. Your code will sit dormant until the moment the Hook you have &#8216;Hooked&#8217; fires, then your code will jump in and be executed.<span id="more-670"></span><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<h5>Actions vs. Filters</h5>
<p>There are two types of Hooks used in WordPress, Actions and Filters.<br />
Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more of its PHP functions are executed at these points, using the Action API. These are most commonly used for the bulk of your plugin development.</p>
<p>Filters are the hooks that WordPress launches to modify text of various types before adding it to the database or sending it to the browser screen. Your plugin can specify that one or more of its PHP functions is executed to modify specific types of text at these times, using the Filter API.</p>
<h5>An Example</h5>
<p>Let&#8217;s take an example from my Updated Today Plugin. We&#8217;ll focus on the settings I have included for &#8220;Insert Into:&#8221;. The options are Header or Footer. What these reference is the functions wp_header() and wp_footer. Both are functions that exist in the index.php of your theme (or should exist). When a user selects the option of Footer as recommended, that tells the plugin to execute when wp_footer is run. How does it know when this is run? A Hook is how we know when it&#8217;s run. In the initial setup of the plugin, I tell the function &#8216;ck_wp_footer&#8217; to run when the hook (in this case the footer) &#8216;wp_footer&#8217; is executed.</p>
<p>[php]add_action(&#8216;wp_footer&#8217;, &#8216;ck_wp_footer&#8217;);[/php]</p>
<p>It&#8217;s as easy as that. Want your code to execute when the header is run?</p>
<p>[php]add_action(&#8216;wp_header&#8217;, &#8216;your_function_name&#8217;);[/php]</p>
<p>Keep in mind that some theme developers are now also building or creating their own hooks, so you can further customize your plugin/site to the max. If this isn&#8217;t quite making sense let&#8217;s have some real world experience. Below is a sample plugin for you to copy and paste into a new document named my-first-plugin.php.</p>
<p>[php]<br />
<?php<br />
/*<br />
   Plugin Name: My First Plugin<br />
   Plugin URI: http://www.chriskdesigns.com<br />
   Description: A template for your first plugin<br />
   Version: 0.1<br />
   Author: Chris Klosowski<br />
   Author URI: http://www.chriskdesigns.com<br />
   Copyright: 2010, Chris Klosowski<br />
*/</p>
<p>add_action('wp_head','my_first_plugin_header');</p>
<p>function my_first_plugin_header()<br />
{<br />
?><script type="text/javascript">
alert("I just hooked into the wp_header() function!");
</script><?php<br />
}<br />
?><br />
[/php]</p>
<p>Save it, and upload it into your wp-content/plugins/ folder of your WordPress site (use a development version if you don&#8217;t want this to impact your users). Activate the plugin and then visit your website. When WordPress starts to load the header, it executes the JavaScript alert we made and will wait to proceed until this alert is cleared. In this case it halts the loading of the site on purpose. I wanted you to see where the code executes, which we can identify as nothing on the page has loaded yet. If we were to change this to load in the footer, the entire page would load until the footer, then alert, and finish once you have clicked &#8216;OK&#8217;.</p>
<p>For a complete list of WordPress Hooks you can check out AdamBrown.info who keeps a complete <a href="http://adambrown.info/p/wp_hooks/version/3.0" target="_blank">list of Hooks</a> for quite a few versions of WordPress.</p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=WordPress+Dev+101%3A+Hooks+-+http://b2l.me/ana8w3&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;t=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks&amp;selection=When%20I%20first%20got%20into%20WordPress%20development%2C%20I%20had%20no%20idea%20how%20the%20Core%20of%20WordPress%20was%20designed.%20I%20knew%20that%20I%20wanted%20my%20snippet%20of%20code%20to%20fire%20at%20a%20specific%20time%2C%20but%20short%20of%20hacking%20it%20into%20the%20theme%20I%20was%20using%20at%20the%20time%2C%20I%20had%20no%20clue%20how%20to%20achieve%20this.%20It%20was%20then%20that%20I%20discovered%20the%20" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/wordpress-dev-101-hooks/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/wordpress-dev-101-hooks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change your WordPress domain quickly with Linux, MySQL, and sed</title>
		<link>http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/</link>
		<comments>http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 05:59:43 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=640</guid>
		<description><![CDATA[You have no idea how hard it was to refrain from using the command &#8216;sed&#8217; in a totally ridiculous homophoned title. Have you found yourself wanting to change the domain on an established WordPress installation, or even trying to replicate many times over the same exact WordPress database on a different domain? Yeah, me too. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-652" title="find" src="http://www.chriskdesigns.com/wp-content/uploads/2010/08/find.png" alt="" width="102" height="102" />You have no idea how hard it was to refrain from using the command &#8216;sed&#8217; in a totally ridiculous <a href="http://en.wikipedia.org/wiki/Homophone">homophoned</a> title. Have you found yourself wanting to change the domain on an established WordPress installation, or even trying to replicate many times over the same exact WordPress database on a different domain? Yeah, me too. I&#8217;ve found while doing plug-in development, it helps to have the same database information copied over when I start with a new branch. Luckily, Linux comes to the rescue with the <em>sed</em> command. It&#8217;s a 3 step process. Export your source/current database. Search and replace with <em>sed</em>, and then import the database. Here&#8217;s a step by step for you.<br />
<span id="more-640"></span><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<p class="note">Note: you need to have access to a Linux command prompt and the MySQL database via command line in order to perform this by my steps</p>
<h5>Export&#8230;</h5>
<p>First, we need to make an export of your current database, we&#8217;ll do this with <em>mysqldump</em>:<br />
[text light=true]$ mysqldump -h yourhostnamehere -u YourUserName -pYourPasswordHere YourDatabaseName &gt; dumpfile.sql[/text]<br />
No, I didn&#8217;t forget a space after the -p flag. There is no space between the password flag, and the password itself.</p>
<h5>Search and Replace</h5>
<p>After that completes you should have a file named dumpfile.sql that contains your current database. Now it&#8217;s time to search and replace all references to the previous domain (we&#8217;ll call it domain-one.com) with our new domain (domain-two.com).<br />
[text light=true]$ sed -i &#8216;s/domain-one.com/domain-two.com/g&#8217; dumpfile.sql[/text]<br />
The &#8216;-i&#8217; flag is for <em>inline</em>. I simply replaces domain-one.com with domain-two.com where the command finds it. This means, any database settings or posts referencing the domain itself, will be altered, and therefore work when imported&#8230;.so on to importing.</p>
<h5>Importing the newly modified .sql backup</h5>
<p>[text light=true]$ mysql -h yourhostnamehere -u YourUserName -pYourPasswordHere YourDatabaseName &lt; dumpfile.sql[/text]<br />
This command with the &lt; or less than sign, pushes dumpfile.sql up to the database mentioned.</p>
<p>And there you have it, you just exported, modified, and imported an entire WordPress site including all categories, posts, users, etc&#8230;into a new database for use on a different site. Not so bad was it?</p>
<p>For more information on the <em>sed</em> command you can head over to <a href="http://www.brunolinux.com">brunolinux.com</a> for a <a href="http://www.brunolinux.com/02-The_Terminal/Find_and%20Replace_with_Sed.html">pretty decent sed tutorial</a> and more options.</p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed+-+http://b2l.me/ajteq6&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;t=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed&amp;selection=You%20have%20no%20idea%20how%20hard%20it%20was%20to%20refrain%20from%20using%20the%20command%20%27sed%27%20in%20a%20totally%20ridiculous%20homophoned%20title.%20Have%20you%20found%20yourself%20wanting%20to%20change%20the%20domain%20on%20an%20established%20WordPress%20installation%2C%20or%20even%20trying%20to%20replicate%20many%20times%20over%20the%20same%20exact%20WordPress%20database%20on%20a%20differe" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/&amp;title=Change+your+WordPress+domain+quickly+with+Linux%2C+MySQL%2C+and+sed" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/change-your-wordpress-domain-quickly-with-linux-mysql-and-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Remove the version from WordPress</title>
		<link>http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/</link>
		<comments>http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 15:41:43 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=628</guid>
		<description><![CDATA[Ok, you&#8217;ve read this title and thought, &#8220;Why would I want to remove the version from WordPress&#8230;in fact, what does he even mean!?&#8221;. By default, WordPress (since version 2.5+) includes the version of WordPress you are using in the HTML code of your site, and does not have an option to remove it. If you [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-630 alignright" title="WPLock" src="http://www.chriskdesigns.com/wp-content/uploads/2010/08/WPLock-300x300.png" alt="" width="144" height="144" />Ok, you&#8217;ve read this title and thought, &#8220;Why would I want to remove the version from WordPress&#8230;in fact, what does he even mean!?&#8221;. By default, WordPress (since version 2.5+) includes the version of WordPress you are using in the HTML code of your site, and does not have an option to remove it.</p>
<p>If you view the source code of your site after you&#8217;ve loaded it up in your favorite browser you&#8217;ll see a line like so:</p>
<p>[html]<meta name="generator" content="WordPress 3.0">[/html]<br />
<span id="more-628"></span><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center><br />
This seems harmless right? The first rule of security is to be obscure. This means giving people as little information about your configuration as possible. With the version number, it&#8217;s possible to narrow down possible exploits. In previous versions of WordPress (before 2.5) it was easy to just remove this from the theme&#8217;s header.php file. Well, that&#8217;s not the case anymore. Now it&#8217;s built into the WordPress Core and you have two options to remove it. First is to go into the functions.php file and pass a &#8220;blank&#8221; version by adding the following to the bottom of wp-includes/general-template.php but before the closing PHP tag (?&gt;):</p>
<p>[php]function i_want_no_generators()<br />
{<br />
return &#8221;;<br />
}<br />
add_filter(&#8216;the_generator&#8217;,'i_want_no_generators&#8217;);<br />
[/php]</p>
<p>Apply those changes, and save the file and you no longer have a version number reporting. Have no fear, the version will still report inside of the admin backend.</p>
<p>Alternatively, if you feel you need more security and don&#8217;t want to start messing with the WordPress core than this there is a great plug-in called <a href="http://wordpress.org/extend/plugins/secure-wordpress/">Secure WordPress</a>. This plug-in offers a wide array of security enhancements that include:</p>
<ul>
<li> Removing error-information on login-page</li>
<li> Adds index.php plugin-directory (virtual)</li>
<li> Removing the wp-version, except in admin-area</li>
<li> Removing Really Simple Discovery</li>
<li> Removing Windows Live Writer</li>
<li> Removing core update information for non-admins</li>
<li> Removing plugin-update information for non-admins</li>
<li> Removing theme-update information for non-admins (only WP 2.8 and higher)</li>
<li> Hids wp-version in backend-dashboard for non-admins</li>
<li> Adds string for use WP Scanner</li>
<li> Blocks bad queries</li>
<li> Validates your site with a free malware and vulnerabilities scan with SiteSecurityMonitor.com</li>
</ul>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+To%3A+Remove+the+version+from+WordPress+-+http://b2l.me/ajt9y3&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;t=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress&amp;selection=Ok%2C%20you%27ve%20read%20this%20title%20and%20thought%2C%20%22Why%20would%20I%20want%20to%20remove%20the%20version%20from%20WordPress...in%20fact%2C%20what%20does%20he%20even%20mean%21%3F%22.%20By%20default%2C%20WordPress%20%28since%20version%202.5%2B%29%20includes%20the%20version%20of%20WordPress%20you%20are%20using%20in%20the%20HTML%20code%20of%20your%20site%2C%20and%20does%20not%20have%20an%20option%20to%20remove%20it.%0D%0A%0D%0A" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/&amp;title=How+To%3A+Remove+the+version+from+WordPress" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/how-to-remove-the-version-from-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	<!-- google_ad_section_end --><!-- google_ad_section_start --></channel>
</rss>
