<?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>Pass By Value &#187; wordpress</title>
	<atom:link href="http://passbyvalue.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://passbyvalue.com</link>
	<description>... or is it pass by reference?</description>
	<lastBuildDate>Thu, 26 Jan 2012 03:09:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Version controlling WordPress themes on simple hosts</title>
		<link>http://passbyvalue.com/2010/07/version-controlling-wordpress-themes-on-simple-hosts/</link>
		<comments>http://passbyvalue.com/2010/07/version-controlling-wordpress-themes-on-simple-hosts/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 12:12:07 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://passbyvalue.com/?p=177</guid>
		<description><![CDATA[Here&#8217;s a quick tip if your WordPress host is quite simple and only provides FTP access and no version control tools (svn, git) or specific syncing tools (rsync) Use version control for the theme on your local machine (where you run your dev WordPress environment), then use syncing capability of FTP tool (Cyberduck for MacOSX [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick tip if your WordPress host is quite simple and only provides FTP access and no version control tools (svn, git) or specific syncing tools (rsync)</p>
<p>Use version control for the theme on your local machine (where you run your dev WordPress environment), then use syncing capability of FTP tool (<a href="http://cyberduck.ch/">Cyberduck</a> for MacOSX has this feature) to promote the changes to your host.</p>
<p>Remember, version control is the only way to sensibly manage changes to your theme &#8211; editing through the WordPress theme editor on your host is a really bad way to manage it!</p>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2010/07/version-controlling-wordpress-themes-on-simple-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing MySQL, Apache2, PHP, and WordPress with MacPorts</title>
		<link>http://passbyvalue.com/2009/11/installing-mysql-apache2-php-and-wordpress-with-macports/</link>
		<comments>http://passbyvalue.com/2009/11/installing-mysql-apache2-php-and-wordpress-with-macports/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 11:14:41 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[macport]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://passbyvalue.com/?p=113</guid>
		<description><![CDATA[I&#8217;ve recently started working on a website project using WordPress.  I&#8217;ve got a production environment where I run this blog on my ubuntu server (VPS) hosted by slicehost.  But because I&#8217;m going to muck around with themes and plugins I decided that I&#8217;m better off doing that locally on my Mac.  So this is the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently started working on a website project using WordPress.  I&#8217;ve got a production environment where I run this blog on my ubuntu server (VPS) hosted by<a href="http://www.slicehost.com"> slicehost</a>.  But because I&#8217;m going to muck around with themes and plugins I decided that I&#8217;m better off doing that locally on my Mac.  So this is the first of a series of blog posts for getting WordPress up and running on my local machine.</p>
<p>I have <a href="http://www.macports.org/">macports</a> already installed and I prefer its packages over the packages shipped with OSX.  Mostly because they are more up to date and there is more variety.  Plus it feels more native to working with my VPS.  Before we get started, lets ensure that our MacPorts is up to date:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port selfupdate<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Updating the ports <span style="color: #c20cb9; font-weight: bold;">tree</span><br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Updating MacPorts base sources using rsync<br />
MacPorts base version 1.8.1 installed,<br />
MacPorts base version 1.8.1 downloaded.<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;MacPorts base is already the latest version</div></div>
<p>There will be four parts to this series:</p>
<ol>
<li>Installing MySQL</li>
<li>Installing Apache2</li>
<li>Installing PHP along with MySQL support</li>
<li>Installing WordPress</li>
</ol>
<p>I like to chunk these up rather than merge them all into one article as the temptation is to mix information together and then its harder to see where one step stops and the next one starts.  Also it means that you can look at the entries in isolation and they should still make sense.</p>
<h2>Installing MySQL</h2>
<p>I had a binary distribution of MySQL on machine which I needed to remove before installing the macports distro, this thread was useful as it isn&#8217;t particularly clear what to do:</p>
<p><a href="http://forums.mysql.com/read.php?11,75256,255851#msg-255851">http://forums.mysql.com/read.php?11,75256,255851#msg-255851</a></p>
<p>The following article was my main source of inspiration, I&#8217;ve pretty much followed these steps:</p>
<p><a href="http://2tbsp.com/content/install_and_configure_mysql_5_macports">http://2tbsp.com/content/install_and_configure_mysql_5_macports</a></p>
<p>Install the port and setup the mysql system database</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> mysql5-server<br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-u</span> mysql mysql_install_db5</div></div>
<p>Setup some handy aliases in your shell</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span>mate ~<span style="color: #000000; font-weight: bold;">/</span>.profile</div></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mysqlstart</span>=<span style="color: #ff0000;">'sudo /opt/local/bin/mysqld_safe5 &amp;'</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mysqlstop</span>=<span style="color: #ff0000;">'/opt/local/bin/mysqladmin5 -u root -p shutdown'</span></div></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #7a0874; font-weight: bold;">source</span> ~<span style="color: #000000; font-weight: bold;">/</span>.profile</div></div>
<p>Start the server and set the root password</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ mysqlstart<br />
$ <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql5<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysqladmin <span style="color: #660033;">-u</span> root password <span style="color: #ff0000;">'root'</span><br />
$ <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql5<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysqladmin <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> <span style="color: #660033;">-h</span> localhost password <span style="color: #ff0000;">'root'</span></div></div>
<p>(Not sure what this second step is for!)</p>
<p>Now we can use the</p>
<div class="codecolorer-container text railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysqlstop</div></div>
<p>alias because the password has been set.</p>
<p>And we&#8217;re all done!</p>
<h2>Installing Apache2</h2>
<p>Source of inspiration for this entry is from here:</p>
<p><a href="http://2tbsp.com/content/install_apache_2_and_php_5_macports">http://2tbsp.com/content/install_apache_2_and_php_5_macports</a></p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> apache2</div></div>
<p>Enabled virtual hosts in main config</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">sudo</span> mate <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>loca<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</div></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Virtual hosts</span><br />
Include conf<span style="color: #000000; font-weight: bold;">/</span>extra<span style="color: #000000; font-weight: bold;">/</span>httpd-vhosts.conf</div></div>
<p>Updated virtual hosts config</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">sudo</span> mate <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>extra<span style="color: #000000; font-weight: bold;">/</span>httpd-vhosts.conf</div></div>
<p>The directory part is important as Apache 2.2 directories are by default not browsable so ensure that you enable them!</p>
<div class="codecolorer-container xml railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VirtualHost</span> *:80<span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; ServerAdmin webmaster@myapp.local<br />
&nbsp; &nbsp; DocumentRoot &quot;/Users/tgmcclen/workspace/myapp/htdocs/site&quot;<br />
&nbsp; &nbsp; ServerName myapp.local<br />
&nbsp; &nbsp; ServerAlias www.myapp.local<br />
&nbsp; &nbsp; ErrorLog &quot;/Users/tgmcclen/workspace/myapp/logs/error_log&quot;<br />
&nbsp; &nbsp; CustomLog &quot;/Users/tgmcclen/workspace/myapp/logs/access_log&quot; common<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Directory</span> <span style="color: #ff0000;">&quot;/Users/tgmcclen/workspace/myapp/htdocs/site&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Options Indexes FollowSymLinks<br />
&nbsp; &nbsp; &nbsp; &nbsp; AllowOverride None<br />
&nbsp; &nbsp; &nbsp; &nbsp; Order allow,deny<br />
&nbsp; &nbsp; &nbsp; &nbsp; Allow from all<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> &nbsp; &nbsp;<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>Setup an alias for controlling apache and start</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span>mate ~<span style="color: #000000; font-weight: bold;">/</span>.profile</div></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">apache2ctl</span>=<span style="color: #ff0000;">'sudo /opt/local/apache2/bin/apachectl'</span></div></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #7a0874; font-weight: bold;">source</span> ~<span style="color: #000000; font-weight: bold;">/</span>.profile<br />
$ <span style="color: #c20cb9; font-weight: bold;">apache2ctl start</span></div></div>
<p>Add an entry in the hosts file for the virtual host</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span>mate <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts</div></div>
<div class="codecolorer-container text railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">127.0.0.1 myapp.local</div></div>
<p>Now place files in the</p>
<div class="codecolorer-container text railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">htdocs</div></div>
<p>directory and browse to them in a browser:</p>
<p>http://myapp.local/hello.html</p>
<h2>Installing PHP along with MySQL support</h2>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> php5 +apache2 +pear<br />
...<br />
Note: php5 installs files outside the common directory structure.<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Installing php5 <span style="color: #000000; font-weight: bold;">@</span>5.3.0_3+apache2+darwin_10+macosx+mysql5+pear+sqlite<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Activating php5 <span style="color: #000000; font-weight: bold;">@</span>5.3.0_3+apache2+darwin_10+macosx+mysql5+pear+sqlite<br />
To customize php, copy<br />
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini-development <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">if</span> this is a development server<span style="color: #7a0874; font-weight: bold;">&#41;</span> or<br />
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini-production <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">if</span> this is a production server<span style="color: #7a0874; font-weight: bold;">&#41;</span> to<br />
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini and <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #c20cb9; font-weight: bold;">make</span> changes.<br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini-development <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini</div></div>
<p>Now enable PHP module with apache2</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>modules<br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">apxs</span> <span style="color: #660033;">-a</span> <span style="color: #660033;">-e</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;php5&quot;</span> libphp5.so</div></div>
<p>and add directives for</p>
<div class="codecolorer-container text railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mime_module</div></div>
<p>and</p>
<div class="codecolorer-container text railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">dir_module</div></div>
<p>in the virtual host entry:</p>
<div class="codecolorer-container xml railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VirtualHost</span> *:80<span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; ServerAdmin webmaster@myapp.local<br />
&nbsp; &nbsp; DocumentRoot &quot;/Users/tgmcclen/workspace/myapp/htdocs&quot;<br />
&nbsp; &nbsp; ServerName myapp.local<br />
&nbsp; &nbsp; ServerAlias www.myapp.local<br />
&nbsp; &nbsp; ErrorLog &quot;/Users/tgmcclen/workspace/myapp/logs/error_log&quot;<br />
&nbsp; &nbsp; CustomLog &quot;/Users/tgmcclen/workspace/myapp/logs/access_log&quot; common<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Directory</span> <span style="color: #ff0000;">&quot;/Users/tgmcclen/workspace/myapp/htdocs&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Options Indexes FollowSymLinks<br />
&nbsp; &nbsp; &nbsp; &nbsp; AllowOverride None<br />
&nbsp; &nbsp; &nbsp; &nbsp; Order allow,deny<br />
&nbsp; &nbsp; &nbsp; &nbsp; Allow from all<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;IfModule</span> mime_module<span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; AddType application/x-httpd-php .php<br />
&nbsp; &nbsp; &nbsp; AddType application/x-httpd-php-source .phps<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;IfModule</span> dir_module<span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; DirectoryIndex index.html index.php<br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>And then restart Apache to get going&#8230;</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">apache2ctl restart</span></div></div>
<p><strong>Installing MySQL support for PHP</strong></p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> php5-mysql<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Computing dependencies <span style="color: #000000; font-weight: bold;">for</span> php5-mysql<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Fetching php5-mysql<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Verifying checksum<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">for</span> php5-mysql<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Extracting php5-mysql<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Configuring php5-mysql<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Building php5-mysql<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Staging php5-mysql into destroot<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Installing php5-mysql <span style="color: #000000; font-weight: bold;">@</span>5.3.0_0+mysqlnd<br />
To use mysqlnd with a <span style="color: #7a0874; font-weight: bold;">local</span> MySQL server, edit <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini and <span style="color: #000000; font-weight: bold;">set</span><br />
mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket<br />
to <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>mysql5<span style="color: #000000; font-weight: bold;">/</span>mysqld.sock<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Activating php5-mysql <span style="color: #000000; font-weight: bold;">@</span>5.3.0_0+mysqlnd<br />
---<span style="color: #000000; font-weight: bold;">&gt;</span> &nbsp;Cleaning php5-mysql<br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> mate <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini</div></div>
<div class="codecolorer-container ini railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ini codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">; Default socket name for local MySQL connects. &nbsp;If empty, uses the built-in</span><br />
<span style="color: #666666; font-style: italic;">; MySQL defaults.</span><br />
<span style="color: #666666; font-style: italic;">; http://php.net/pdo_mysql.default-socket</span><br />
pdo_mysql.default_socket<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">/opt/local/var/run/mysql5/mysqld.sock</span><br />
<br />
<span style="color: #666666; font-style: italic;">; Default socket name for local MySQL connects. &nbsp;If empty, uses the built-in</span><br />
<span style="color: #666666; font-style: italic;">; MySQL defaults.</span><br />
<span style="color: #666666; font-style: italic;">; http://php.net/mysql.default-socket</span><br />
mysql.default_socket <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /opt/local/var/run/mysql5/mysqld.sock</span><br />
<br />
<span style="color: #666666; font-style: italic;">; Default socket name for local MySQL connects. &nbsp;If empty, uses the built-in</span><br />
<span style="color: #666666; font-style: italic;">; MySQL defaults.</span><br />
<span style="color: #666666; font-style: italic;">; http://php.net/mysqli.default-socket</span><br />
mysqli.default_socket <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /opt/local/var/run/mysql5/mysqld.sock</span></div></div>
<h2>Installing WordPress</h2>
<p>Inspiration for instructions from here:</p>
<p><a href="http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion">http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion</a><br />
<a href="http://codex.wordpress.org/Installing_WordPress">http://codex.wordpress.org/Installing_WordPress</a></p>
<p>Inside your</p>
<div class="codecolorer-container text railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">htdocs</div></div>
<p>directory:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">svn co</span> http:<span style="color: #000000; font-weight: bold;">//</span>core.svn.wordpress.org<span style="color: #000000; font-weight: bold;">/</span>tags<span style="color: #000000; font-weight: bold;">/</span>2.8.6 .</div></div>
<p>(Latest tag will in URL on page, otherwise just browse to tags dir in folder to determine)</p>
<p>Create the database in MySQL</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql5 <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span><br />
Enter password:<br />
Welcome to the MySQL monitor. &nbsp;Commands end with ; or \g.<br />
Your MySQL connection <span style="color: #c20cb9; font-weight: bold;">id</span> is <span style="color: #000000;">1</span><br />
Server version: 5.1.40 Source distribution<br />
<br />
Type <span style="color: #ff0000;">'help;'</span> or <span style="color: #ff0000;">'\h'</span> <span style="color: #000000; font-weight: bold;">for</span> help. Type <span style="color: #ff0000;">'\c'</span> to <span style="color: #c20cb9; font-weight: bold;">clear</span> the current input statement.<br />
<br />
mysql<span style="color: #000000; font-weight: bold;">&amp;</span>gt; CREATE DATABASE mydb;<br />
Query OK, <span style="color: #000000;">1</span> row affected <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.05</span> sec<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<br />
mysql<span style="color: #000000; font-weight: bold;">&amp;</span>gt; GRANT ALL PRIVILEGES ON myname.<span style="color: #000000; font-weight: bold;">*</span> TO <span style="color: #ff0000;">&quot;mydb&quot;</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #ff0000;">&quot;localhost&quot;</span> IDENTIFIED BY <span style="color: #ff0000;">&quot;mypassword&quot;</span>;<br />
Query OK, <span style="color: #000000;">0</span> rows affected <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.58</span> sec<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<br />
mysql<span style="color: #000000; font-weight: bold;">&amp;</span>gt; FLUSH PRIVILEGES;<br />
Query OK, <span style="color: #000000;">0</span> rows affected <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.00</span> sec<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<br />
mysql<span style="color: #000000; font-weight: bold;">&amp;</span>gt; EXIT<br />
Bye</div></div>
<p>Now setup configuration</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">cp</span> wp-config-sample.php wp-config.php</div></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">//</span> <span style="color: #000000; font-weight: bold;">**</span> MySQL settings - You can get this info from your web host <span style="color: #000000; font-weight: bold;">**</span> <span style="color: #000000; font-weight: bold;">//</span><br />
<span style="color: #000000; font-weight: bold;">/**</span> The name of the database <span style="color: #000000; font-weight: bold;">for</span> WordPress <span style="color: #000000; font-weight: bold;">*/</span><br />
define<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'DB_NAME'</span>, <span style="color: #ff0000;">'mydb'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;<br />
<br />
<span style="color: #000000; font-weight: bold;">/**</span> MySQL database username <span style="color: #000000; font-weight: bold;">*/</span><br />
define<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'DB_USER'</span>, <span style="color: #ff0000;">'myname'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;<br />
<br />
<span style="color: #000000; font-weight: bold;">/**</span> MySQL database password <span style="color: #000000; font-weight: bold;">*/</span><br />
define<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'DB_PASSWORD'</span>, <span style="color: #ff0000;">'mypassword'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;<br />
<br />
<span style="color: #000000; font-weight: bold;">/**</span> MySQL <span style="color: #c20cb9; font-weight: bold;">hostname</span> <span style="color: #000000; font-weight: bold;">*/</span><br />
define<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'DB_HOST'</span>, <span style="color: #ff0000;">'localhost'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;<br />
<br />
<span style="color: #000000; font-weight: bold;">/**</span> Database Charset to use <span style="color: #000000; font-weight: bold;">in</span> creating database tables. <span style="color: #000000; font-weight: bold;">*/</span><br />
define<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'DB_CHARSET'</span>, <span style="color: #ff0000;">'utf8'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;<br />
<br />
<span style="color: #000000; font-weight: bold;">/**</span> The Database Collate type. Don<span style="color: #ff0000;">'t change this if in doubt. */<br />
define('</span>DB_COLLATE<span style="color: #ff0000;">', '</span><span style="color: #ff0000;">');</span></div></div>
<p>Open a browser and continue the install:</p>
<p>http://myapp.local/wp-admin/install.php</p>
<p>You&#8217;ll most likely notice that you&#8217;re getting lots of errors and warnings on the pages, these can be turned off:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">sudo</span> mate <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>php.ini</div></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">; Default Value: On<br />
; Development Value: On<br />
; Production Value: Off<br />
; http:<span style="color: #000000; font-weight: bold;">//</span>php.net<span style="color: #000000; font-weight: bold;">/</span>display-errors<br />
display_errors = Off</div></div>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">apache2ctl restart</span></div></div>
<p>Now you&#8217;re good to WordPress away!</p>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2009/11/installing-mysql-apache2-php-and-wordpress-with-macports/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

