<?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>memeLab &#187; Hacks</title>
	<atom:link href="http://memelab.com.au/category/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://memelab.com.au</link>
	<description>Search Engine Marketing and Web Publishing Services</description>
	<lastBuildDate>Sat, 28 Aug 2010 11:35:01 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Configuring XAMPP as a Wordpress development server</title>
		<link>http://memelab.com.au/configuring-xampp-wordpress-development-server/</link>
		<comments>http://memelab.com.au/configuring-xampp-wordpress-development-server/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 11:32:39 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[wp-config.php]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://memelab.com.au/?p=324</guid>
		<description><![CDATA[Finally!  I&#8217;ve managed to get a satisfying development environment for Wordpress on my local machine! I&#8217;ve had a semi-operational setup for a few years, but have just managed to meet all my needs!
I&#8217;m using XAMPP on Mac OSX to design my Wordpress themes, and now my setup features:

a sensible, unique hostname for my local site [...]]]></description>
			<content:encoded><![CDATA[<p>Finally!  I&#8217;ve managed to get a satisfying development environment for Wordpress on my local machine! I&#8217;ve had a semi-operational setup for a few years, but have just managed to meet all my needs!</p>
<p>I&#8217;m using XAMPP on Mac OSX to design my Wordpress themes, and now my setup features:</p>
<ul>
<li>a sensible, unique hostname for my local site (eg. memelab.dev)</li>
<li>prettylinks using url rewrite</li>
<li>functioning Wordpress and plugin updates</li>
<li>a wp-config.php edit which eliminates the need to edit the database when uploading the site to the production server<span id="more-324"></span></li>
</ul>
<h2>Installation</h2>
<p>Install <a href="http://www.apachefriends.org/en/xampp-macosx.html">XAMPP</a> and <a href="http://wordpress.org/">Wordpress</a>.</p>
<p>This is pretty straight forward, but for the sake of completeness, I&#8217;ll mention this comprehensive guide from <a href="http://sixrevisions.com/tutorials/web-development-tutorials/using-xampp-for-local-wordpress-theme-development/">Six Revisions</a> (which I haven&#8217;t examined too closely, but looks solid).</p>
<h2>Configure prettylinks</h2>
<p>I found that my prettylinks failed when I initially installed&#8230; I think this is fixed in later versions of XAMPP.  I&#8217;m running XAMPP 1.7.3, and I don&#8217;t recall needing to do anything on since upgrading, but if you&#8217;re having trouble, you may need to edit some config files.  You can open them in TextEdit.app if you don&#8217;t have a favourite editor (I love TextMate) by adapting the following:</p>
<p><code>sudo open -e “/Applications/XAMPP/etc/httpd.conf”</code></p>
<p>You may need to:</p>
<blockquote><p>Enable URL rewrite) by opening <code>xampp/xamppfiles/etc/httpd.conf</code> and deleting the hash/pound sign at the front of the line to uncomment:<br />
<code>LoadModule rewrite_module modules/mod_rewrite.so</code><br />
<a href="http://codex.wordpress.org/Using_Permalinks#Fixing_Permalink_Problems">Fixing Permalink problems</a></p></blockquote>
<p>When I intially had trouble (several years ago I think) the post which helped me out was:</p>
<blockquote><p>&#8220;&#8230;Clean URLs do not work out of the box on XAMPP 1.5.x with PHP4 due to a problem in Apache&#8217;s module load order&#8230;<br />
&#8220;<a href="http://drupal.org/node/43545">Clean URL support in XAMPP</a></p></blockquote>
<p>Bottom line &#8211; its working a charm now!</p>
<h2>Configure local servers</h2>
<p>To access your local site at an address like http://memelab.dev/, you&#8217;ll need to configure XAMPP.  XAMPP stores its virtual hosts configuration in a separate file called httpd-vhosts.conf, which is not actually used by default, so:</p>
<ol>
<li>In <code>/xampp/xamppfiles/etc/httpd.conf</code> uncomment the line: <code>Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf</code></li>
<li>You can now make entries into <code>httpd-vhosts.conf</code>.  There is an example in there &#8211; adapt it to your needs!</li>
<li>Enter your hostname into <code>/etc/hosts</code> like so:<br />
<code>127.0.0.1 yoursite.dev</code><br />
(Your hosts file is not visible in finder, and needs to be edited with admin privileges, so open the terminal and paste:<br />
<code>sudo Open /Applications/TextEdit.app /etc/hosts</code></li>
<li>Reload apache, and you&#8217;re done! (XAMPP control &gt; Modules &gt; Restart Apache).</li>
</ol>
<p>I adapted my solution from a post in the <a href="http://codex.wordpress.org/MacOS_X_Local_Mirror#Create_a_example.mirror_static_site">Wordpress Codex</a>.</p>
<h2>Enable Wordpress updates whilst using XAMPP</h2>
<p>This is the breakthrough which has prompted this post, thanks to Ian at messaliberty.com.  If you&#8217;ve come this far, you&#8217;ll have no trouble returning to <code>/xampp/xamppfiles/etc/httpd.conf</code> and replacing</p>
<p><code>User nobody<br />
Group admin</code></p>
<p>with:</p>
<p><code>User yourusername<br />
Group staff</code></p>
<p>You can find more detailed instructions at the source:</p>
<blockquote><p>edit the XAMPP apache config file to run it as your local user.<br />
<a href="http://www.messaliberty.com/2010/04/how-to-fix-wordpress-automatic-upgrades-and-plugin-installs-on-xampp/">How to fix WordPress automatic upgrades and plugin installs on XAMPP</a></p></blockquote>
<p>(And make sure that LittleSnitch, if you use it, is allowing httpd to access wordpress.org)</p>
<h2>Tweak wp-config.php</h2>
<p>Ordinarily, migrating your database to your local installation, and vice-versa requires that you the Wordpress database &#8211; in particular the WP_HOME and WP_SITEURL.  Ian at messaliberty.com again has a solution!  This is working well for me:</p>
<blockquote><p>&#8220;set-up the wp-config.php to check to see if it is a local server, if it  is then set the configuration one way, otherwise set it using the  production values&#8221;<br />
<a title="Permanent Link to How to create a single wp-config file for local and remote WordPress development" rel="bookmark" href="http://www.messaliberty.com/2010/01/how-to-create-a-single-wp-config-file-for-local-and-remote-wordpress-development/">create a single wp-config file for local and remote WordPress development</a></p></blockquote>
<p>A bonus tip on whilst we&#8217;re here &#8211; Joost has offered this addition:</p>
<blockquote><p>&#8220;a quick hack I do in almost all WordPress installs I manage, that allows me to quickly switch on debug mode when needed&#8221;<br />
<a href="http://yoast.com/wordpress-debug/">Joost &#8211; Simple Wordpress debuggin</a></p></blockquote>
<p>Next recommendation from me: use some versioning software &#8211; I use Versions.app, which is a simple SVN client for the mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://memelab.com.au/configuring-xampp-wordpress-development-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom Admin Branding: code update</title>
		<link>http://memelab.com.au/custom-admin-branding/</link>
		<comments>http://memelab.com.au/custom-admin-branding/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 13:07:12 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Custom Admin Branding]]></category>
		<category><![CDATA[customisation]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://memelab.com.au/?p=140</guid>
		<description><![CDATA[I love the Wordpress plugin Custom Admin Branding by Josh Byers..  who doesn&#8217;t love seeing their shiny, official name at the top of their admin panel?
I noticed, though, that when when I updated the plugin to 1.3.5, my custom files were overwritten.. Doh!  It defeats the purpose of auto-update if we have to resurrect our [...]]]></description>
			<content:encoded><![CDATA[<p>I love the Wordpress plugin <a title="Download the plugin from WordPress.org" href="http://wordpress.org/extend/plugins/custom-admin-branding" target="_blank">Custom Admin Branding</a> by <a title="Josh Byers, author of the Custom Admin Branding" href="http://pressingpixels.com/wordpress-custom-admin-branding" target="_blank">Josh Byers</a>..  who doesn&#8217;t love seeing their shiny, official name at the top of their admin panel?</p>
<p>I noticed, though, that when when I updated the plugin to 1.3.5, my custom files were overwritten.. Doh!  It defeats the purpose of auto-update if we have to resurrect our settings afterwards, clearly, but every journey progresses one step at a time, and I&#8217;ve been rapt to have such a great plugin, complete with annotated photoshop templates.<span id="more-140"></span></p>
<p>Still, it would be great if the custom files survived an update, so I&#8217;ve had a fiddle, and come up with a crude solution&#8230; and while I was at it, I&#8217;ve added an option to change the Header background colour (which is simpler than using the custom stylesheet which is currently an option hidden in the code of the plugin).</p>
<p>I&#8217;m hoping that he&#8217;ll like the changes, and we might get another update soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://memelab.com.au/custom-admin-branding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
