How to fix WordPress permalinks on Mac OS X’s localhost

In: Feeling guru|Techie Daw

29 Aug 2012

I recently installed a WordPress blog in my localhost using Mac OS X’s built in Apache and PHP with MySQL to test a functionality when I decided to update the permalinks to use a different format other than the default setting. When I tested the new URL, I was greeted with the following error:

Not Found
The requested URL /~user/wordpress/category/sample/ was not found on this server.
Apache/2.2.21 (Unix) DAV/2 PHP/5.3.10 with Suhosin-Patch Server at localhost Port 80

To fix this, create a file and name it <username>.conf, where username is your user account’s short name. Paste the text below within the file:

<Directory "/Users/username/Sites/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All AuthConfig
Order allow,deny
Allow from all
</Directory>

Save the file and make sure it uses the .conf extension. Copy the file to this location (you may need to provide your credentials to overwrite the current one):

/etc/apache2/users/

Restart Apache to apply the changes by running the following in the Terminal:

sudo apachectl restart

Reapply your permalinks in the WordPress admin by choosing the default option and then setting it back to your desired format.

About the author

Richard Feraro is a Magento Enterprise Certified developer from Manila, Philippines with 14 years of solid open-source development experience using Linux, Apache, MySQL & PHP.

5 Responses to How to fix WordPress permalinks on Mac OS X’s localhost

Avatar

grace

October 7th, 2012 at 2:03 pm

Would you provide exact terminal instructions to do what you’re describing? Sorry, I’m really new to wp and have been trying to fix permalinks forever!

Avatar

Thomas GERMANY

December 24th, 2012 at 4:34 pm

Thx, its fix my problem.
See u
Thomas

Avatar

Kyle UNITED STATES

April 7th, 2013 at 12:05 pm

Thank you! This was driving me nuts!

Avatar

Paul Duffy IRELAND

May 11th, 2014 at 12:27 am

Thank you – was driving me crazy! 🙂

Avatar

Alican

December 1st, 2014 at 8:57 pm

Thank you so much!
That works like a charm

Comment Form

About my blog

This blog is targeted towards all levels of developers and also designers. Various topics are discussed such as Magento, PHP & MySQL, jQuery, WordPress, CSS and HTML.

Booking.com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 5,243 other subscribers

WordPress + Magento

Recent Trackbacks

Archives

Disclaimer

All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or my mom.