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.
-Laxmidi
Open up terminal. Found in Utilities.
Type:
For future edits of the htaccess file I’d recommend learning to use vi in the terminal.
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.
I have asked the same question here, personally I thought it was madness that it was so difficult. https://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 executetouch .htaccess
to create a .htaccess file.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.
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 😉