<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Do It With WordPress</title>
	
	<link>http://www.doitwithwp.com</link>
	<description>Tutorials for building, managing and promoting your WordPress site</description>
	<lastBuildDate>Mon, 06 Feb 2012 15:47:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<cloud domain="www.doitwithwp.com" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/wanderingbrit" /><feedburner:info uri="wanderingbrit" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>wanderingbrit</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Useful Configuration Tweaks for wp-config.php</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/L2i2gm7Mo-c/</link>
		<comments>http://www.doitwithwp.com/useful-configuration-tweaks-for-wp-config-php/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 15:00:48 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[wp-config.php]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=3354</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>There are a whole bunch of special definitions that you can specify in wp-config.php to specify how your WordPress site should operate and these are the most used ones.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/how-to-install-wordpress/' rel='bookmark' title='How to Install WordPress'>How to Install WordPress</a></li>
<li><a href='http://www.doitwithwp.com/move-your-wordpress-site-to-a-new-domain-seamlessly/' rel='bookmark' title='Move Your WordPress Site To A New Domain Seamlessly'>Move Your WordPress Site To A New Domain Seamlessly</a></li>
<li><a href='http://www.doitwithwp.com/wordpress-security-keys-what-why-how/' rel='bookmark' title='WordPress Security Keys – What, Why &amp; How'>WordPress Security Keys – What, Why &#038; How</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>wp-config.php (as you may guess from the name) is a configuration file that allows you to define all the important settings for WordPress. When you first install WordPress, you&#8217;ll upload the default wp-config-sample.php, which you&#8217;ll need to modify and rename. From then on, you can go on editing wp-config.php.</p>
<h3>Keep wp-config.php secure</h3>
<p>There&#8217;s two ways of achieving this &#8211; you can either move the wp-config.php file out of your public_html folder, into your hosting&#8217;s main root folder above public_html. This way, it&#8217;s out of reach to the public. Alternatively, you can use .htaccess to deny access to it. This involves pasting the following into .htaccess:</p>
<pre class="brush: plain; title: ; notranslate">&lt;Files wp-config.php&gt;
 Order Allow,Deny
 Deny from all
&lt;/Files&gt;</pre>
<h3>The important tweaks</h3>
<p>Most of the important setup information that goes in wp-config.php I have covered in other tutorials, so I&#8217;m going to link you to those tutorials in case you haven&#8217;t set those things up yet:</p>
<ul>
<li><a title="How to Install WordPress" href="http://www.doitwithwp.com/how-to-install-wordpress/">How to Install WordPress</a></li>
<li><a title="WordPress Security Keys – What, Why &amp; How" href="http://www.doitwithwp.com/wordpress-security-keys-what-why-how/">WordPress Security Keys &#8211; What, Why &amp; How</a></li>
<li><a title="How To Change Your WordPress Database Prefix" href="http://www.doitwithwp.com/how-to-change-wordpress-database-prefix/">How to Change your WordPress Database Table Prefix</a></li>
<li><a href="http://www.doitwithwp.com/how-to-install-setup-wordpress-multisite-network/" title="How to Install &#038; Setup WordPress Multisite">Enable WordPress Multisite</a></li>
</ul>
<h3>The personalised tweaks</h3>
<p>Beyond the important tweaks above, you have a bunch of other tweaks that are more like personalised options, that will dictate how your site should be run, particularly behind the scenes.</p>
<h4>Set your homepage</h4>
<p>You can override values set in your General Settings by defining the Site URL and the Blog URL in wp-config.php. Use the following definitions:</p>
<pre class="brush: php; title: ; notranslate">define('WP_SITEURL', 'http://example.com/');
define('WP_HOME', 'http://example.com/wordpress');</pre>
<h4>Change Autosave Interval</h4>
<p>By default, WordPress saves your progress every 60 seconds, but you can change that using this definition, where the value is in seconds:</p>
<pre class="brush: php; title: ; notranslate">define('AUTOSAVE_INTERVAL', 240 );</pre>
<h4>Configure Post Revisions</h4>
<p>WordPress allows you to keep the last several copies of a WordPress post, so that if you make a mistake, you can revert to an older version. You can either disable this feature (to reduce your database size) or set the maximum number of versions WordPress should keep:</p>
<pre class="brush: php; title: ; notranslate">define('WP_POST_REVISIONS', 3);
define('WP_POST_REVISIONS', false);</pre>
<h4>Debug mode</h4>
<p>If you&#8217;re experiencing issues with your site, or you&#8217;re developing a plugin or theme, you might find it useful to turn on the debug mode, to highlight any issues. It defaults to false, so you only need to specify it if you want to use it:</p>
<pre class="brush: php; title: ; notranslate">define('WP_DEBUG', true);</pre>
<h4>Increase PHP Memory Limits</h4>
<p>A frequent issue that some WordPress users encounter is that they run out of PHP memory when doing memory intensive tasks. You can define a memory limit for WordPress using the following definition, changing the value to your preferred maximum limit:</p>
<pre class="brush: php; title: ; notranslate">define('WP_MEMORY_LIMIT', '128M');</pre>
<h4>Change the Language WordPress Uses</h4>
<p>Sprechen Sie Deutsch? ¿Hablas español? If English isn&#8217;t your first language, you can set a different language for WordPress to use. Use one of these language codes and define it in wp-config.php:</p>
<pre class="brush: php; title: ; notranslate">define('WPLANG', 'de_DE');</pre>
<p>The .mo file will need to exist in wp-content/languages for this to work. If it&#8217;s somewhere else, you can define the folder that the language file is in:</p>
<pre class="brush: php; title: ; notranslate">define('WP_LANG_DIR', $_SERVER['DOCUMENT_ROOT'].'wordpress/languages');</pre>
<h4>Override default permissions</h4>
<p>If your host is setting your file permissions too restrictive, or you just need to change them from the WordPress default, you can define what they should be for files and directories with these definitions (these are the recommended settings by the way):</p>
<pre class="brush: php; title: ; notranslate">define('FS_CHMOD_DIR', (0755 &amp; ~ umask()));
define('FS_CHMOD_FILE', (0644 &amp; ~ umask()));</pre>
<h4>Specify FTP and SSH information</h4>
<p>Depending on your host&#8217;s setup, WordPress may ask you for FTP information whenever you try and update/upload something. or you may just prefer to use SSH instead of FTP. So you can use all of the following definitions to define, in order:</p>
<ol>
<li>FileSystem Method &#8211; either direct, ssh2, ftpext or ftpsockets</li>
<li>FTP Base &#8211; where your WordPress installation is located</li>
<li>Content Directory &#8211; set the location of your wp-content folder</li>
<li>Plugin Directory &#8211; set the location of your plugins folder</li>
<li>Public Key &#8211; the location of your SSH public key</li>
<li>Private Key &#8211; the location of your SSH private key</li>
<li>FTP User &#8211; the FTP or SSH username</li>
<li>FTP Pass &#8211; the password associated with the FTP User (not needed for SSH public key authentication)</li>
<li>FTP Host &#8211; the host and port of your FTP/SSH server (FTP port defaults to 21 and SSH to 22 if not specified)</li>
<li>FTP SSL &#8211; use SFTP, if supported by your server</li>
</ol>
<pre class="brush: php; title: ; notranslate">define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/path/to/wordpress/installation/');
define('FTP_CONTENT_DIR', '/path/to/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/wp-content/plugins/');
define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub');
define('FTP_PRIKEY', '/home/username/.ssh/id_rsa');
define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', 'ftp.example.org:21');
define('FTP_SSL', false);</pre>
<h4>Take the Trash Out</h4>
<p>By default, WordPress permanently deletes any post marked as trash after 30 days, but you can specify the number of days it should wait before doing this. Alternatively, you can disable the trash feature, by setting the duration to 0.</p>
<pre class="brush: php; title: ; notranslate">define('EMPTY_TRASH_DAYS', 60 );</pre>
<h4>Allow Database Repairs</h4>
<p>WordPress has a built-in feature that enables automatic database repair in case the database gets corrupted. If you encounter problems with your database, try setting this definition:</p>
<pre class="brush: php; title: ; notranslate">define('WP_ALLOW_REPAIR', true);</pre>
<h4>Limit Plugin/Theme edits and installations</h4>
<p>If you want to remove the ability for users to install or edit themes or plugins, you can use the following definitions to take care of that. The first will disable the editors, but still allow installations and updates of themes/plugins, whereas the second definition will disable all of these functions:</p>
<pre class="brush: php; title: ; notranslate">define('DISALLOW_FILE_EDIT',true);
define('DISALLOW_FILE_MODS',true);</pre>
<p>There&#8217;s a few more definitions that you can set, but they&#8217;re much more obscure and chances are that you won&#8217;t need them. Have you tricked out your wp-config.php file now? And perhaps more importantly, have you secured it?</p>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/how-to-install-wordpress/' rel='bookmark' title='How to Install WordPress'>How to Install WordPress</a></li>
<li><a href='http://www.doitwithwp.com/move-your-wordpress-site-to-a-new-domain-seamlessly/' rel='bookmark' title='Move Your WordPress Site To A New Domain Seamlessly'>Move Your WordPress Site To A New Domain Seamlessly</a></li>
<li><a href='http://www.doitwithwp.com/wordpress-security-keys-what-why-how/' rel='bookmark' title='WordPress Security Keys – What, Why &amp; How'>WordPress Security Keys – What, Why &#038; How</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/-NPz3rWvG8Q-ZIoLHXWoc1XSOAw/0/da"><img src="http://feedads.g.doubleclick.net/~a/-NPz3rWvG8Q-ZIoLHXWoc1XSOAw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/-NPz3rWvG8Q-ZIoLHXWoc1XSOAw/1/da"><img src="http://feedads.g.doubleclick.net/~a/-NPz3rWvG8Q-ZIoLHXWoc1XSOAw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=L2i2gm7Mo-c:FRElMDiCjpE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=L2i2gm7Mo-c:FRElMDiCjpE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=L2i2gm7Mo-c:FRElMDiCjpE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=L2i2gm7Mo-c:FRElMDiCjpE:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=L2i2gm7Mo-c:FRElMDiCjpE:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/L2i2gm7Mo-c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/useful-configuration-tweaks-for-wp-config-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/useful-configuration-tweaks-for-wp-config-php/</feedburner:origLink></item>
		<item>
		<title>Specify how your WordPress Site Should be Viewed on Mobile Devices</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/jXyxMBUMxWU/</link>
		<comments>http://www.doitwithwp.com/set-mobile-device-view/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 14:00:10 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[meta tag]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[scale]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[viewport]]></category>
		<category><![CDATA[zoom]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=3404</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>With internet use on the rise on smartphones, you can specify how your site should appear, so that it's being viewed the way you intended it.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/wptouch-is-a-godsend-in-an-increasingly-mobile-world/' rel='bookmark' title='WPTouch is a Godsend in an Increasingly Mobile World'>WPTouch is a Godsend in an Increasingly Mobile World</a></li>
<li><a href='http://www.doitwithwp.com/get-instant-site-updates-with-prowl-wordpress/' rel='bookmark' title='Get Instant Site Updates With Prowl'>Get Instant Site Updates With Prowl</a></li>
<li><a href='http://www.doitwithwp.com/move-your-wordpress-site-to-a-new-domain-seamlessly/' rel='bookmark' title='Move Your WordPress Site To A New Domain Seamlessly'>Move Your WordPress Site To A New Domain Seamlessly</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>With the rise of the smartphone, readers are increasingly <strong>turning to their mobile devices to read your content</strong>. So, you want to be sure that it&#8217;s being seen the way you intend for it to be seen.</p>
<p>One way that you can make sure of this is to use the Viewport metatag. It is a standard that was developed by Apple at the introduction of the iPhone. It is now supported by most mobile devices, including iPhone, iPad and Android.</p>
<p>It <strong>allows you to specify what zoom level</strong> your site should be set to when it is loaded, how far in or out a user can zoom and even to disable zooming if you wish.</p>
<p>For example, to set the width of your site to the width of the device, load the site with a 1.0x zoom and allow scaling between 0.6x and 2.4x, then you would use a meta tag like this, which goes in your head section. You can either put it there manually in header.php, or you can use a function to place it there, which I&#8217;ll show you later:</p>
<pre class="brush: xml; title: ; notranslate">&lt;meta name = &quot;viewport&quot; content = &quot;initial-scale = 1.0, minimum-scale = 0.6, maximum-scale=2.4, width = device-width&quot;&gt;</pre>
<p>Another example, to set the width of the device to 640 pixels, the height to 960 pixels and disable zooming, would look like this:</p>
<pre class="brush: xml; title: ; notranslate">&lt;meta name = &quot;viewport&quot; content = &quot;width = 640, height = 960, user-scalable = no&quot;&gt;</pre>
<p>There&#8217;s more specifics on the details of the viewport tag on <a title="Apple Supported Meta Tags" href="http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html" target="_blank">Apple&#8217;s developer website</a>. It also has a few other tweaks that you can make, such as turning the status bar black when viewing your site, or running your site in full-screen mode by using the following meta tag:</p>
<pre class="brush: xml; title: ; notranslate">&lt;meta name=&quot;apple-mobile-web-app-capable&quot; content=&quot;yes&quot;&gt;</pre>
<p>If you want to <strong>use a function to add these to your header</strong> instead of <a title="How to Edit Your WordPress Theme Files" href="http://www.doitwithwp.com/how-to-edit-your-theme-files-wordpress/">messing with your theme files</a>, then put something like this into your <a title="Create a Functionality Plugin Instead of Using Functions.php" href="http://www.doitwithwp.com/create-functions-plugin/">functionality plugin</a>:</p>
<pre class="brush: php; title: ; notranslate">function diww_viewport_meta_tag() {
	echo '&lt;meta name = &quot;viewport&quot; content = &quot;initial-scale = 1.0, maximum-scale=2.4, width = device-width&quot;&gt;';
}

add_action ( 'wp_head', 'diww_viewport_meta_tag' );</pre>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/wptouch-is-a-godsend-in-an-increasingly-mobile-world/' rel='bookmark' title='WPTouch is a Godsend in an Increasingly Mobile World'>WPTouch is a Godsend in an Increasingly Mobile World</a></li>
<li><a href='http://www.doitwithwp.com/get-instant-site-updates-with-prowl-wordpress/' rel='bookmark' title='Get Instant Site Updates With Prowl'>Get Instant Site Updates With Prowl</a></li>
<li><a href='http://www.doitwithwp.com/move-your-wordpress-site-to-a-new-domain-seamlessly/' rel='bookmark' title='Move Your WordPress Site To A New Domain Seamlessly'>Move Your WordPress Site To A New Domain Seamlessly</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/wNJJEj80wQWwkFk6pEU6ozmqBtc/0/da"><img src="http://feedads.g.doubleclick.net/~a/wNJJEj80wQWwkFk6pEU6ozmqBtc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/wNJJEj80wQWwkFk6pEU6ozmqBtc/1/da"><img src="http://feedads.g.doubleclick.net/~a/wNJJEj80wQWwkFk6pEU6ozmqBtc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=jXyxMBUMxWU:sNujQVpczs8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=jXyxMBUMxWU:sNujQVpczs8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=jXyxMBUMxWU:sNujQVpczs8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=jXyxMBUMxWU:sNujQVpczs8:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=jXyxMBUMxWU:sNujQVpczs8:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/jXyxMBUMxWU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/set-mobile-device-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/set-mobile-device-view/</feedburner:origLink></item>
		<item>
		<title>Allow Users to Create Posts on your Site with Formidable Pro</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/DUyAkH8BT5Q/</link>
		<comments>http://www.doitwithwp.com/allow-users-to-create-posts-on-your-site-with-formidable-pro/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 13:00:28 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[draft]]></category>
		<category><![CDATA[formidable pro]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=3036</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>Formidable Pro contains a great deal of flexibility that allows you to create forms which your users can create posts from, either in draft form, or posted live immediately.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/how-and-why-to-create-custom-post-types/' rel='bookmark' title='How and Why to Create Custom Post Types'>How and Why to Create Custom Post Types</a></li>
<li><a href='http://www.doitwithwp.com/create-functions-plugin/' rel='bookmark' title='Create a Functionality Plugin Instead of Using Functions.php'>Create a Functionality Plugin Instead of Using Functions.php</a></li>
<li><a href='http://www.doitwithwp.com/getting-specific-wordpress-feeds/' rel='bookmark' title='Getting Specific with WordPress Feeds'>Getting Specific with WordPress Feeds</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>In the process of creating a new site, I realised that I needed to <strong>allow people to submit information from the site</strong> and <strong>turn that information into a new post</strong>, so that it could then be displayed on the site, without me having to manually copy the information from an email into a new post.</p>
<p>I went in search of some solutions and while I had used <a title="TDO Mini Forms" href="http://thedeadone.net/download/tdo-mini-forms-wordpress-plugin/" target="_blank">TDO Mini Forms</a> before, it is no longer in development and was not very user friendly to configure anyway. I was left to decide between Gravity Forms and <a title="Formidable Pro" href="http://www.doitwithwp.com/go/formidablepro" target="_blank">Formidable Pro</a>. I ultimately decided on Formidable Pro, not least because it was cheaper (and still did everything I wanted) and was recommended by a couple of people. So I bought the plugin and set about configuring it.</p>
<h3>Create the form</h3>
<p>In this example, I&#8217;m going to create a form to allow people to submit stories to be shown on the site under a specific category. So in my case, I created a field for the story title (which will become the post title), the user&#8217;s name and email address, and then the story itself. I set all of these to be required fields, to ensure that nothing is omitted.</p>
<p>For the story title field, I <strong>selected the Post Field to be Title</strong> (which means that the title of the post will be whatever is submitted in that box).</p>
<p>I also need to set which category the post is going to be created in, but since I don&#8217;t want people to be able to edit this, I&#8217;m going to <strong>create a hidden field</strong>. I created a Multiple Selection field and then set the Post Field to be Taxonomy and then chose Category as the Taxonomy type. Now if you update the form, it will present a list of your categories. You can now preselect the category that you want the posts to be put in and select Admin Only under Field Type, so that people won&#8217;t be shown that field, meaning that your selection of categories will be unchangeable by users.</p>
<p><img class="aligncenter size-full wp-image-3037" title="Hidden Field" src="http://static.doitwithwp.com/files/2011/12/formidable-pro-hidden-field.png" alt="Formidable Pro Hidden Fields" width="554" height="191" /></p>
<p>Then I created the story field, setting the field type to paragraph, to give the user plenty of space to write down their story and also <strong>set the post field as Post content</strong>, so that everything written in this field will become the main post content.</p>
<p>Now you need to create another hidden field to set the post status. <strong>I recommend setting the post status to draft</strong> so that you can review everything before it goes live on your site. So create a drop-down field and set the Post Field to Post Status. Once you save the form, it will give you the option to preselect the post status (which should be Draft). Be sure to set the Field Type to Admin Only, so that users can&#8217;t change this to published to circumvent your review.</p>
<p><img class="aligncenter size-large wp-image-3038" title="Create Post" src="http://serve.doitwithwp.com/files/2011/12/formidable-pro-create-poost-580x388.png" alt="Create posts in Formidable Pro" width="580" height="388" /></p>
<p><img class="alignleft size-full wp-image-3039" title="Field Validation" src="http://static.doitwithwp.com/files/2011/12/formidable-pro-field-validation.png" alt="Field Validation in Formidable Pro" width="365" height="128" />You can now create text fields to <strong>collect the user&#8217;s name and email address</strong>, using validation to confirm that the email address is a valid address.</p>
<p>After you&#8217;ve got all of the fields in place, you can <strong>set up form notifications</strong>, so that once an entry is submitted, you get an email sent to you so that you know to review it on your site. You can also send an autoresponder to the submitter.</p>
<p><img class="alignleft size-full wp-image-3040" title="Shortcode" src="http://files.doitwithwp.com/files/2011/12/formidable-pro-shortcode.png" alt="Formidable Pro Shortcode" width="289" height="53" />Once the form is complete, you can copy the shortcode from the top right-hand corner and paste it into the page where you want the form to appear on your site.</p>
<p><img class="aligncenter size-full wp-image-3044" title="Final Form" src="http://files.doitwithwp.com/files/2011/12/formidable-pro-final-form.png" alt="The finished form live on your site" width="538" height="604" /></p>
<h3>Your experiences</h3>
<p>The options for what you can do with <a title="Formidable Pro" href="http://www.doitwithwp.com/go/formidablepro" target="_blank">Formidable Pro</a> are quite limitless. <strong>How have you used forms like this</strong> to collect and display information from your readers? I&#8217;m always interested to hear your experiences. Let me know in the comments.</p>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/how-and-why-to-create-custom-post-types/' rel='bookmark' title='How and Why to Create Custom Post Types'>How and Why to Create Custom Post Types</a></li>
<li><a href='http://www.doitwithwp.com/create-functions-plugin/' rel='bookmark' title='Create a Functionality Plugin Instead of Using Functions.php'>Create a Functionality Plugin Instead of Using Functions.php</a></li>
<li><a href='http://www.doitwithwp.com/getting-specific-wordpress-feeds/' rel='bookmark' title='Getting Specific with WordPress Feeds'>Getting Specific with WordPress Feeds</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/gnW8xZqNPAUzaF116wSVkmlnfS0/0/da"><img src="http://feedads.g.doubleclick.net/~a/gnW8xZqNPAUzaF116wSVkmlnfS0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/gnW8xZqNPAUzaF116wSVkmlnfS0/1/da"><img src="http://feedads.g.doubleclick.net/~a/gnW8xZqNPAUzaF116wSVkmlnfS0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=DUyAkH8BT5Q:VogjsPZIxLs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=DUyAkH8BT5Q:VogjsPZIxLs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=DUyAkH8BT5Q:VogjsPZIxLs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=DUyAkH8BT5Q:VogjsPZIxLs:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=DUyAkH8BT5Q:VogjsPZIxLs:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/DUyAkH8BT5Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/allow-users-to-create-posts-on-your-site-with-formidable-pro/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/allow-users-to-create-posts-on-your-site-with-formidable-pro/</feedburner:origLink></item>
		<item>
		<title>How to Set Up Domain Mapping for WordPress Multisite</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/KPvxCHXanLE/</link>
		<comments>http://www.doitwithwp.com/domain-mapping-for-wordpress-multisite/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 13:00:03 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=3323</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>This tutorial guides you through domain mapping for WordPress Multisite, allowing you to create a network of sites that all have their own domain names.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/how-to-install-setup-wordpress-multisite-network/' rel='bookmark' title='How to Install &amp; Setup WordPress Multisite'>How to Install &#038; Setup WordPress Multisite</a></li>
<li><a href='http://www.doitwithwp.com/move-your-wordpress-site-to-a-new-domain-seamlessly/' rel='bookmark' title='Move Your WordPress Site To A New Domain Seamlessly'>Move Your WordPress Site To A New Domain Seamlessly</a></li>
<li><a href='http://www.doitwithwp.com/wordpress-favicons-site-admin-area/' rel='bookmark' title='Set Favicons for WordPress Site and Admin Area'>Set Favicons for WordPress Site and Admin Area</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>So you&#8217;ve gone through <a title="How to Install and Setup WordPress Multisite" href="http://www.doitwithwp.com/how-to-install-setup-wordpress-multisite-network/">setting up WordPress Multisite</a>, and now you&#8217;re ready to start setting up new sites in your network. Only trouble is, you want to<strong> use unique domains for your sites</strong> instead of using subdomains of your main installation. Well, with a little extra effort, it&#8217;s entirely possible.</p>
<h3>Install the required plugin</h3>
<p>There&#8217;s an excellent plugin that will do most of the hard work for you. Install the <a title="WordPress MU Domain Mapping" href="http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/" target="_blank">WordPress MU Domain Mapping plugin</a> and <strong>Network Activate the plugin</strong>.</p>
<p>Before you proceed any further, there&#8217;s a couple of things that you have to do manually. Access your site&#8217;s installation, either using FTP or your hosting Control Panel and go to wp-content/plugins/wordpress-mu-domain-mapping/ and <strong>locate the sunrise.php file</strong>. You <strong>must move this file</strong> up two levels, to the wp-content folder.</p>
<p>Once you&#8217;ve done that, <strong>find your wp-config.php file and add the following definition</strong>. Add it below your previous multisite rules (i.e. above the &#8220;Stop editing&#8221; line):</p>
<pre class="brush: php; title: ; notranslate">define( 'SUNRISE', 'on' );</pre>
<h3>Configure the plugin</h3>
<p>Now your plugin is correctly installed and when you head to the Network Admin area you&#8217;ll notice a menu under Settings called Domain Mapping. Click on that so that you can configure the plugin.</p>
<p><img class="alignright size-full wp-image-3330" title="Getting IP Address in cPanel" src="http://static.doitwithwp.com/files/2012/10/cpanel-ip-address.png" alt="Getting IP Address in cPanel" width="223" height="196" />The main thing you need to be concerned with is <strong>setting the IP address of your server</strong>. To find this, log in to your hosting cPanel and on the main page, you should be able to see the IP address of your server in the information on the left-hand side. If you can&#8217;t find the IP address, you can get in touch with your host, or use one of many available free tools to <a title="Get IP address of website" href="http://www.selfseo.com/find_ip_address_of_a_website.php" target="_blank">convert the web address to an IP address</a>.</p>
<p>If you fill out the IP address, you can ignore the CNAME field. Then, the remaining options are as follows:</p>
<ol>
<li>Remote Login &#8211; Means that logging in to one site will log you in to all sites.</li>
<li>Permanent Redirect &#8211; This will create a 301 redirect on your subdomain (as opposed to a temporary 302 redirect) &#8211; highly recommended if the domain mapping will be permanent.</li>
<li>User Domain Mapping Page &#8211; Creates a new menu in each site which allows that site&#8217;s users to map their own domains (instead of being controlled by the network&#8217;s Super Admin only).</li>
<li>Redirect administration pages &#8211; Means that all administration pages will be kept on the original site&#8217;s domain, instead of on the mapped domains.</li>
<li>Disable primary domain check &#8211; Means that multiple domains pointing to a single site will be treated as separate sites, instead of redirecting all domains to the noted primary domain (not recommended).</li>
</ol>
<h3>Map domains to your network sites</h3>
<p>Now you&#8217;re ready to set up the domain for your new sites. You should have already created the site that you&#8217;re wanting to map your domain to. At the moment, it will just be a subdomain of your main site &#8211; it doesn&#8217;t have to be set up or looking perfect &#8211; it just has to exist.</p>
<p>Once you&#8217;ve purchased your domain, make sure that you <strong>set the nameservers for the domain to your hosting account&#8217;s nameservers</strong>. Then, go to your hosting account cPanel (which all good hosts, including my recommended <a title="WordPress Hosting" href="http://www.doitwithwp.com/go/hostgator" target="_blank">HostGator</a>, should have) and find the Parked Domains option under Domains.</p>
<p><img class="aligncenter size-full wp-image-3333" title="Add a Parked Domain" src="http://cdn.doitwithwp.com/files/2012/10/cpanel-parked-domain.png" alt="Add a Parked Domain" width="564" height="41" /></p>
<p>Once in there, <strong>add your new domain as a parked domain</strong>, making sure that the document root shows as the same folder as your WordPress installation (probably /public_html). If you can&#8217;t do this (because you don&#8217;t have cPanel for instance), you need to set an A record on your new domain that points to the IP address of your hosting server (which you found out earlier).</p>
<p>Now is the final step. You&#8217;ll <strong>need to know the &#8220;Site ID&#8221;</strong> of the site you want to map the domain to. If you click on Sites &gt; Sites in the Network Admin, and click on the name of the site (as if to edit it), the URL will include the site ID. It will look something like this (where the Site ID is 2 in the example):</p>
<pre class="brush: plain; title: ; notranslate">http://www.theukedge.com/wp-admin/network/site-info.php?id=2</pre>
<p><img class="alignright size-full wp-image-3332" title="Map a New Domain" src="http://cdn.doitwithwp.com/files/2012/10/wordpress-multisite-new-domain.png" alt="Map a New Domain" width="376" height="191" />Now back in your Network Admin, go to Domains under the Settings Menu. You&#8217;ll see <strong>a section for adding a new domain</strong>, with three fields: one for the site ID, which you just found out, the domain name and an option whether to set the domain as the primary domain for the site. This is because you can set more than one domain to point to a single site, so you want to specify which one should be the site&#8217;s primary domain.</p>
<p>Once you save that, with any luck (and assuming that DNS changes have propagated), if you go to your new domain in a web browser, you <strong>should find yourself at your new site</strong>.</p>
<p>I&#8217;ll grant you that it is a little bit fiddly, and it would be nice if WordPress would bring this into the core and make it a bit more of a fluid process, but once it is set up, you never need to look at it again; the plugin will keep serving up the right site at the right domain.</p>
<p>Did you manage to get through the setup process? <strong>Did you encounter any problems</strong>? If you need any help getting through this process, you can always ask a question here, or <a title="WordPress Consultant" href="http://www.theukedge.com" target="_blank">hire me</a> to do it for you.</p>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/how-to-install-setup-wordpress-multisite-network/' rel='bookmark' title='How to Install &amp; Setup WordPress Multisite'>How to Install &#038; Setup WordPress Multisite</a></li>
<li><a href='http://www.doitwithwp.com/move-your-wordpress-site-to-a-new-domain-seamlessly/' rel='bookmark' title='Move Your WordPress Site To A New Domain Seamlessly'>Move Your WordPress Site To A New Domain Seamlessly</a></li>
<li><a href='http://www.doitwithwp.com/wordpress-favicons-site-admin-area/' rel='bookmark' title='Set Favicons for WordPress Site and Admin Area'>Set Favicons for WordPress Site and Admin Area</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/v-HzxFBaxotrtFGIIIYCRB6-Ek8/0/da"><img src="http://feedads.g.doubleclick.net/~a/v-HzxFBaxotrtFGIIIYCRB6-Ek8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/v-HzxFBaxotrtFGIIIYCRB6-Ek8/1/da"><img src="http://feedads.g.doubleclick.net/~a/v-HzxFBaxotrtFGIIIYCRB6-Ek8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=KPvxCHXanLE:KNNqifHsoSE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=KPvxCHXanLE:KNNqifHsoSE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=KPvxCHXanLE:KNNqifHsoSE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=KPvxCHXanLE:KNNqifHsoSE:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=KPvxCHXanLE:KNNqifHsoSE:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/KPvxCHXanLE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/domain-mapping-for-wordpress-multisite/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/domain-mapping-for-wordpress-multisite/</feedburner:origLink></item>
		<item>
		<title>How to Install &amp; Setup WordPress Multisite</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/ZdJPLR9cFZs/</link>
		<comments>http://www.doitwithwp.com/how-to-install-setup-wordpress-multisite-network/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 13:26:12 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[sites]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=3184</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>WordPress Multisite allows you to create an infinite number of websites under one WordPress installation and this tutorial shows you how to set it up and how to add new sites to your network.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/how-to-install-wordpress/' rel='bookmark' title='How to Install WordPress'>How to Install WordPress</a></li>
<li><a href='http://www.doitwithwp.com/wordpress-favicons-site-admin-area/' rel='bookmark' title='Set Favicons for WordPress Site and Admin Area'>Set Favicons for WordPress Site and Admin Area</a></li>
<li><a href='http://www.doitwithwp.com/wordpress-user-roles-a-quick-guide/' rel='bookmark' title='WordPress User Roles &#8211; A Quick Guide'>WordPress User Roles &#8211; A Quick Guide</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>Since version 3.0, you have natively had the option to activate WordPress Multisite, which allows you to <strong>run as many sites as you want from a single WordPress installation</strong> (whereas previously it was one website per WordPress installation).</p>
<p>If you run a lot of sites, or you have lots of clients that you keep websites for, it can be a lot of maintenance to go to each one individually and update them on a regular basis.</p>
<p>With WordPress Multisite, you can <strong>update all the plugins and themes with just one click</strong>, which is a huge time-saver. I currently run a network of about 10 sites and it makes it so much easier to keep everything updated. You could have a much larger network of sites and it would be no more difficult to update them all.</p>
<p>The benefits of WordPress Multisite are massive and I thoroughly recommend it to anyone who wants to run more than one site, unless there&#8217;s good reason for keeping the sites separate from one another.</p>
<p>If you find this tutorial a little too daunting, you can always <a title="The UK Edge - WordPress Consultant" href="http://www.theukedge.com" target="_blank">hire me to do it for you</a>. If you&#8217;re comfortable fiddling with code, here&#8217;s how to do it&#8230;</p>
<h3>Back up everything!</h3>
<p>You&#8217;re about to be making some significant changes to your core files and in particular, your database, so be sure to<strong> take a thorough backup</strong> of both even if you <a title="Automate WordPress Database Backups for Care-Free Protection" href="http://www.doitwithwp.com/automate-wordpress-database-backups-for-care-free-protection/">automate your database backups</a>.</p>
<h3>Allow multisite installation</h3>
<p>To avoid dangerous mistakes, you have to intentionally<strong> enable the option to even install multisite</strong>. Fortunately, it doesn&#8217;t require much of you. Hunt down your wp-config.php file which should be in the root of your WordPress installation, find the &#8220;stop editing&#8221; line and insert the following line just above it, like so:</p>
<pre class="brush: php; title: ; notranslate">define('WP_ALLOW_MULTISITE', true);

/* That's all, stop editing! Happy blogging. */</pre>
<h3>Setup the network</h3>
<p>Now when you refresh your WordPress admin, you&#8217;ll see an additional option under the Tools menu called <strong>Network Setup</strong>. Head there. You&#8217;ll be presented with a few options, like what to call your network and the email address of your Super Admin (see <a title="WordPress User Roles – A Quick Guide" href="http://www.doitwithwp.com/wordpress-user-roles-a-quick-guide/">A Quick Guide to User Roles</a>). You may also be presented with the option to choose between sub-directory or subdomain installation. Unless you desperately want a subdirectory installation, <strong>I would strongly suggest subdomain installation</strong>. Fill the options out and hit the big old install button (but only if you promise me that backed up your site first).</p>
<h3>Enable the network</h3>
<p>Now that your database is ready to get the network going, you need to <strong>edit a couple more files to make the network active</strong>. Fortunately, the clever WordPress monkeys made it very explicit and easy for you to understand.</p>
<p>After setting up the network, you should be presented with a page that shows you a few blocks of code. Enabling the network involves adding some code to two files: wp-config.php and .htaccess, both of which should be in your website&#8217;s root folder. The code for your wp-config.php will look something like the code below:</p>
<pre class="brush: php; title: ; notranslate">define('WP_ALLOW_MULTISITE', true);
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'www.theukedge.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

/* That's all, stop editing! Happy blogging. */</pre>
<h3>Add a wildcard subdomain</h3>
<p><img class="alignright size-full wp-image-3188" title="Subdomains in cPanel" src="http://cdn.doitwithwp.com/files/2012/01/cpanel-subdomains.png" alt="Subdomains in cPanel" width="87" height="93" />At this point, you should also <strong>enable a &#8220;wildcard subdomain&#8221; in your hosting account</strong>, which will allow WordPress to use whatever subdomain it needs to create all the different sites. I&#8217;m going to show you how to do this in cPanel, since this should be available to most of you (especially if you use the awesome <a title="WordPress Hosting" href="http://www.doitwithwp.com/go/hostgator" target="_blank">HostGator</a>).</p>
<p>Once logged in to cPanel, hit the Subdomains icon. You&#8217;ll then have a small form that will enable you to add a new subdomain (above any subdomains that might already exist). Create a new subdomain of * on the domain of your WordPress master site, setting the document root as public_html, or wherever the root of your website is, if it&#8217;s not there.</p>
<p><a href="http://serve.doitwithwp.com/files/2012/01/creating-wildcard-subdomain-cpanel.png"><img class="aligncenter size-large wp-image-3189" title="Creating a Wildcard Subdomain in cPanel" src="http://files.doitwithwp.com/files/2012/01/creating-wildcard-subdomain-cpanel-580x143.png" alt="Creating a Wildcard Subdomain in cPanel" width="580" height="143" /></a></p>
<p>Once you&#8217;ve successfully done that and added all the code that WordPress asks you to, you&#8217;ll need to login again. There should be a link at the bottom of the Network setup page. Click there and log back in, where <strong>your new multisite-enabled site will be waiting for you</strong>.</p>
<h3>Tweaking your settings</h3>
<p>How you set up your network will largely depend on how you want to run it. For example, on my network, I don&#8217;t want to allow anyone to be able to create their own site, though that is an option if you want to do that. I also don&#8217;t want to limit what kind of files can be uploaded (since I&#8217;m in charge of all the sites), or what size they can be, though if you have a more open network, you may want to put some of those restrictions in place.</p>
<p><a href="http://files.doitwithwp.com/files/2012/01/network-admin-menu.png"><img class="alignright size-full wp-image-3197" title="Network Admin Menu" src="http://files.doitwithwp.com/files/2012/01/network-admin-menu.png" alt="Network Admin Menu" width="349" height="147" /></a>To <strong>modify your network settings</strong>, you&#8217;ll need to go to the newly created Network Admin area; your original WordPress site will continue to have it&#8217;s own admin area, but there will be a new overarching Network Admin Area where you can install themes, plugins and add new sites and users from. To access it, you can go to the admin bar and find it under the My Sites menu. You can also go to yourdomain.com/wp-admin/network to get to the Network Admin area.</p>
<p>Once you&#8217;re at the dashboard, you can find the network setup page under Settings &gt; Network Settings. Just have a good look through at everything and <strong>set up the options as you see fit for what your network needs are</strong>. You can of course change them if they are too strict or lax in the future.</p>
<p>If you&#8217;re going to disable new site registrations, so that only a Super Admin can create new sites, you might want to add another declaration to your wp-config.php file, just below all the ones you pasted earlier. This will <strong>redirect people to a specified site if they try to access a site that doesn&#8217;t exist</strong> (presumably your master site). For example, since I have the following declaration in my wp-config.php file, anyone trying to access balloons.theukedge.com, which does not exist, will be redirected to <a title="The UK Edge" href="http://www.theukedge.com" target="_blank">The UK Edge</a>:</p>
<pre class="brush: php; title: ; notranslate">define( 'NOBLOGREDIRECT', 'http://www.theukedge.com');</pre>
<h3>Adding a new network site</h3>
<p><a href="http://cdn.doitwithwp.com/files/2012/01/add-new-wordpress-network-site.png"><img class="alignright size-full wp-image-3199" title="Add New Network Site" src="http://cdn.doitwithwp.com/files/2012/01/add-new-wordpress-network-site.png" alt="Add New Network Site" width="195" height="158" /></a>Now that your network is all set up, <strong>you&#8217;ll probably want to add your first network site</strong>. Doing so is a fairly simple process. Go to the Add New option under the Sites menu in your Network Admin area.</p>
<p>The process of adding the site is incredibly simple. Just three pieces of information are required of you; the site address, which is where your site will be accessed from. For example, if I was going to create a site at parties.theukedge.com, I would simple insert parties in this field.</p>
<p><a href="http://files.doitwithwp.com/files/2012/01/new-site-added.png"><img class="alignright size-full wp-image-3202" title="New Site Added" src="http://files.doitwithwp.com/files/2012/01/new-site-added.png" alt="New Site Added" width="239" height="160" /></a>You&#8217;re then asked for the Site Title and finally the Administrator&#8217;s email. If you want to add yourself as the site&#8217;s admin, just enter the same email address that you used in your existing profile. Alternatively, you can set it as someone completely new.</p>
<p>Once you <strong>click on Add Site</strong>, it will create the site for you and you are then given the option to go to the Dashboard, or Edit the Site. Simple huh!?</p>
<h3>How about using custom domains for my new sites?</h3>
<p>As you&#8217;ll have noticed, everything up to this point has allowed you to create new sites as subdomains to the Network Master Site, where you installed Multisite. But <strong>what if you want to use custom domains for your new sites</strong>? For example, I have WordPress Multisite installed on theukedge.com, but Do It With WordPress is a network site from that installation, even though it&#8217;s domain (doitwithwp.com) is not a subdomain of theukedge.com.</p>
<p>Well, I&#8217;m <strong>going to write that up in a separate tutorial</strong>, which will come your way soon. In the meantime, I&#8217;m going to point you in the direction of the tutorial that I learnt from to set up &#8220;domain mapping&#8221;. Please check the <a title="WordPress Multisite Domain Mapping Tutorial" href="http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/" target="_blank">WordPress Multisite Domain Mapping Tutorial</a> by Otto.</p>
<h3>Problems? Questions? Requests?</h3>
<p>So, how did it go for you? <strong>Did you get it set up successfully</strong>? Do you have any questions that I didn&#8217;t cover in this tutorial? Or was there something that you <strong>need me to help you</strong> with? Let me know in the comments.</p>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/how-to-install-wordpress/' rel='bookmark' title='How to Install WordPress'>How to Install WordPress</a></li>
<li><a href='http://www.doitwithwp.com/wordpress-favicons-site-admin-area/' rel='bookmark' title='Set Favicons for WordPress Site and Admin Area'>Set Favicons for WordPress Site and Admin Area</a></li>
<li><a href='http://www.doitwithwp.com/wordpress-user-roles-a-quick-guide/' rel='bookmark' title='WordPress User Roles &#8211; A Quick Guide'>WordPress User Roles &#8211; A Quick Guide</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/7GQVWDqLnFVY_8_33nnjqJ2celY/0/da"><img src="http://feedads.g.doubleclick.net/~a/7GQVWDqLnFVY_8_33nnjqJ2celY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/7GQVWDqLnFVY_8_33nnjqJ2celY/1/da"><img src="http://feedads.g.doubleclick.net/~a/7GQVWDqLnFVY_8_33nnjqJ2celY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=ZdJPLR9cFZs:OC6ehyNqIiI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=ZdJPLR9cFZs:OC6ehyNqIiI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=ZdJPLR9cFZs:OC6ehyNqIiI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=ZdJPLR9cFZs:OC6ehyNqIiI:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=ZdJPLR9cFZs:OC6ehyNqIiI:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/ZdJPLR9cFZs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/how-to-install-setup-wordpress-multisite-network/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/how-to-install-setup-wordpress-multisite-network/</feedburner:origLink></item>
		<item>
		<title>Speed Up WordPress with W3 Total Cache</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/rUgNcTMMMPQ/</link>
		<comments>http://www.doitwithwp.com/speed-up-wordpress-with-w3-total-cache/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 13:00:38 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Speed]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[w3 total cache]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=2995</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>This tutorial guides you through setting up each section of W3 Total Cache to get your WordPress site running like clockwork in no time at all, with explanations in each section.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/set-up-w3-total-cache-with-amazon-cloudfront-cdn/' rel='bookmark' title='Set up W3 Total Cache with Amazon CloudFront CDN'>Set up W3 Total Cache with Amazon CloudFront CDN</a></li>
<li><a href='http://www.doitwithwp.com/keep-track-of-load-times-using-googles-page-speed-api/' rel='bookmark' title='Keep Track of Load Times Using Google&#8217;s Page Speed API'>Keep Track of Load Times Using Google&#8217;s Page Speed API</a></li>
<li><a href='http://www.doitwithwp.com/speed-up-wordpress-free-amazon-cdn/' rel='bookmark' title='Make WordPress Lightning Quick with a Free CDN From Amazon'>Make WordPress Lightning Quick with a Free CDN From Amazon</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>W3 Total Cache is probably the most useful WordPress plugin you can own (save maybe <a title="WordPress SEO by Yoast" href="http://wordpress.org/extend/plugins/wordpress-seo/" target="_blank">WordPress SEO by Yoast</a>) and it still baffles me that it is completely free. For the grand price of zero, you get a plugin which will <strong>cache your pages, objects, database queries, pair up with a CDN and more</strong>. I am still of the opinion that there is not a single WordPress site that could not benefit from installing it.</p>
<p>So with that said, get it installed and then come back here for some guidance on how to set up its myriad of configuration options.</p>
<h3>General Settings</h3>
<p>When you install and activate the plugin, you&#8217;ll get a new icon the menu of the left hand side of your admin area. Click on that icon to bring up the general settings page for the plugin. You&#8217;ll want to start here.</p>
<p>Bear in mind that this page is where you &#8220;turn on&#8221; several of the functions of the plugin and it may be worthwhile keeping them disabled until you have configured the individual components and then returning here at the end to turn everything on.</p>
<p>You may be prompted to <strong>allow W3 Total Cache to install lines of code in your .htaccess file</strong> upfront and throughout the configuration process. Make sure you have a backup first, and then have it auto-install the code.</p>
<h4><a href="http://static.doitwithwp.com/files/2012/01/w3-total-cache-general-settings-1.png"><img class="alignright size-medium wp-image-3141" title="W3 Total Cache General Settings 1" src="http://serve.doitwithwp.com/files/2012/01/w3-total-cache-general-settings-1-217x300.png" alt="W3 Total Cache General Settings 1" width="217" height="300" /></a>Page cache</h4>
<p>The page cache <strong>creates static pages from your dynamic content</strong> and serves them up to your users, instead of creating pages on-demand, which massively reduces your server load. You&#8217;ll likely find that the only option you have here is to select Disk: Enhanced, which is more than likely adequate for what you need.</p>
<h4>Minify</h4>
<p>Minify is the process of <strong>removing line breaks, comments and spaces from CSS and HTML files</strong> to reduce their size (thus delivering them quicker to the user). Again your only option may be Disk, which it is for me, but that will serve you well. You should be able to select Auto for your Minify Mode and the default settings for all the minifiers unless you have reason to choose something else.</p>
<h4><a href="http://static.doitwithwp.com/files/2012/01/w3-total-cache-general-settings-2.png"><img class="alignright size-medium wp-image-3142" title="W3 Total Cache General Settings 2" src="http://files.doitwithwp.com/files/2012/01/w3-total-cache-general-settings-2-202x300.png" alt="W3 Total Cache General Settings 2" width="202" height="300" /></a>Database cache</h4>
<p>The database cache <strong>saves the results of database queries</strong> instead of looking to the database every time the request is made, which significantly reduces the impact on your SQL server. Since WordPress is entirely database driven, nearly every page will make several requests to the database, such as displaying your 10 most recent posts on the front page, or recent comments in your widgets. Use the Disk option.</p>
<h4>Object cache</h4>
<p>The object cache <strong>stores numerous objects from the database</strong>. It may or may not speed up your site, depending on the speed of your disk. You can do a comparison before and after turning it on to see whether there is a reduction in load time and if there isn&#8217;t, you might as well leave it turned off. If you are to turn it on however, use the Disk option.</p>
<h4>Browser cache</h4>
<p>The browser cache works by &#8220;telling&#8221; your visitors&#8217; browsers <strong>how long to keep using the same version of an object</strong>. For example, it is unlikely that you will change an image once it has been uploaded, so there is no sense in downloading the image every time a user visits a page &#8211; it can just <strong>keep the original version and use it over and over again</strong>. This will cut a big chunk out of the amount of data needed to download every page, since much of it can be stored on the user&#8217;s computer after the first visit. There&#8217;s no options here, but you&#8217;ll need to enable it here once you&#8217;ve set the specific settings in a short while.</p>
<h4>CDN</h4>
<p>CDN stands for Content Delivery Network, which <strong>hosts static parts of your site on servers all over the world</strong> so that users can download them from their closest server, instead of potentially requesting it from halfway across the world, reducing latency and load on your server. They&#8217;re fairly cheap to use and I recommend it. I personally use Amazon Cloudfront, though there are a number of alternatives supported by W3 Total Cache. I wrote a tutorial detailing <a title="Set up W3 Total Cache with Amazon CloudFront CDN" href="http://www.doitwithwp.com/set-up-w3-total-cache-with-amazon-cloudfront-cdn/">how to set up Amazon Cloudfront as your CDN with W3 Total Cache</a>, which will be useful for guiding you through that process.</p>
<h4>Varnish and Cloudflare</h4>
<p>You can generally ignore these two sections, unless you know that you have a need for them.</p>
<h4><a href="http://static.doitwithwp.com/files/2012/01/w3-total-cache-general-settings-3.png"><img class="alignright size-medium wp-image-3145" title="W3 Total Cache General Settings 3" src="http://static.doitwithwp.com/files/2012/01/w3-total-cache-general-settings-3-300x241.png" alt="W3 Total Cache General Settings 3" width="300" height="241" /></a>Miscellaneous settings</h4>
<p>With the miscellaneous settings, I recommend verifying the rewrite rules; I have found that on numerous occasions, other plugins that interfere with .htaccess can mess up the W3 Total Cache settings, so enabling this will tell you when there&#8217;s a problem that needs resolving. Else, your site could be running with several parts of the plugin not in effect and you wouldn&#8217;t know it.</p>
<p>I also recommend using the Google Page Speed dashboard widget for <a title="Keep Track of Load Times Using Google’s Page Speed API" href="http://www.doitwithwp.com/keep-track-of-load-times-using-googles-page-speed-api/">tracking your page speed</a>.</p>
<p>Also, consider making a donation through the support section. I don&#8217;t blame you for wanting to wait to see the results, but if you&#8217;re impressed, <strong>consider a small donation</strong>; support WordPress developers, especially when they work for free.</p>
<h3>Page cache settings</h3>
<p>Now move on to the page cache settings page. Here is where you set the specific settings for how the page cache should operate. Here&#8217;s the settings that I recommend:</p>
<h4><a href="http://static.doitwithwp.com/files/2012/01/w3-total-cache-page-cache-settings-1.png"><img class="alignright size-medium wp-image-3148" title="W3 Total Cache Page Cache Settings 1" src="http://files.doitwithwp.com/files/2012/01/w3-total-cache-page-cache-settings-1-300x257.png" alt="W3 Total Cache Page Cache Settings 1" width="300" height="257" /></a>General</h4>
<p>Enable caching of the home page, SSL requests and requests only for your domain. Also check the box to disable caching pages for logged-in users. I don&#8217;t recommend caching feeds because if you make changes, you want it be reflected in your RSS feed, which I have had issues with before, when I had this option enabled. I also don&#8217;t recommend caching 404 pages because they <em>shouldn&#8217;t</em> be used very often and they will return an error code of 200 (OK) rather than 404 (not found), which is undesirable, so they&#8217;re not worth caching.</p>
<h4>Advanced</h4>
<p>For most users, <strong>you won&#8217;t really need to touch the Advanced settings</strong>, but you can reduce the Garbage Collection Time, which is how long the cache holds a version of a page before building a new one (the default 3600 seconds &#8211; 1 hour should be sufficient). You can also set specific user agents (like bots) that shouldn&#8217;t be served pages from the cache, or set specific files which should never be included in the cache.</p>
<h4><a href="http://static.doitwithwp.com/files/2012/01/w3-total-cache-page-cache-settings-2.png"><img class="alignright size-medium wp-image-3152" title="W3 Total Cache Page Cache Settings 2" src="http://files.doitwithwp.com/files/2012/01/w3-total-cache-page-cache-settings-2-300x217.png" alt="W3 Total Cache Page Cache Settings 2" width="300" height="217" /></a>Cache preload</h4>
<p>These options <strong>allow the cache to be pre-built</strong> (i.e. it builds the pages in the background rather than waiting for someone to view a page and build it on-the-fly. This helps to spread your server load more evenly and reduces load times for those who are trying to view a page that hasn&#8217;t yet been viewed, or has expired in the cache. I use an interval of 600 seconds and build 10 pages at a time. You&#8217;ll need to adjust this based on your server and the number of pages on your site. If you have 1000 pages and you&#8217;re only building 10 every 10 minutes and your cache expires every hour, then you&#8217;ll only be able to build 60 out of your 1000 pages before it needs to start over again. Be sure to insert your sitemap address and enable to the preload function.</p>
<h4><a href="http://static.doitwithwp.com/files/2012/01/w3-total-cache-page-cache-settings-3.png"><img class="alignright size-medium wp-image-3151" title="W3 Total Cache Page Cache Settings 3" src="http://files.doitwithwp.com/files/2012/01/w3-total-cache-page-cache-settings-3-300x113.png" alt="W3 Total Cache Page Cache Settings 3" width="300" height="113" /></a>Purge policy</h4>
<p>The purge policy <strong>dictates which pages should be rebuilt in the cache when a new post is published</strong>. For example, your front page likely has a list of your most recent posts, but if you don&#8217;t purge it from the cache when you publish the post, it won&#8217;t show on the front page until the cached page expires and it gets rebuilt with the new information (your new post). For me, I purge the home page, post page and blog feed (all feed types). The other pages are so infrequently used that it wouldn&#8217;t really matter if they have slightly outdated information &#8211; this might not be the case for busier sites.</p>
<h3><a href="http://cdn.doitwithwp.com/files/2012/01/w3-total-cache-minify-settings-1.png"><img class="alignright size-medium wp-image-3155" title="W3 Total Cache General Minify Settings" src="http://files.doitwithwp.com/files/2012/01/w3-total-cache-minify-settings-1-213x300.png" alt="W3 Total Cache General Minify Settings" width="213" height="300" /></a>Minify settings</h3>
<p>In the General section, enable the Rewrite option and disable minify for logged-in users. Also set how you want to notified if there&#8217;s a problem with minifying your code.</p>
<h4>HTML &amp; XML</h4>
<p>I recommend enabling all aspects of HTML minifying. This includes leaving the box for not minifying feeds unchecked (so that feeds get minified too).</p>
<h4>JS</h4>
<p>Some people report issues with minifying Javascript, so use this with caution. I&#8217;ve enabled it and it doesn&#8217;t appear to cause issues with my site. All you need to do is check the box to enable it; you can leave the other five options unchecked, unless you only want to combine Javascript files that appear within certain portions of the page (such as the header, or footer).</p>
<h4><a href="http://cdn.doitwithwp.com/files/2012/01/w3-total-cache-minify-settings-2.png"><img class="alignright size-medium wp-image-3158" title="W3 Total Cache CSS Minify Settings" src="http://serve.doitwithwp.com/files/2012/01/w3-total-cache-minify-settings-2-300x126.png" alt="W3 Total Cache CSS Minify Settings" width="300" height="126" /></a>CSS</h4>
<p>For the CSS section, you want to be sure to set it up as I&#8217;ve shown in the image, by <strong>prcoessing @import files</strong> (these are files that are imported into other CSS files by using the @import function &#8211; we want to minify those as well) and removing comments and line breaks. Leave Combine only unchecked, because we want to take it further than just combining the CSS files (we want to minify them as well).</p>
<h4>Advanced settings</h4>
<p>Again, you don&#8217;t need to fiddle around too much with this. You can fiddle with the garbage collection time if you want something more or less frequent than the default 86400 seconds (1 day) or specify rejected user agents or pages that shouldn&#8217;t be minified.</p>
<h3>Database cache settings</h3>
<p>In the general section, make sure that the option to not cache queries for logged-in users is checked. You want to be sure to have the latest version of your site every time it&#8217;s loaded.</p>
<h4>Advanced</h4>
<p>Again, there&#8217;s not too much to fiddle with here unless you have good reason to. As with other caches, you can set garbage collection times, expiration times and pages that shouldn&#8217;t be cached.</p>
<h3>Object cache settings</h3>
<p>As I mentioned earlier, it&#8217;s debatable whether this will even do you any good, but if you do enable it, you can pretty much leave the default settings as is. Not much else to say on that one!</p>
<h4 style="font-size: 13px;"><a href="http://files.doitwithwp.com/files/2012/01/w3-total-cache-browser-cache-settings-1.png"><img class="alignright size-medium wp-image-3163" style="border-style: initial; border-color: initial;" title="W3 Total Cache Browser Cache General Settings" src="http://cdn.doitwithwp.com/files/2012/01/w3-total-cache-browser-cache-settings-1-269x300.png" alt="W3 Total Cache Browser Cache General Settings" width="269" height="300" /></a></h4>
<h3>Browser cache settings</h3>
<p>This section is a bit more important and involved. It <strong>tells visitors&#8217; browsers how long to hold on to files it downloads</strong>. Here&#8217;s how I recommend setting it up:</p>
<h4>General</h4>
<p>Essentially, you want to ensure that you set every option for including information in the page header. However, you can leave the options for preventing caching objects after changing settings and not letting WordPress process 404s. It should look like it does in the image to the right.</p>
<h4>CSS &amp; JS, HTML &amp; XML, Media &amp; Other Files</h4>
<p><img class="alignright size-medium wp-image-3165" title="W3 Total Cache Browser Cache Specific Settings" src="http://serve.doitwithwp.com/files/2012/01/w3-total-cache-browser-cache-settings-2-274x300.png" alt="W3 Total Cache Browser Cache Specific Settings" width="274" height="300" /></p>
<p>All of these sections will essentially look exactly the same, making use of all the header information available. The only thing <strong>you&#8217;ll want to change is the expiration time in each section</strong>. I would set the expiration time for CSS and JS to 2,628,000 seconds (1 month), HTML and XML to 3600 seconds (1 hour) and Media &amp; Other Files to 31,536,000 seconds (1 year). You can adjust these based on how frequently you think these types of files are likely to change on your own site.</p>
<h3>CDN</h3>
<p>The Content Delivery Network section will depend on your specific CDN provider, but I have already created a separate tutorial for <a title="Set up W3 Total Cache with Amazon CloudFront CDN" href="http://www.doitwithwp.com/set-up-w3-total-cache-with-amazon-cloudfront-cdn/">setting up W3 Total Cache with a CDN</a> (Amazon Cloudfront in the example). Regardless of your provider though, the long and short of it is that you want to <strong>serve as much static content as possible from your CDN</strong> rather than your own server.</p>
<p>Once you set up your CDN (if you&#8217;re going to use one), you can <strong>head back to the General Settings page and enable all the components that you&#8217;re going to use</strong>. Then log out (since some components have purposely been disabled if you&#8217;re logged in) and browse your site. It should be immediately apparent how much faster your site is, but you can also perform some tests using <a title="Review page load speed" href="http://tools.pingdom.com" target="_blank">Pingdom Tools</a>, which is very useful for showing your page load speed.</p>
<p>So, did you get it set up successfully? What settings did you tweak and why? Are you having any issues? Let me know in the comments!</p>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/set-up-w3-total-cache-with-amazon-cloudfront-cdn/' rel='bookmark' title='Set up W3 Total Cache with Amazon CloudFront CDN'>Set up W3 Total Cache with Amazon CloudFront CDN</a></li>
<li><a href='http://www.doitwithwp.com/keep-track-of-load-times-using-googles-page-speed-api/' rel='bookmark' title='Keep Track of Load Times Using Google&#8217;s Page Speed API'>Keep Track of Load Times Using Google&#8217;s Page Speed API</a></li>
<li><a href='http://www.doitwithwp.com/speed-up-wordpress-free-amazon-cdn/' rel='bookmark' title='Make WordPress Lightning Quick with a Free CDN From Amazon'>Make WordPress Lightning Quick with a Free CDN From Amazon</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/mG0wzLX16Wm8tqR3Nvs9m7qs-J4/0/da"><img src="http://feedads.g.doubleclick.net/~a/mG0wzLX16Wm8tqR3Nvs9m7qs-J4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/mG0wzLX16Wm8tqR3Nvs9m7qs-J4/1/da"><img src="http://feedads.g.doubleclick.net/~a/mG0wzLX16Wm8tqR3Nvs9m7qs-J4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=rUgNcTMMMPQ:gfrL7NSldqg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=rUgNcTMMMPQ:gfrL7NSldqg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=rUgNcTMMMPQ:gfrL7NSldqg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=rUgNcTMMMPQ:gfrL7NSldqg:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=rUgNcTMMMPQ:gfrL7NSldqg:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/rUgNcTMMMPQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/speed-up-wordpress-with-w3-total-cache/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/speed-up-wordpress-with-w3-total-cache/</feedburner:origLink></item>
		<item>
		<title>2012 New Year’s WordPressolution</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/StgSnD-r14g/</link>
		<comments>http://www.doitwithwp.com/2012-new-years-wordpressolution/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 13:30:27 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[new year's resolution]]></category>
		<category><![CDATA[theme files]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=3172</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>As we move into 2012, I recommend following these few tips to help make running and managing your WordPress sites so much easier for you, including editing your WordPress themes and files.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/show-off-your-upcoming-posts-to-spark-interest/' rel='bookmark' title='Show off Your Upcoming Posts to Spark Interest'>Show off Your Upcoming Posts to Spark Interest</a></li>
<li><a href='http://www.doitwithwp.com/what-is-the-loop-wordpress/' rel='bookmark' title='What is the Loop?'>What is the Loop?</a></li>
<li><a href='http://www.doitwithwp.com/insert-the-current-datetime-in-posts-or-pages/' rel='bookmark' title='Insert the Current Date/Time in Posts or Pages'>Insert the Current Date/Time in Posts or Pages</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>It&#8217;s the New Year, a traditional time for <strong>resolving to make changes in our lives to better ourselves</strong> in the coming 12 months (and hopefully beyond).</p>
<p>Even though many of us stop going to the gym in about mid-February, there&#8217;s smaller changes that you can make in your life that are more manageable and realistic. Given that this blog is all about WordPress, it only seems fitting to write down a few &#8220;best practices&#8221; that you should try and adopt in order to make editing, managing and updating your blog a whole lot easier.</p>
<h3>Stop using functions.php</h3>
<p>It&#8217;s something that I mention frequently, but if ever you needed a kick up the bum to do this, now is the time. functions.php <em>should be</em> a file that is used by theme developers to define functions that manage and alter the way in which the theme appears and operates.</p>
<p>When we want to add or modify some functionality in our blog, we are often presented with snippets, which many people will <strong>tell you to put into functions.php</strong>, a habit which I want to help stop. <strong>This isn&#8217;t good</strong> because if you change or update your theme, any snippets you entered into functions.php will not be reflected in your new theme.</p>
<p><strong>The better way</strong> to handle adding these code snippets is to <a title="Create a Functionality Plugin Instead of Using Functions.php" href="http://www.doitwithwp.com/create-functions-plugin/">use a functionality plugin</a>. Do not be alarmed or overwhelmed; it&#8217;s actually very easy to create and you&#8217;ll be underway in about 10 minutes. Make the change now!</p>
<h3>Edit theme and plugin files more appropriately</h3>
<p>Once you start getting your feet wet in WordPress, you might start <strong>looking at your theme/plugin files and consider editing them</strong> to alter the appearance of your site slightly, whether it&#8217;s to <a title="Create Your Own Fast Social Sharing Buttons For WordPress" href="http://www.doitwithwp.com/add-sharing-buttons-to-wordpress-no-plugins-or-external-references/">add some social sharing buttons</a>, or to <a title="How To Show Featured Images in your WordPress Posts" href="http://www.doitwithwp.com/show-featured-image-wordpress-posts/">add featured images to your posts</a>.</p>
<p>There&#8217;s just a few tips that you should try and take on board which will help with managing your blog and keeping track of your edits:</p>
<h4>Use comments to remove portions</h4>
<p><strong>Never, ever, ever delete code</strong> from a theme file or plugin file. Instead, use comments; this is a way of basically saying &#8220;ignore this bit&#8221;. If you&#8217;re editing a PHP file, you can comment out a section by using /* and */ to denote the beginning and end of your commented section. So for example, in the following section of code from my own functionality plugin, the snippet for delaying publishing to my RSS feed is disabled:</p>
<pre class="brush: php; title: ; notranslate">

// Delay Publishing to RSS feed (disabled) //

/*
function publish_later_on_feed($where) {
 global $wpdb;
 if ( is_feed() ) {
 $now = gmdate('Y-m-d H:i:s');
 // value for wait; + device
 $wait = '5'; // integer
 $device = 'MINUTE'; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR
 $where .= &quot; AND TIMESTAMPDIFF($device, $wpdb-&gt;posts.post_date_gmt, '$now') &gt; $wait &quot;;
 }
 return $where;
}
add_filter('posts_where', 'publish_later_on_feed');
*/

// Remove nofollow from comment author links //

function make_comments_author_links_dofollow($str)
{
 $str = preg_replace(
 '~&lt;a ([^&gt;]*)\s*([&quot;|\']{1}\w*)\s*nofollow([^&gt;]*)&gt;~U',
 '&lt;a ${1}${2}${3}&gt;', $str);
 return str_replace(array(' rel=&quot;&quot;', &quot; rel=''&quot;), '', $str);
}
remove_filter('pre_comment_content', 'wp_rel_nofollow');
add_filter ('get_comment_author_link', 'make_comments_author_links_dofollow');</pre>
<h4>Make notes and explain your code</h4>
<p>You should also use comments to <strong>make notes in your code</strong> on what each line does, or on what each section of code is for. In the example above, you&#8217;ll see that there&#8217;s a comment before each of the snippets that specifies what each snippet is for, for easy reference when looking at the code in future.</p>
<p>If you&#8217;re a theme or plugin developer, you should also <strong>use comments to explain your code</strong>, so that anyone (including yourself) looking at the code in future to either understand or modify it, can see what everything does. As an example, the following is a section of code from my <a title="Show Off Upcoming Posts" href="http://www.doitwithwp.com/go/soup" target="_blank">SOUP widget</a>, which shows upcoming posts to your readers:</p>
<pre class="brush: php; title: ; notranslate">// Extract Args //

function widget($args, $instance) {
 extract( $args );
 $title = apply_filters('widget_title', $instance['title']); // the widget title
 $soupnumber = $instance['soup_number']; // the number of posts to show
 $posttype = $instance['post_type']; // the type of posts to show
 $postorder = $instance['post_order']; // Display newest first or random order</pre>
<p>As you can see, <strong>each line has an inline comment</strong> (marked by two slashes followed by the comment) explaining what it means, for easy reference during development and also for future modifications.</p>
<h3>Your own resolutions?</h3>
<p><strong>What resolutions have you made</strong> for running/editing your WordPress sites over the next year? What would you tell others to do?</p>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/show-off-your-upcoming-posts-to-spark-interest/' rel='bookmark' title='Show off Your Upcoming Posts to Spark Interest'>Show off Your Upcoming Posts to Spark Interest</a></li>
<li><a href='http://www.doitwithwp.com/what-is-the-loop-wordpress/' rel='bookmark' title='What is the Loop?'>What is the Loop?</a></li>
<li><a href='http://www.doitwithwp.com/insert-the-current-datetime-in-posts-or-pages/' rel='bookmark' title='Insert the Current Date/Time in Posts or Pages'>Insert the Current Date/Time in Posts or Pages</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/33z6yT3vfbX_puZXvT9vyFZY5q8/0/da"><img src="http://feedads.g.doubleclick.net/~a/33z6yT3vfbX_puZXvT9vyFZY5q8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/33z6yT3vfbX_puZXvT9vyFZY5q8/1/da"><img src="http://feedads.g.doubleclick.net/~a/33z6yT3vfbX_puZXvT9vyFZY5q8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=StgSnD-r14g:ytTG98hQdqY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=StgSnD-r14g:ytTG98hQdqY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=StgSnD-r14g:ytTG98hQdqY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=StgSnD-r14g:ytTG98hQdqY:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=StgSnD-r14g:ytTG98hQdqY:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/StgSnD-r14g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/2012-new-years-wordpressolution/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/2012-new-years-wordpressolution/</feedburner:origLink></item>
		<item>
		<title>Add a Column to Easily Note the Post ID</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/8rMjIUZEYN0/</link>
		<comments>http://www.doitwithwp.com/add-a-column-to-easily-note-the-post-id/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 13:00:44 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[post ID]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=3129</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>There's frequently occasion to want to know the Post ID and this snippet will give you an additional column in your posts list screen displaying it for easy access and reference.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/include-a-post-within-a-post-or-page/' rel='bookmark' title='Include a Post within a Post or Page'>Include a Post within a Post or Page</a></li>
<li><a href='http://www.doitwithwp.com/add-custom-post-types-to-rss-feed/' rel='bookmark' title='Add Custom Post Types to RSS Feed'>Add Custom Post Types to RSS Feed</a></li>
<li><a href='http://www.doitwithwp.com/color-code-wordpress-posts-by-status/' rel='bookmark' title='Color Code your WordPress Posts by Post Status in Admin'>Color Code your WordPress Posts by Post Status in Admin</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>After recently writing my post &#8220;<a title="Include a Post within a Page or Post" href="http://www.doitwithwp.com/include-a-post-within-a-post-or-page/">Include a Post within a Page or Post</a>&#8220;, I was in the process of writing a tutorial to give you <strong>an easier way to find the Post ID</strong>, by adding a column in the post editor screen.</p>
<p>Well, it seems that <a title="The original snippet" href="http://wpsnipp.com/index.php/functions-php/add-post-id-to-posts-pages-admin-columns/">WP Snipp</a> pipped me to the post as they just published a post doing exactly that. So rather than go through the rigmarole of writing the snippet myself, I&#8217;m going to give you his snippet. Drop it into your <a href="http://www.doitwithwp.com/create-functions-plugin/">functionality plugin</a> to use it:</p>
<pre class="brush: php; title: ; notranslate">// ADD COLUMN IN EDITOR FOR POST ID //

function posts_columns_id($defaults){
    $defaults['wps_post_id'] = __('ID');
    return $defaults;
}
function posts_custom_id_columns($column_name, $id){
	if($column_name === 'wps_post_id'){
        	echo $id;
    }
}

add_filter('manage_posts_columns', 'posts_columns_id', 5);
    add_action('manage_posts_custom_column', 'posts_custom_id_columns', 5, 2);
    add_filter('manage_pages_columns', 'posts_columns_id', 5);
    add_action('manage_pages_custom_column', 'posts_custom_id_columns', 5, 2);</pre>
<p>Now when you go to your posts (or pages) screen, you&#8217;ll see that <strong>there&#8217;s an additional column that shows your post ID</strong> for easy reference. Pretty handy huh? Thanks for the snippet Kevin.</p>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/include-a-post-within-a-post-or-page/' rel='bookmark' title='Include a Post within a Post or Page'>Include a Post within a Post or Page</a></li>
<li><a href='http://www.doitwithwp.com/add-custom-post-types-to-rss-feed/' rel='bookmark' title='Add Custom Post Types to RSS Feed'>Add Custom Post Types to RSS Feed</a></li>
<li><a href='http://www.doitwithwp.com/color-code-wordpress-posts-by-status/' rel='bookmark' title='Color Code your WordPress Posts by Post Status in Admin'>Color Code your WordPress Posts by Post Status in Admin</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/avACxtzFiL1dC6rPU7VZvJPcxlA/0/da"><img src="http://feedads.g.doubleclick.net/~a/avACxtzFiL1dC6rPU7VZvJPcxlA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/avACxtzFiL1dC6rPU7VZvJPcxlA/1/da"><img src="http://feedads.g.doubleclick.net/~a/avACxtzFiL1dC6rPU7VZvJPcxlA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=8rMjIUZEYN0:nvbXGoS1LlM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=8rMjIUZEYN0:nvbXGoS1LlM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=8rMjIUZEYN0:nvbXGoS1LlM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=8rMjIUZEYN0:nvbXGoS1LlM:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=8rMjIUZEYN0:nvbXGoS1LlM:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/8rMjIUZEYN0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/add-a-column-to-easily-note-the-post-id/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/add-a-column-to-easily-note-the-post-id/</feedburner:origLink></item>
		<item>
		<title>Set up W3 Total Cache with Amazon CloudFront CDN</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/on3p5xtrNig/</link>
		<comments>http://www.doitwithwp.com/set-up-w3-total-cache-with-amazon-cloudfront-cdn/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 13:00:21 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Speed]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[amazon cloudfront]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[w3 total cache]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=3018</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>A CDN is an excellent way of speeding up your site, by serving content from servers worldwide. This tutorials shows you how to set one up with Amazon CloudFront and W3 Total Cache.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/speed-up-wordpress-free-amazon-cdn/' rel='bookmark' title='Make WordPress Lightning Quick with a Free CDN From Amazon'>Make WordPress Lightning Quick with a Free CDN From Amazon</a></li>
<li><a href='http://www.doitwithwp.com/keep-track-of-load-times-using-googles-page-speed-api/' rel='bookmark' title='Keep Track of Load Times Using Google&#8217;s Page Speed API'>Keep Track of Load Times Using Google&#8217;s Page Speed API</a></li>
<li><a href='http://www.doitwithwp.com/win-a-25-amazon-gift-card-courtesy-of-rafflecopter/' rel='bookmark' title='Win a $25 Amazon Gift Card Courtesy of Rafflecopter'>Win a $25 Amazon Gift Card Courtesy of Rafflecopter</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>I wrote a post a number of months ago about <a title="Make WordPress Lightning Quick with a Free CDN From Amazon" href="http://www.doitwithwp.com/speed-up-wordpress-free-amazon-cdn/">using Amazon S3 to create a free CDN for your WordPress</a>. Someone at the time correctly commented that this wasn&#8217;t a true CDN, because <strong>a CDN has a number of servers all over the world with syndicated content from your website</strong>, whereas S3 stores your information on a single server, so all it serves to do is reduce the load on your own server.</p>
<p>After recognising this, I set about making the switch to <strong>CloudFront, which is Amazon&#8217;s CDN offering</strong>. I was initially skeptical about the cost, but in actual fact, despite having an increase in visitors in the months since doing this, my monthly cost has gone down by 50-75% (from my S3 hosting costs). I pay just a couple of bucks a month for my CDN as well as a chunk of S3 storage.</p>
<h3>Install W3 Total Cache</h3>
<p>In order to do this, you&#8217;ll need to install the magnificent <a title="W3 Total Cache" href="http://wordpress.org/extend/plugins/w3-total-cache/" target="_blank">W3 Total Cache plugin</a>. This plugin&#8217;s principal purpose is to cache your dynamic content into static pages to <strong>significantly speed up how quickly your site loads</strong> (and for this reason it is one of about two plugins that I will install on every single installation of WordPress). However, in the plugin&#8217;s development, they soon added the capability to use a CDN to further speed up your site by <strong>delivering your site&#8217;s static content (images and static files) from servers all over the world</strong>.</p>
<p>Install the plugin and activate it. The options for setting up the plugin are quite extensive, so I&#8217;ve covered that in a separate tutorial: <a title="Speed Up WordPress with W3 Total Cache" href="http://www.doitwithwp.com/speed-up-wordpress-with-w3-total-cache/">Speed Up WordPress with W3 Total Cache</a>.</p>
<p>Be sure not to get ahead of yourself. Do <span style="text-decoration: underline;">not</span> activate the CDN from the plugin&#8217;s General Settings yet. We&#8217;re going to set up the CDN so that everything&#8217;s ready and then turn it on; otherwise you&#8217;ll be telling the plugin to use a CDN that doesn&#8217;t exist and you&#8217;ll have loads of missing content. However, do be sure to <strong>select Amazon CloudFront (Pull) as your CDN provider</strong> and save your changes.</p>
<h3>Get set up with Amazon CloudFront</h3>
<p>Most of you will likely have an Amazon account. If not, you&#8217;ll have to go through a few more steps to get set up. Go to <a title="Amazon Web Services" href="http://aws.amazon.com" target="_blank">Amazon Web Services</a> and either create an account, or use your existing account to get signed in.</p>
<p>Once you&#8217;ve set up an account, go to your Account and go to the <a title="Amazon AWS Security Credentials" href="https://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key" target="_blank">Security Credentials section</a>. From there, <strong>create a new access key</strong> and keep the Access Key ID and Secret Access Key handy because you&#8217;ll need them later.</p>
<h3>Set up the CDN in W3 Total Cache</h3>
<p><a href="http://files.doitwithwp.com/files/2012/12/w3-total-cache-cdn-settings.png"><img class="alignright size-medium wp-image-3101" title="W3 Total Cache CDN Settings" src="http://cdn.doitwithwp.com/files/2012/12/w3-total-cache-cdn-settings-295x300.png" alt="Settings for your CDN in W3 Total Cache" width="295" height="300" /></a>Go to the <strong>CDN tab of the W3 Total Cache configuration page</strong>. In the General section, check every box, except for the last (Import external media library attachments). You don&#8217;t want to be storing other people&#8217;s data, unless you have concerns about the reliability of their servers.</p>
<p>In the next section (Configuration), you&#8217;ll need to enter your security credentials from Amazon AWS that we got earlier. You&#8217;ll then see a button for creating a distribution. Click on that to create the distribution within CloudFront. If you entered your details correctly, you&#8217;ll see a little message that says that the distribution was created successfully. You&#8217;ll also note that it will populate the field titled &#8220;Replace site&#8217;s hostname with&#8221; with your unique CloudFront subdomain. You can <strong>test the distribution</strong> to make sure everything is set up correctly.</p>
<h3>Activate the CDN</h3>
<p>You&#8217;re all set to activate the CDN now. Go back to W3 Total Cache General settings and enable the CDN. Load your site and check that it loads as expected. At this point, you now have a fully functional CDN running through Amazon CloudFront.</p>
<h3>Set up CNAMEs</h3>
<p>Stopping at this point is fine; everything works correctly and you&#8217;ve achieved what you set out to do. However, another nice touch that W3 Total Cache added was the ability to <strong>use CNAMEs for your CDN</strong>. What does that mean I hear you ask? Well, if you look at the URL of any of your images on your site with the CDN active, you&#8217;ll see that the location is some random subdomain on cloudfront.net. It works, but you can make it look more professional and also help SEO a little in the process by replacing the random CloudFront domain with your own domain.</p>
<p style="text-align: center;"><a href="http://static.doitwithwp.com/files/2012/12/cloudfront-cnames.png"><img class="size-large wp-image-3103 aligncenter" title="CloudFront CNAMEs" src="http://files.doitwithwp.com/files/2012/12/cloudfront-cnames-580x224.png" alt="Setting up CNAMEs for CloudFront" width="580" height="224" /></a></p>
<p>First of all, log in to your web host&#8217;s control panel and look for a DNS Zone Editor. Next you&#8217;ll need to <strong>create a CNAME for subdomains that you want to use in place of your CloudFront subdomain</strong>.</p>
<p>For example, on my site, I have created CNAMEs called cdn, cdn1, cdn2 through cdn7, which all point to my CloudFront subdomain. You could choose names like media, cdn, files, static or whatever you like. I recommend creating 8-10 though to spread your DNS/HTTP requests across multiple CNAMEs. See the image above for how I set it up in WebHost Manager:</p>
<div id="attachment_3097" class="wp-caption alignleft" style="width: 313px"><img class="size-full wp-image-3097" title="CNAMEs in AWS" src="http://static.doitwithwp.com/files/2012/12/aws-cnames.png" alt="Enter your CNAMEs in AWS" width="303" height="254" /><p class="wp-caption-text">Enter your CNAMEs in AWS</p></div>
<p>Once the CNAMEs are set up with your web host, go back to the <a title="AWS Console" href="https://console.aws.amazon.com/s3/home" target="_blank">AWS console</a>, find your CloudFront distribution and edit it. It will bring up a window where you can <strong>enter all the CNAMEs for your site</strong>. Enter them all here and save them. Then go back to your W3 Total Cache CDN configuration page and enter the same CNAMEs in place of your CloudFront subdomain that was automatically populated when you created your distribution earlier. See the image below for how to enter this information.</p>
<p style="text-align: left;">Then, make sure to <strong>test your CloudFront distribution to ensure that it is configured correctly</strong>. If the test passes, save everything and reload your site and make sure that (a) everything looks like it should and (b) your files are being served from your CNAMEs instead of your CloudFront subdomain.</p>
<p style="text-align: center;"><a href="http://cdn.doitwithwp.com/files/2012/12/w3-total-cache-cdn-cnames.png"><img class="aligncenter size-large wp-image-3098" title="W3 Total Cache CDN CNAMEs" src="http://cdn.doitwithwp.com/files/2012/12/w3-total-cache-cdn-cnames-580x389.png" alt="Enter your CNAMEs in W3 Total Cache" width="580" height="389" /></a></p>
<p style="text-align: left;">This whole tutorial seems imposing, but once you get into the swing of things, it really <strong>doesn&#8217;t take more than about 15 minutes</strong>. It makes such an improvement to your site speed, so it&#8217;s well worth your time and efforts. If you have any trouble with it, leave a comment and I&#8217;ll try and help you.</p>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/speed-up-wordpress-free-amazon-cdn/' rel='bookmark' title='Make WordPress Lightning Quick with a Free CDN From Amazon'>Make WordPress Lightning Quick with a Free CDN From Amazon</a></li>
<li><a href='http://www.doitwithwp.com/keep-track-of-load-times-using-googles-page-speed-api/' rel='bookmark' title='Keep Track of Load Times Using Google&#8217;s Page Speed API'>Keep Track of Load Times Using Google&#8217;s Page Speed API</a></li>
<li><a href='http://www.doitwithwp.com/win-a-25-amazon-gift-card-courtesy-of-rafflecopter/' rel='bookmark' title='Win a $25 Amazon Gift Card Courtesy of Rafflecopter'>Win a $25 Amazon Gift Card Courtesy of Rafflecopter</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/_kbaEdzm8JSd309pW82bnpyWIQU/0/da"><img src="http://feedads.g.doubleclick.net/~a/_kbaEdzm8JSd309pW82bnpyWIQU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_kbaEdzm8JSd309pW82bnpyWIQU/1/da"><img src="http://feedads.g.doubleclick.net/~a/_kbaEdzm8JSd309pW82bnpyWIQU/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=on3p5xtrNig:Bw3GmAleX8o:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=on3p5xtrNig:Bw3GmAleX8o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=on3p5xtrNig:Bw3GmAleX8o:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=on3p5xtrNig:Bw3GmAleX8o:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=on3p5xtrNig:Bw3GmAleX8o:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/on3p5xtrNig" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/set-up-w3-total-cache-with-amazon-cloudfront-cdn/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/set-up-w3-total-cache-with-amazon-cloudfront-cdn/</feedburner:origLink></item>
		<item>
		<title>Include a Post within a Post or Page</title>
		<link>http://feedproxy.google.com/~r/wanderingbrit/~3/_4yAKSe4K9o/</link>
		<comments>http://www.doitwithwp.com/include-a-post-within-a-post-or-page/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 13:00:36 +0000</pubDate>
		<dc:creator>Dave Clements</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[shortcode]]></category>

		<guid isPermaLink="false">http://www.doitwithwp.com/?p=3084</guid>
		<description><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>This snippet allows you to include the entire contents of another post or page within a post, page, or even the sidebar, through the use of a shortcode.</p>
Related posts:<ol>
<li><a href='http://www.doitwithwp.com/show-hide-part-wordpress-post-certain-time/' rel='bookmark' title='Show or Hide Part of your WordPress Post at a Certain Time'>Show or Hide Part of your WordPress Post at a Certain Time</a></li>
<li><a href='http://www.doitwithwp.com/add-custom-post-types-to-rss-feed/' rel='bookmark' title='Add Custom Post Types to RSS Feed'>Add Custom Post Types to RSS Feed</a></li>
<li><a href='http://www.doitwithwp.com/insert-the-current-datetime-in-posts-or-pages/' rel='bookmark' title='Insert the Current Date/Time in Posts or Pages'>Insert the Current Date/Time in Posts or Pages</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://www.doitwithwp.com/wp-content/plugins/oiopub-direct/js.php?type=banner&align=center&zone=4"></script></p><p>I&#8217;ve seen this question come up quite a few times:</p>
<blockquote><p>How do I put a post into another post?</p>
<p>How do I include a post inside a page?</p></blockquote>
<p>I always thought it was a really rookie question by people who didn&#8217;t understand WordPress and how it works. And I suppose that may still be true to a certain extent, but a couple of occasions have lent themselves to <strong>using this for legitimate needs</strong>.</p>
<p>For example, for one of my clients, they wanted to return their equivalent product if a user searched for a competitor&#8217;s product on their site. They wanted to return the usual product information, but wanted information at the top of the page explaining that the product shown below is the equivalent product for what they searched for and to look for the specific product number in the product literature. So below that, it was necessary to paste the entire product information post which already exists. So this was a good reason to use this ability.</p>
<p>I did a bit of searching and found a solution from the good people over at <a title="Digging Into WordPress" href="http://www.digwp.com" target="_blank">Digging Into WordPress</a>. It&#8217;s another snippet, so get your <a title="Create a Functionality Plugin Instead of Using Functions.php" href="http://www.doitwithwp.com/create-functions-plugin/">functionality plugin</a> ready:</p>
<pre class="brush: php; title: ; notranslate">function diww_include_post($atts) {
	$thepostid = intval($atts[id]);
	$output = '';
	query_posts(&quot;p=$thepostid&quot;);
	if (have_posts()) : while (have_posts()) : the_post();
		$output .= get_the_content($post-&gt;ID);
	endwhile; else:
		// failed, output nothing
	endif;
	wp_reset_query();

	return $output;
}

add_shortcode(&quot;include_post&quot;, &quot;diww_include_post&quot;);</pre>
<p>In short, what this snippet does is <strong>create a shortcode</strong> (include_post) in the last line, which has a single argument; the post ID (id, from line 2). The shortcode uses that post ID to find the appropriate post content and then returns that content in place of the shortcode.</p>
<p>The syntax for using the shortcode with the snippet above would be:</p>
<pre class="brush: plain; title: ; notranslate">[include_post id=&quot;3012&quot;]</pre>
<p>This will return the post content from post 3012 to wherever you paste it. That could be a post, page, a <a title="How and Why to Create Custom Post Types" href="http://www.doitwithwp.com/how-and-why-to-create-custom-post-types/">custom post type</a>, or even a <a title="How to Create a WordPress Widget from Scratch" href="http://www.doitwithwp.com/how-to-create-wordpress-widget-step-by-step/">sidebar widget</a>.</p>
<p>If you&#8217;re not sure <strong>how to get the post ID</strong>, go to your list of posts. When you edit one, the URL will include the post ID. In this example, the URL would look like this:</p>
<pre class="brush: plain; title: ; notranslate">.com/wp-admin/post.php?post=3012&amp;action=edit.</pre>
<p>(Alternatively, you could add a column to your posts editor which <a title="Show post ID in posts editor" href="http://www.doitwithwp.com/add-a-column-to-easily-note-the-post-id/">shows the post ID next to each post</a>.)</p>
<p>You could also use this functionality to create snippets of text that you <strong>use repeatedly and paste them into posts</strong>, or to paste common suggestions or disclaimers into posts, by creating posts specifically for those pieces of text and then using the shortcode to pull them into any other post. <strong>What have you used this for?</strong> I&#8217;m always interested to hear how you use these snippets.</p>
<p>Related posts:<ol>
<li><a href='http://www.doitwithwp.com/show-hide-part-wordpress-post-certain-time/' rel='bookmark' title='Show or Hide Part of your WordPress Post at a Certain Time'>Show or Hide Part of your WordPress Post at a Certain Time</a></li>
<li><a href='http://www.doitwithwp.com/add-custom-post-types-to-rss-feed/' rel='bookmark' title='Add Custom Post Types to RSS Feed'>Add Custom Post Types to RSS Feed</a></li>
<li><a href='http://www.doitwithwp.com/insert-the-current-datetime-in-posts-or-pages/' rel='bookmark' title='Insert the Current Date/Time in Posts or Pages'>Insert the Current Date/Time in Posts or Pages</a></li>
</ol></p>
<p><a href="http://feedads.g.doubleclick.net/~a/BIgAq6vgVn-p-IWgnOEBn9IXMnA/0/da"><img src="http://feedads.g.doubleclick.net/~a/BIgAq6vgVn-p-IWgnOEBn9IXMnA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/BIgAq6vgVn-p-IWgnOEBn9IXMnA/1/da"><img src="http://feedads.g.doubleclick.net/~a/BIgAq6vgVn-p-IWgnOEBn9IXMnA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=_4yAKSe4K9o:yXd0Jz7uBak:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=_4yAKSe4K9o:yXd0Jz7uBak:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=_4yAKSe4K9o:yXd0Jz7uBak:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/wanderingbrit?a=_4yAKSe4K9o:yXd0Jz7uBak:RiqZV_n2gpk"><img src="http://feeds.feedburner.com/~ff/wanderingbrit?i=_4yAKSe4K9o:yXd0Jz7uBak:RiqZV_n2gpk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/wanderingbrit/~4/_4yAKSe4K9o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.doitwithwp.com/include-a-post-within-a-post-or-page/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.doitwithwp.com/include-a-post-within-a-post-or-page/</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 2639/2849 objects using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: static.doitwithwp.com

Served from: www.doitwithwp.com @ 2012-02-06 10:50:56 -->

