How can I make an htaccess file on a Mac?

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.

Read More

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

Related posts

Leave a Reply

5 comments

  1. Open up terminal. Found in Utilities.

    Type:

    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
    
  2. 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.

  3. 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.

  4. 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 😉