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

<channel>
	<title>artofsimplicity.co.uk &#187; wordpress</title>
	<atom:link href="http://artofsimplicity.co.uk/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://artofsimplicity.co.uk</link>
	<description>Textual Utterances</description>
	<lastBuildDate>Wed, 22 May 2013 09:28:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>WordPress All-in-One SEO Pack PHP Error</title>
		<link>http://artofsimplicity.co.uk/wordpress-all-in-one-seo-pack-php-error/</link>
		<comments>http://artofsimplicity.co.uk/wordpress-all-in-one-seo-pack-php-error/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 10:40:23 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/?p=357</guid>
		<description><![CDATA[The All-in-One SEO pack made by Semper Fi Web Design is a WordPress plugin that is used by innumerable blogs and websites all over the Internet. It&#8217;s popular because it promises that strange SEO voodoo at the click(s) of a mouse and a few taps of a keyboard through the magic of the WordPress plugin. [...]]]></description>
			<content:encoded><![CDATA[<p>The All-in-One SEO pack made by Semper Fi Web Design is a WordPress plugin that is used by innumerable blogs and websites all over the Internet.</p>
<p>It&#8217;s popular because it promises that strange SEO voodoo <span id="more-357"></span>at the click(s) of a mouse and a few taps of a keyboard through the magic of the WordPress plugin.</p>
<p>It&#8217;s easy to install and relatively easy to setup if you already know all your SEO terminology.</p>
<p>So, I&#8217;m not a big fan of the plugin. From what I could work out, 98% of the features it provides really should be baked-in to any half-decent website.</p>
<p>The value is no doubt for those that either don&#8217;t have the tech-savvy to build such features into their websites or maybe because of shared or limited hosting access can&#8217;t tinker with the raw HTML/CSS/PHP of their website.</p>
<p>After installing the <a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/" title="All-in-One SEO" target="_blank">All-in-One SEO Pack</a> (v1.6.13.8) plugin on WordPress v3.3.1 for the first time, I get this error message on the front-end:</p>
<pre>
Notice: Undefined index: aiosp_ex_pages in /var/www/wp-content/plugins/all-in-one-seo-pack/aioseop.class.php on line 118
Notice: Undefined index: aiosp_ex_pages in /var/www/wp-content/plugins/all-in-one-seo-pack/aioseop.class.php on line 118
</pre>
<p>Travelling to line 118 in <code>aioseop.class.php</code> I get to see:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">function</span> aioseop_mrt_exclude_this_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$aioseop_options</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$currenturl</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">/*		echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
			echo $aioseop_options['aiosp_ex_pages'];
			echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
*/</span>
&nbsp;
			<span style="color: #000088;">$excludedstuff</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">','</span><span style="color: #339933;">,</span><span style="color: #000088;">$aioseop_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'aiosp_ex_pages'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$excludedstuff</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$exedd</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">//echo $exedd;</span>
			    <span style="color: #000088;">$exedd</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$exedd</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$exedd</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">stristr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$currenturl</span><span style="color: #339933;">,</span> <span style="color: #000088;">$exedd</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			                    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>From a quick look it seems like there is no check to see whether or not they index/key <code>aiosp_ex_pages</code> existing within the <code>$aioseop_options</code> variable, which it most likely would not following a fresh install.</p>
<p>Quick fix, should be just to add a conditional statement to check if that index/key is in fact set before looping over it.</p>
<p>See fixed code below:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">function</span> aioseop_mrt_exclude_this_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$aioseop_options</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$currenturl</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">/*		echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
			echo $aioseop_options['aiosp_ex_pages'];
			echo &quot;&lt;br /&gt;&lt;br /&gt;&quot;;
*/</span>
			<span style="color: #666666; font-style: italic;">// check for existence of key.</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$aioseop_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'aiosp_ex_pages'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$excludedstuff</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">','</span><span style="color: #339933;">,</span><span style="color: #000088;">$aioseop_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'aiosp_ex_pages'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$excludedstuff</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$exedd</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
					<span style="color: #666666; font-style: italic;">//echo $exedd;</span>
					<span style="color: #000088;">$exedd</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$exedd</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$exedd</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
								<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">stristr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$currenturl</span><span style="color: #339933;">,</span> <span style="color: #000088;">$exedd</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
									<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>That should silence those notice errors. Of course you could bury your head in the sand and just turn all error messages off so you don&#8217;t even see this, but that wouldn&#8217;t be good web development, would it?</p>
<p>Any questions/comments, drop a line below.</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/wordpress-all-in-one-seo-pack-php-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update WordPress URLs after moving folder</title>
		<link>http://artofsimplicity.co.uk/update-wordpress-urls-after-moving-folder/</link>
		<comments>http://artofsimplicity.co.uk/update-wordpress-urls-after-moving-folder/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 11:10:23 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/?p=351</guid>
		<description><![CDATA[If you&#8217;ve ever had to move a WordPress website from one folder to another or one server to another or from a development environment to a production/live environment &#8211; whichever scenario you&#8217;ve probably had the trouble of ensuring the URLs survive the transition. Normally, you can handle this in one of two ways. The first [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever had to move a WordPress website from one folder to another or one server to another or from a development environment to a production/live environment &#8211; whichever scenario you&#8217;ve probably had the trouble of ensuring the URLs survive the transition.</p>
<p>Normally, you can handle this in one of two ways. <span id="more-351"></span>The first is do a fresh install of WordPress at the new location, exporting your old data from the previous site and then re-importing into the fresh install. This carries with it it&#8217;s own set of issues but is a viable option. The main problem though is the concurrency of the two databases when it comes time for fixing or maintenance.</p>
<p>The second is you can copy the whole site and transplant it, database, files and all. The problem with this approach is unless your previous environment was identical to the location you were moving it to, your links would now be broken.</p>
<p>The easiest way to fix this (I&#8217;m found so far) is to execute a few SQL statements on the database in question. It&#8217;s effectively a find and replace. The main tables to take note of (as of WordPress 3.3.x) is wp_posts and wp_options.</p>
<p>Note: I&#8217;m assuming you&#8217;ve backup anyway before running these statements on your database.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> guid <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>guid<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://localhost/'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://example.com/'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>post_content<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://localhost/'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://example.com/'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_excerpt <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>post_excerpt<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://localhost/'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://example.com/'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_options <span style="color: #993333; font-weight: bold;">SET</span> option_value <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>option_value<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://localhost/'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://example.com/'</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Any questions? Drop a message below.</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/update-wordpress-urls-after-moving-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress FTP Auto Upgrade on Ubuntu</title>
		<link>http://artofsimplicity.co.uk/wordpress-ftp-auto-upgrade-on-ubuntu/</link>
		<comments>http://artofsimplicity.co.uk/wordpress-ftp-auto-upgrade-on-ubuntu/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 12:53:51 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[vsftpd]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/?p=345</guid>
		<description><![CDATA[For a while now I&#8217;ve been trying to find a conveninent way to keep my WordPress blog plugins, themes and platform up-to-date with the steady stream of patches and fixes that keep being rolled out. More often than not, upgrading your WordPress platform can be a pain because it will involve various steps to ensure [...]]]></description>
			<content:encoded><![CDATA[<p>For a while now I&#8217;ve been trying to find a conveninent way to keep my WordPress blog plugins, themes and platform up-to-date with the steady stream of patches and fixes that keep being rolled out.<span id="more-345"></span></p>
<p>More often than not, upgrading your WordPress platform can be a pain because it will involve various steps to ensure you don&#8217;t accidentally screw-up your entire site and database. And there is nothing wrong with it because backing-up your important data is always a good idea.</p>
<p>The annoying part is downloading the latest version of WordPress and then uploading those files to your server, ensuring you don&#8217;t accidentally overwrite your themes or plugins etc.</p>
<p>Using the built-in support for auto-upgrading via FTP is quite slick within WordPress 3.x and I&#8217;m sure will only improve.</p>
<p>I managed to be able to update WordPress from within the admin area using the following commands:</p>
<p>In this example I&#8217;m using VSFTPd as my FTP server and I&#8217;ve chosen to create a new user called &#8216;wordpress&#8217;.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> vsftpd
<span style="color: #c20cb9; font-weight: bold;">sudo</span> useradd wordpress
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">passwd</span> wordpress <span style="color: #666666; font-style: italic;"># set password for wordpress when prompted.</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> usermod <span style="color: #660033;">-g</span> www-data wordpress
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> g+<span style="color: #c20cb9; font-weight: bold;">w</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">passwd</span> <span style="color: #666666; font-style: italic;"># change wordpress home to be: /var/www</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> service vsftpd restart
<span style="color: #c20cb9; font-weight: bold;">sudo</span> service apache2 restart</pre></td></tr></table></div>

<p>Hopefully those commands should be self-explanatory but if you need clarification, drop a comment and I&#8217;ll try and make it plain.</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/wordpress-ftp-auto-upgrade-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress 3.1 infinite redirect after upgrade on Windows server</title>
		<link>http://artofsimplicity.co.uk/wordpress-3-1-infinite-redirect-after-upgrade-on-windows-server/</link>
		<comments>http://artofsimplicity.co.uk/wordpress-3-1-infinite-redirect-after-upgrade-on-windows-server/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 12:17:39 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/?p=327</guid>
		<description><![CDATA[Today we stumpled accross a strange bug in WordPress v3.1, which at the time (of typing) is they the most recent version of WordPress. The problem was that we had a never ending redirect loop on the homepage after upgrading from WordPress 3.0 to 3.1. The hosting environment seems be the cause of the issue [...]]]></description>
			<content:encoded><![CDATA[<p>Today we stumpled accross a strange bug in WordPress v3.1, which at the time (of typing) is they the most recent version of WordPress.</p>
<p>The problem was that we had a never ending redirect loop on the homepage after upgrading from WordPress 3.0 to 3.1.<span id="more-327"></span></p>
<p>The hosting environment seems be the cause of the issue as after the upgrading on a local development environment which is effectively a WAMP stack (Windows XP running Apache etc.), there were no visible problems.</p>
<p>When making these changes to the live site, there would be a never ending redirect loop.</p>
<p>The production environment is a Windows Server 2003 (R2 Standard x64 Edition) running IIS6 with an ISAPI filter called <a title="WordPress URL Rewrite" href="http://www.binaryfortress.com/WordPress-URL-Rewrite/" target="_blank">WordPress URL Rewrite</a> (v1.0) which gives us search engine friendly (SEF) URLs on IIS.</p>
<p>We eventually stumbled upon this thread in the WordPress forums:<br />
<a title="Windows server infinite redirect after upgrading to 3.1" href="http://wordpress.org/support/topic/windows-server-infinite-redirect-after-upgrading-to-31" target="_blank">Windows server infinite redirect after upgrading to 3.1</a></p>
<p>At the moment there is no clear solution other than to disable the redirecting feature which appears to be the canonical redirect feature. The ISAPI filter must interfere with this process causing the perpetual redirecting.</p>
<p>A simple fix, you can add the following snippet to disable the canonical URL redirect features of <a title="Migrating Plugins and Themes to 2.3" href="http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.3#Canonical_URLs" target="_blank">WordPress 2.3 and above</a>. All credit to Mark Jaquith (@markjaquith) for coming up the original idea.</p>
<p>If you have a custom theme, the best place for this snippet would be at the top of your functions.php so that you can remove it once WordPress releases an update that fixes this issue.</p>
<p>If you are really lazy or not sure what your doing, there is a WordPress plugin by Nick Schalk and Chris Cheney that will pretty much do this for you. You can grab it here: <a title="Permalink Fix &amp; Disable Canonical Redirects Pack" href="http://wordpress.org/extend/plugins/permalink-fix-disable-canonical-redirects-pack/" target="_blank">Permalink Fix &amp; Disable Canonical Redirects Pack</a></p>
<p>Keep in mind that this fix worked for the environment we experienced this problem on, but it may be relevant if have a similar setup and you are seeing a similar issue.</p>
<p>If you have come across a better solution, please do let us know.</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/wordpress-3-1-infinite-redirect-after-upgrade-on-windows-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Get the parent slug of a post in WordPress</title>
		<link>http://artofsimplicity.co.uk/get-the-parent-slug-of-a-post-in-wordpress/</link>
		<comments>http://artofsimplicity.co.uk/get-the-parent-slug-of-a-post-in-wordpress/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 12:00:57 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/?p=218</guid>
		<description><![CDATA[I&#8217;ve been doing a little more WordPress (v2.9.2) hacking as a new project required a little more CMS-like control over a website than WordPress by default provides. As a result I&#8217;ve resorted to extending WordPress and the results have been pretty encouraging already. I have to say, for the record, that the WordPress team has [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a little more WordPress (v2.9.2) hacking as a new project required a little more CMS-like control over a website than WordPress by default provides.</p>
<p>As a result I&#8217;ve resorted to extending WordPress and the results have been pretty encouraging already. I have to say, for the record, that the WordPress team has made extending the WordPress platform a breeze through custom plug-ins and hooks.</p>
<p>OK. Enough WordPress appreciation and on to the reason for the post.<span id="more-218"></span></p>
<p>I recently needed a quick and easy way to get the slug for a post parent. </p>
<p>The site I&#8217;m working on has a series of sub/mini-sites under the root directory, meaning that there will be multiple homepages for each of the sub-sites and each sub-site will have it&#8217;s own navigation options.</p>
<p>As a result, I needed a quick way of determining which sub-site a &#8216;home&#8217; slug returned for the current page belonged to. Now, the way I had structured the pages in WordPress was by creating a separate &#8216;home&#8217; page for each sub-site as a page of the root site so the URL&#8217;s would be:</p>
<p>[root directory] http://artofsimplicity.co.uk/<br />
[sub-site 1] http://artofsimplicity.co.uk/sub-site-1/home/<br />
[sub-site 2] http://artofsimplicity.co.uk/sub-site-2/home/</p>
<p>The way I went about doing this was to retrieve the slug for the parent page, which would either return &#8216;sub-site-1&#8242; or &#8216;sub-site-2&#8242;.</p>
<p>Achieving this was quite straightforward with the following snippet of PHP code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// retrieve the page slug.</span>
	<span style="color: #000000; font-weight: bold;">function</span> get_post_slug<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_parent</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// WordPress global $post</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_parent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
			<span style="color: #000088;">$parent</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_parent</span><span style="color: #339933;">,</span> OBJECT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// get the post data.</span>
&nbsp;
			<span style="color: #000088;">$slug</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$parent</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_name</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// get the post_name/slug</span>
&nbsp;
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$slug</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_name</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// if not a post_parent the post_name/slug for the current page will already be accessible.</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$slug</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// same function as above but wrapped up in a new function for convenience.</span>
	<span style="color: #000000; font-weight: bold;">function</span> get_post_parent_slug<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// WordPress global $post</span>
&nbsp;
		<span style="color: #b1b100;">return</span> get_post_slug<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// once the current post data is loaded you can retrieve the post_parent ID to retrieve that posts post_name/slug.</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Maybe this simple little snippet will help those trying to achieve a similar effect in WordPress.</p>
<p>At the time of writing WordPress 3.0 has just been released so we&#8217;ll see if it&#8217;s no longer needed in new version.</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/get-the-parent-slug-of-a-post-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Auto-Upgrade Problems</title>
		<link>http://artofsimplicity.co.uk/wordpress-auto-upgrade-problems/</link>
		<comments>http://artofsimplicity.co.uk/wordpress-auto-upgrade-problems/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 09:05:43 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[1and1]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/?p=169</guid>
		<description><![CDATA[As a little memo to myself and for anyone else who is having trouble getting the WordPress automatic upgrade feature working, particularly if your on a Linux (CentOS 5) VPS with 1and1. I have great admiration for the WordPress auto-upgrade feature particularly as it saves you loads of time especially if you administer a number [...]]]></description>
			<content:encoded><![CDATA[<p>As a little memo to myself and for anyone else who is having trouble getting the WordPress automatic upgrade feature working, particularly if your on a Linux (CentOS 5) VPS with <a href="http://bit.ly/gethosting" title="Get 1and1 Hosting">1and1</a>.</p>
<p>I have great admiration for the <a href="http://codex.wordpress.org/Upgrading_WordPress" title="Link to WordPress auto-upgrade feature on Codex">WordPress auto-upgrade feature</a> particularly as it saves you loads of time especially if you administer a number of WordPress based websites not to mention your own blog.<br />
<span id="more-169"></span><br />
The convenience of the auto-upgrade is obvious, although most people quite rightly would prefer to manually upgrade a WordPress installation particularly if the installation is heavily customised. Needless to say, the auto-upgrade feature does not negate the usually and <strong>very necessary</strong> manual backup of your database and your wp-content folder if you&#8217;ve installed a number of themes and plugins, but once you&#8217;ve done so it&#8217;s nice to let WordPress do the rest of the hard work.</p>
<p>For a while on this blog, when I attempt to do the automatic WordPress upgrade I am greeted with the FTP login details screen, asking me for my username and password to allow the download and upgrade of the WordPress installation to happen. On other websites (some running on a Windows server) this is interstitial page doesn&#8217;t even show up and the upgrade happens virtually instantly, no FTP login details screen, just straight to the downloading and upgrade. So&#8217;ve I&#8217;ve been wondering how to get this working for my own blog on a Linux distro.</p>
<p>I stumbled across this well written blog post on &#8216;<a href="http://www.chrisabernethy.com/why-wordpress-asks-connection-info/" title="Read his blog post on: Why WordPress Asks for Connection Info">Why WordPress Asks for Connection Info</a>&#8216;,  the main problem is a ownership/permissions issue and this can be quite quickly corrected if you know what process Apache runs as on your server. </p>
<p>Some blogs have mentioned it to run as <code>www</code> or <code>httpd</code>, but for me and I&#8217;m guessing other <a href="http://bit.ly/gethosting" title="Get 1and1 Hosting">1and1</a> users it is most likely running as <code>apache</code> but there is a quick and easy way of finding out, by running the following PHP script:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;whoami&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Once you know what name Apache goes by, you need only login to your server via SSH as root and change the ownership of the WordPress installation directory to Apache, but wait &#8211; there is a catch, going ahead and changing the ownership of the directory to just Apache will prevent you from making any changes to the directory if your not Apache, so if you login via FTP and you want to upload some new plugins or themes, you won&#8217;t be able to.</p>
<p>To ensure you and Apache have the correct permissions you need to know what your username is and this can be easy if you login by FTP as any decent FTP client, such as FileZilla, will show the owner of the directory when you login.</p>
<p>In case your not sure, you can find all the usernames within <code>/etc/passwd</code> but once you know you then need to navigate from the root directory to your website directory where the actual files and the WordPress installation directory is found. In case your not sure it would most likely be something like <code>/var/www/vhosts/mywebsite.co.uk/httpdocs/</code> for 1and1 Linux VPS users.</p>
<p>Once you know where you are and what your username is, you can run the following command via SSH as root:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> yourusername:apachegroupname wordpressdirectory</pre></td></tr></table></div>

<p>What this line does is it changes the file owner and group for all files and folders in  subdirectories of the directory <code>wordpressdirectory</code>, i.e. recursively. So for me, assuming I&#8217;m already in the website folder at <code>/var/www/vhosts/artofsimplicity.co.uk/httpdocs/</code> it would be something like:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> artofsimplicity:apache blog</pre></td></tr></table></div>

<p>That should be it. WordPress may still ask you for the FTP password but it should have no problems upgrading the installation or upgrading any plugins that have updates without you needing to do anything else (I&#8217;m assuming you&#8217;ve already backed up anything you wouldn&#8217;t want to lose).</p>
<p>If you&#8217;re still having issues, drop a line below and I&#8217;ll try and help or let me know if the above has been helpful for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/wordpress-auto-upgrade-problems/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Moving WordPress Installations</title>
		<link>http://artofsimplicity.co.uk/moving-wordpress-installations/</link>
		<comments>http://artofsimplicity.co.uk/moving-wordpress-installations/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 13:00:54 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/?p=147</guid>
		<description><![CDATA[If you are managing lots of WordPress installations for different clients, or any other content management system for that matter (eg. Joomla!, Drupal etc.), you need a way to deploy changes quickly and easily. A problem or annoyance that I come across is when I need to move a development site from my local development [...]]]></description>
			<content:encoded><![CDATA[<p>If you are managing lots of WordPress installations for different clients, or any other content management system for that matter (eg. Joomla!, Drupal etc.), you need a way to deploy changes quickly and easily.<span id="more-147"></span></p>
<p>A problem or annoyance that I come across is when I need to move a development site from my local development environment to an online test area/server where clients can view their website in an online environment, which will operate very differently to just running the same set of files on your own computer which more than likely has a perfectly tuned settings so you can do just about everything.</p>
<p>A very basic tip is for moving your database from your local database to an online database. WordPress already makes this pretty easy and so you could quite easily get away with creating a fresh install each time but after a while even that becomes time consuming as then you need to set the same settings as you have on your local development site.</p>
<p>This becomes even more problematic, doing a manual/fresh install, when you use WordPress as a CMS more than just blogging software as sometimes you may build pages that retrieve information based on a specific post ID. With the ID&#8217;s being automatically assigned, you cannot always guarantee you&#8217;ll get the same ID&#8217;s even if you set up all the pages and all the content in the same order. In part, this is because of the WordPress auto-saving feature which will save a draft, taking up another ID. This will quickly lead to a mismatch in your preconfigured code which cites specific ID&#8217;s for specific pages and the actual ID&#8217;s that are assigned to the content you are creating.</p>
<p>The way I like to avoid this is by importing the whole MySQL WordPress database from my local development site into my online MySQL database where my live test site will be running.</p>
<p>The main problem with doing this is that all the URLs in the database will refer to &#8216;http://localhost/&#8217; but now with the site being online, I need to change the base of the URL across all the content and especially in the settings of the website, otherwise the website will not work or the results may be unpredictable.</p>
<p>A quick way to rectify this is directly via the database using the SQL Update statement. While using phpMyAdmin is highly recommended for doing this it is equally possible to do this via the command line if you have the necessary know-how!</p>
<p>The three main SQL queries you&#8217;ll be needing are the following:</p>
<p>SQL Query 1: Updating your WordPress Posts Permalinks</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> guid <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>guid<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://localhost/'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://mydemosite.com/'</span><span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

<p>The above query will update all you post content for your WordPress install changing every occurrence of &#8216;http://localhost/&#8217; in your post guid to &#8216;http://mydemosite.com/&#8217;. You may argue that if you are using WordPress as a straight CMS you won&#8217;t need to worry about this, which is partly true, but should you use it for both a CMS and to provide a blogging platform, your going to need to change the permalinks for all the posts across the entire site. After all if your using RSS you want people to be redirect to actual post and not some 404 page on some other website.</p>
<p>SQL Query 2: Updating your WordPress Options/Settings</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_options <span style="color: #993333; font-weight: bold;">SET</span> option_value <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>option_value<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://localhost/'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://mydemosite.com/'</span><span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

<p>This query is necessary for the main running of the website. It is where you main homepage URL is stored along with a few other important fields that help index your website correctly. If your sending indexing services the wrong URL it&#8217;s not going to help your chances of your website in the search engine stakes at all. There may be additional rows in this table if you have certain plugins installed.</p>
<p>SQL Query 3: Updating the installation path</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_options <span style="color: #993333; font-weight: bold;">SET</span> option_value <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>option_value<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'C:<span style="color: #000099; font-weight: bold;">\h</span>tdocs<span style="color: #000099; font-weight: bold;">\m</span>ywebsite<span style="color: #000099; font-weight: bold;">\n</span>ews/wp-content/uploads'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'/homepages/1/a123456789/htdocs/mywebsite/wp-content/uploads'</span><span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

<p>If like myself you work on a Win32 platform but prefer to host your websites on a Linux server, you&#8217;ll definitely need to do this. If your development environment and your server are both Win32 platforms you&#8217;ll have to worry about this a little less if you&#8217;ve configured them identically, but more often than not, they won&#8217;t be identical.</p>
<p>This path is crucial for your WordPress cache and for uploading and storing content like images to accompany your posts as you need to get the absolute installation directory of the folder as it is on the server. This will be different between a Win32/Windows XP and a Linux or Mac environment.</p>
<p>While the basic principle is simple, effectively using the UPDATE SQL statement for updating whole tables, it will save you a lot of time if its something your likely to do on a regular basis.</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/moving-wordpress-installations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inserting an exported MySQL dump via Command Line</title>
		<link>http://artofsimplicity.co.uk/inserting-an-exported-mysql-dump-via-command-line/</link>
		<comments>http://artofsimplicity.co.uk/inserting-an-exported-mysql-dump-via-command-line/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 12:43:53 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/?p=136</guid>
		<description><![CDATA[If you are a developer, no doubt you have a local development environment in which you build your website projects, testing every function, every change to make sure that once it&#8217;s ready to go live, you can upload the files and in preparation for launch. Once you get a few projects under your belt, and [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a developer, no doubt you have a local development environment in which you build your website projects, testing every function, every change to make sure that once it&#8217;s ready to go live, you can upload the files and in preparation for launch.</p>
<p>Once you get a few projects under your belt, and especially where using fully featured Content Management Systems (CMS) like <a title="Joomla!" href="http://www.joomla.org/">Joomla!</a> or <a title="WordPress.org" href="http://wordpress.org/">WordPress</a>, where you can make 60-70% of the changes you need directly through the back-end administration, you&#8217;ll find your local/development version of your website quickly becomes out of date in comparison to the live site.<span id="more-136"></span></p>
<p>This is the point I discovered myself at recently (again) and what I normally do at this point is do a quick update to my local site by copy all files directly from the live site to my testing server but that&#8217;s the easy bit. The hard part to all this is copying the database from the live site to the local site which is where much of the configurations are stored, rather than the static files which you&#8217;ve already copied to your hard drive.</p>
<p>If you have been working with MySQL for any length of time, I hope you&#8217;ve come accross <a title="phpMyAdmin Homepage" href="http://www.phpmyadmin.net/home_page/index.php" target="_blank">phpMyAdmin</a>, which for the uninitiated, is quite possibly <em>the</em> best  open source tool written in PHP and it allows you to handle the administration of MySQL databases over the Internet in a web browser.</p>
<p>Well, using phpMyAdmin, you can quite easily export the entire database to a .SQL dump file, which for my particular project was well over 50MB of pure data. This will take a few minutes to download, depending on your connection speed, but the problem is importing any large file into your local MySQL database where you do all your testing. Now, I don&#8217;t have exact limits, but uploading large files through web browsers is fraught with problems, most notably because most have a tendency to timeout after a specified period of time, and for files much larger than 50MB, that presents a real problem.</p>
<p>I&#8217;ll admit that there are ways around this, such as altering timeout settings on the script running the upload or changing the browser settings itself but there is an easier way to this, and I&#8217;m going to explain how (hopefully).</p>
<p>The easiest way to do it is via the command line on your computer. Now I know many beginners will at that moment freak out but it&#8217;s easier than you might think.</p>
<p><strong>Step 1: </strong>Fire up the Command Prompt through: <code>Start &gt; Run</code> and then type &#8216;<code>cmd</code>&#8216; and hit Enter/Return.</p>
<p><strong>Step 2: </strong>Navigate to the directory where <code>MySQL.exe</code> is running. For XAMPP users, it&#8217;s probably <code>C:\xampp\mysql\bin\</code></p>
<p><strong>Step 3:</strong> Copy SQL file (lets call it dump.sql) that you exported (from your live database) to the same folder as where MySQL.exe is running. Copying it to any folder is fine but if it&#8217;s in the same folder it makes the commands easier.</p>
<p><strong>Step 4: </strong>Type the following and hit Enter/Return: <code>mysql -u [USERNAME] -p -h [HOSTNAME] [DATABASE] &lt; [FILE]</code></p>
<p>As an example, the command for Step 4, may look something like this:  <code>mysql -u root -p -h localhost employees_database &lt; new_employees.sql</code></p>
<p><strong>Step 5: </strong>Once you hit Enter/Return, you&#8217;ll be prompted for the password associated with the <code>[USERNAME]</code> you gave in the command.</p>
<p><strong>Step 6: </strong>Wait. If it&#8217;s a large file you won&#8217;t see anything happen but what you&#8217;re waiting for is a new command line to appear which is when you know the command has been processed. e.g.: <code>C:\xampp\mysql\bin&gt;</code></p>
<p>Well, that&#8217;s pretty much it. Head over to your local installation of phpMyAdmin to check all the tables are there. Remember to make backups of backups before you export or import or change anything. It costs nothing to be a little more cautious when handling large volumes of data.</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/inserting-an-exported-mysql-dump-via-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read more style link on WordPress</title>
		<link>http://artofsimplicity.co.uk/read-more-style-link-on-wordpress/</link>
		<comments>http://artofsimplicity.co.uk/read-more-style-link-on-wordpress/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 19:13:03 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/2008/12/20/read-more-style-link-on-wordpress/</guid>
		<description><![CDATA[I struggled to find the setting that displayed a shortened version of my posts and showed a &#8216;read more&#8217; style link to the rest of the content. I think these simple touches help to keep the frontpage clear, digestable and tidy in general and encourages users to go further investigate the site. Thanks to Skeedio [...]]]></description>
			<content:encoded><![CDATA[<p>I struggled to find the setting that displayed a shortened version of my posts and showed a &#8216;read more&#8217; style link to the rest of the content.</p>
<p>I think these simple touches help to keep the frontpage clear, digestable and tidy in general and encourages users to go further investigate the site. <span id="more-31"></span></p>
<p>Thanks to Skeedio for their <a title="Skeedio.com - Read more link" href="http://www.skeedio.com/content/article/read-more-wordpress/" target="_blank">helpful blog post</a> showing exactly how its done.</p>
<p>Anyone know of how you can enable this by default after reaching a threshold of certain number of characters?</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/read-more-style-link-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Twitter Tools Test</title>
		<link>http://artofsimplicity.co.uk/the-twitter-tools-test/</link>
		<comments>http://artofsimplicity.co.uk/the-twitter-tools-test/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 18:06:29 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://artofsimplicity.co.uk/2008/12/20/the-twitter-tools-test/</guid>
		<description><![CDATA[How do you like that for alliteration? I&#8217;m trying out Twitter Tools v1.5.1a by Alex King at the moment to see if it will do what I want it to. I found a list of 10 Best Twitter Tools for WordPress Blogs from Quick Online Tips. Essentially, I was looking for a WordPress plugin that [...]]]></description>
			<content:encoded><![CDATA[<p>How do you like that for alliteration? I&#8217;m trying out <a title="Twitter Tools" href="http://alexking.org/projects/wordpress/readme?project=twitter-tools" target="_blank">Twitter Tools</a> v1.5.1a by Alex King at the moment to see if it will do what I want it to.</p>
<p>I found a list of <a title="10 Best Twitter Tools for WordPress Blogs" href="http://www.quickonlinetips.com/archives/2007/04/10-best-twitter-tools-for-wordpress-blogs/">10 Best Twitter Tools for WordPress Blogs</a> from <a title="Quick Online Tips" href="http://www.quickonlinetips.com" target="_blank">Quick Online Tips</a>. <span id="more-22"></span></p>
<p>Essentially, I was looking for a WordPress plugin that would allow me to automatically publish new posts to my Twitter status.</p>
<p>What was interesting about Twitter Tools is that it is able to give bi-directional integration with Twitter and allows me to create posts from my Twitter statuses &#8212; or so I&#8217;m told.</p>
<p>I&#8217;ll be sure to let you know how things work out.</p>
<p>I&#8217;m fairly new to the WordPress plugin arena so if there is a Twitter Tool beater, drop me a comment to let me know about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://artofsimplicity.co.uk/the-twitter-tools-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
