URL drops :8888 from localhost I'm running Craft CMS with MAMP at localhost:8888.

When I pass in a URL with {{ entry.title }}, I get http://localhost/news/2016/we-just-installed-craft which gives me a 404 until I manually put in the :8888 after localhost.

Am I missing something in the set up here?
I would try and put the port in your siteUrl config param:

'siteUrl' =&gt; 'http://localhost:8888',


Alternatively you might be able to use this though haven't tested it (I believe the php server variable uses the server name &amp; port number):

'localhost' =&gt; array(
    'siteUrl' =&gt; 'http://'.$_SERVER['HTTP_HOST'],
    'devMode' =&gt; true,
    'cacheMethod' =&gt; 'file'
)