WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set-up pretty permalinks for my site. WordPress has a warning that my htaccess files is not writable. It provided some code to copy and put in the htaccess file.

I'm on a Mac, my local machine running WordPress 3.1.1.

I coped the code WP provided and pasted it into a new new TextEdit file that I named 1.htaccess . I put the file in the root directory Sites/mysite/. Then I tried to re-name the file and remove the "1", but my Mac gave a warning that files starting with "." are system files and wouldn't let me re-name it.

How can I make an htaccess file on a Mac?

Thank you.


share|improve this question

closed as off topic by anu, s_ha_dum, brasofilo, toscho Apr 23 '13 at 20:54

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

this isn't really a WordPress question - probably belongs over at superuser. – anu Apr 26 '11 at 14:10
@anu would be better at Apple. See my question: apple.stackexchange.com/questions/11135/… – Dunhamzzz Apr 26 '11 at 14:44
up vote 3 down vote accepted

Open up terminal. Found in Utilities.


cd /path/to/htaccess/file/
mv 1.htaccess .htaccess

For future edits of the htaccess file I'd recommend learning to use vi in the terminal.

cd /path/to/htaccess/file/
vi .htaccess
share|improve this answer
Hi Brady, Thank you so much for the help. It worked! I don't know diddly about Terminal, so I'll have to read up on it. Again, thanks so much. – Laxmidi Apr 26 '11 at 14:51

to make hidden files visible in finder, in terminal:

defaults write com.apple.Finder AppleShowAllFiles TRUE

then enter

killall Finder

and enter again.

change TRUE to FALSE to disable it again.

This will let you see and manipulate files in the Finder that begin with the dot.

share|improve this answer

I have asked the same question here, personally I thought it was madness that it was so difficult. http://apple.stackexchange.com/questions/11135/how-do-i-create-a-file-with-a-custom-file-extension

The best I answer I found is just to open terminal and use the linux 'touch' command, just cd to the correct directory and then execute touch .htaccess to create a .htaccess file.

share|improve this answer

If you set the root folder of your WordPress install to writeable by everyone then go in to the Permalink settings and save the .htaccess file will be created automatically.

share|improve this answer

Cmd+I (or right click read informations) Name and extension, here you can choose "keep .htaccess" whereas you can't in the finder. Keep it simple ;)

share|improve this answer
Won't the file become hidden at that point? It has been awhile since I have tried something like that on a Mac. – s_ha_dum Apr 23 '13 at 16:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.