<?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>Alex Gant &#187; port</title>
	<atom:link href="https://www.alexgant.com/tag/port/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.alexgant.com</link>
	<description>New media specialist &#38; consultancy</description>
	<lastBuildDate>Mon, 26 Oct 2015 21:21:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Setting up a WordPress 3 Network (nee Multisite) on MAMP</title>
		<link>https://www.alexgant.com/setting-up-a-wordpress-3-network-nee-multisite-on-mamp/</link>
		<comments>https://www.alexgant.com/setting-up-a-wordpress-3-network-nee-multisite-on-mamp/#comments</comments>
		<pubDate>Tue, 22 May 2012 21:52:00 +0000</pubDate>
		<dc:creator><![CDATA[alexgant]]></dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[8888]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[mu]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.alexgant.com/?p=95</guid>
		<description><![CDATA[I happened upon an interesting problem today whilst setting up WordPress 3.3.2 on MAMP. Essentially WordPress plays nicely with MAMP so long as you don&#8217;t want to switch on the Network feature that has been rolled in to the WordPress core since version 3.0 (it was previously available as WordPress MU (Multi User). The problem <a href="https://www.alexgant.com/setting-up-a-wordpress-3-network-nee-multisite-on-mamp/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-106" title="feature_wpbuttons" src="http://www.alexgant.com/wp-content/uploads/feature_wpbuttons.jpg" alt="" width="620" height="200" /></p>
<p>I happened upon an interesting problem today whilst setting up WordPress 3.3.2 on MAMP. Essentially WordPress plays nicely with MAMP so long as you don&#8217;t want to switch on the Network feature that has been rolled in to the WordPress core since version 3.0 (it was previously available as WordPress MU (Multi User).</p>
<p>The problem is a result of WordPress Network&#8217;s inability to handle a host name with a specified port number. By default, MAMP uses port 8888 and 8889 for Apache and MySQL respectively, resulting in the host name http://localhost:8888 which WordPress Network won&#8217;t accept (the setup discussed <a href="http://codex.wordpress.org/Create_A_Network">here</a> fails when using a host name that has a port number appended to it). However, with a few simple config changes to MAMP and and some very minor tinkering on the command line, you can overcome this problem.</p>
<p><span id="more-95"></span></p>
<p>Here&#8217;s how I got round the problem and got my WordPress Network working nicely on my local Mac. For the record, I&#8217;m using OS X 10.6.8 and MAMP version which includes PHP version and MySQL version. It&#8217;s also worth noting that, as far as my research could see, it is impossible to setup WordPress network in its sub-domain configuration on MAMP so the only option is to set it up in its sub-directory configuration. This wasn&#8217;t an issue for me as I need just this type of configuration.</p>
<h3>Switch off OS X&#8217;s built in Apache web server.</h3>
<p>Head in to System Prefs and make sure that Web Sharing is switched off. Otherwise OS X&#8217;s built in Apache server will get in the way of MAMP&#8217;s.</p>
<h3>Download and install MAMP</h3>
<p>No need for the Pro version, just the regular version of MAMP is all you&#8217;ll need. <a href="http://www.mamp.info/en/index.html">More info and download link here</a>.</p>
<h3>Configure MAMP</h3>
<p>Firstly, set MAMP&#8217;s Apache document root to the proposed root of your local WP install. This is likely to be something like this:</p>
<p><code>/Users/mymacusername/Sites/mydomain/wordpress</code></p>
<p>Now set MAMP&#8217;s Apache and MySQL ports to web server defaults (80 and 3306 respectively). This will cause MAMP to request your OS X admin password whenever you start your MAMP server but if you&#8217;re savvy enough to be setting up a local web server, you can probably be trusted with an OS X administrator account!</p>
<div id="attachment_108" style="width: 433px" class="wp-caption aligncenter"><img class="size-full wp-image-108" title="mamp_panel" src="http://www.alexgant.com/wp-content/uploads/mamp_panel.jpg" alt="" width="423" height="344" /><p class="wp-caption-text">Configure MAMP using its Preferences options</p></div>
<h3>Edit your hosts file</h3>
<p>Open a Terminal window and type:</p>
<p><code>sudo vi /etc/hosts</code></p>
<p>This opens the hosts config file in the vi text editor. At the bottom of the file, you&#8217;ll need to add the following line:</p>
<p><code>127.0.0.1 domainalias.co.uk</code> (choose whatever you want for domainalias.co.uk, I used imagespa.co.uk)</p>
<div id="attachment_109" style="width: 503px" class="wp-caption aligncenter"><img class="size-full wp-image-109" title="terminal_hosts" src="http://www.alexgant.com/wp-content/uploads/terminal_hosts.jpg" alt="" width="493" height="296" /><p class="wp-caption-text">Add an entry to your hosts file using OS X&#39;s Terminal</p></div>
<p>This basically means that from now on when you type domainalias.co.uk in to your browser it will actually point to the IP address of your local computer &#8211; the localhost.</p>
<p>If you&#8217;re unsure of how to use vi, take a look at this <a href="http://staff.washington.edu/rells/R110/">very helpful guide</a>.</p>
<h3>Restart MAMP</h3>
<p>If the MAMP servers are still running, stop them and then quit the application. Ensure that the changes you made to /etc/hosts have been saved and exit your Terminal session. Probably best to restart your browser now as well. If you&#8217;re happy to do so, you might also do well to clear the browser cache as well. You can now restart MAMP and your browser. To check that everything is working as expected, create a really basic HTML file and save it in the folder that you specified as MAMP&#8217;s Apache root. Save the file as something like <code>test.html</code> and then visit <code>http://mydomainalias.co.uk/test.html</code> in your browser. If everything is ok, the file should render correctly and the host name in your browser address bar shouldn&#8217;t append a port number and certainly shouldn&#8217;t revert to <code>localhost</code></p>
<h3>Install WordPress</h3>
<p>You can now download and install WordPress as normal using mynewdomainalias.co.uk as the WordPress Address (URL) and Site Address (URL) fields within WP&#8217;s &#8216;Settings&#8217; menu. You can create the WordPress database using MAMP&#8217;s built-in version of phpMyAdmin. You&#8217;ll find full instructions for <a href="http://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP">setting up WordPress locally on MAMP</a> here. Don&#8217;t forget that just like our <code>test.html</code> file, WordPress needs to be installed in the folder that you specified when you configured MAMP.</p>
<h3>Setup WordPress Network</h3>
<p>You should now have a WordPress 3 install working nicely available at <code>http://mydomainalias.co.uk</code> with the WordPress admin available at <code>http://mydomainalias.co.uk/wp-admin</code></p>
<p>You can now continue with the WordPress Network setup using the <a href="http://codex.wordpress.org/Create_A_Network">Codex instructions</a> found here.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.alexgant.com/setting-up-a-wordpress-3-network-nee-multisite-on-mamp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
