WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Can't find .htaccess in localhost WP- new Mac user (15 posts)

  1. prodentite
    Member
    Posted 2 years ago #

    Since switching from Windows 7 to Mac OS X, I've had nothing but trouble when developing WP sites locally.

    Now I've come to find that I can't locate the .htaccess file in my site folder. I created one using the Terminal, but I can't find it in the Finder.

    I noticed when I change the permalinks that none of my pages work except the home page.

    Another thing I notice is that I can't setup categories for my posts.

    I've searched on WP and Google, but I'm at my whits end.

    Any suggestions?

  2. prodentite
    Member
    Posted 2 years ago #

    Just checking in to see if anyone can help. This has pretty much halted my work.

    If anyone has any suggestions, I'd greatly appreciate it.

    Thanks,

  3. keesiemeijer
    moderator
    Posted 2 years ago #

    To show hidden files in the finder:
    http://lifehacker.com/188892/show-hidden-files-in-finder

  4. prodentite
    Member
    Posted 2 years ago #

    Thanks Kees!

    Now I can view hidden files, but I'm having these problems:

    1. Can't change permalinks to /%category%/%postname%/. None of my pages display, except for the homepage.

    2. I can't setup categories for my posts.

    Any idea?

  5. keesiemeijer
    moderator
    Posted 2 years ago #

    Did you know that your permalink structure is considered harmfull: http://ottopress.com/2010/category-in-permalinks-considered-harmful/

    But try removing or renaming your .htaccess file or:

    - updating your permalinks by choosing the default permalink structure or re-saving your current structure at Settings > Permalinks in your admin panel. WordPress will rebuild the .htaccess file. If WordPress cannot automatically edit the .htaccess file, it will provide manual instructions after saving.

    Have you tried:
    - deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-specific problems?

  6. prodentite
    Member
    Posted 2 years ago #

    I deleted the .htaccess file and WP rebuilt it. I switched back to the 2011 theme...

    Still can't view other pages outside the home page unless I use the default permalink setting. Nor does the category settings work.

  7. keesiemeijer
    moderator
    Posted 2 years ago #

    try:
    - replacing all files & folders - except the wp-content folder from a fresh download of WordPress.

    Did you use virtual hosts to set up your site?: http://wordpress.org/support/topic/wordpress-3-network-multisite-on-a-local-development-site?replies=53

  8. Nikki Blight
    Member
    Posted 2 years ago #

    Do you have Apache's mod_rewrite enabled locally? It's required for permalinks to work, and I don't think it's enabled by default.

    I believe the settings are in the Apache httpd.conf file.

  9. Samuel B
    moderator
    Posted 2 years ago #

    If you want to use permalinks, you will need to make a change inside another file:
    apache > Conf and find the file httpd.conf. Open that in a text editor. Use the search facility in the editor to find "rewrite". The line you need looks like this:

    #LoadModule rewrite_module modules/mod_rewrite.so

    You need to take away the hash sign so it looks like this

    LoadModule rewrite_module modules/mod_rewrite.so

    Now just save the file.

  10. prodentite
    Member
    Posted 2 years ago #

    Thanks for the responses

    1. I tried Kees' suggestion of a fresh download.- no luck. As for virtual hosts, I don't know.
    2. kionae- I don't know if it's enabled locally.
    3. Samuel- I just checked and the # is not there.

    One thing to note- the httpd.conf file is locked. I tried to unlock it, but no luck.

  11. Is LoadModule rewrite_module modules/mod_rewrite.so there at all?

  12. prodentite
    Member
    Posted 2 years ago #

    Yes, LoadModule rewrite_module modules/mod_rewrite.so is there.

  13. keesiemeijer
    moderator
    Posted 2 years ago #

    if you have this in your httpd.conf:

    <Directory />
        Options Indexes FollowSymLinks
        AllowOverride None
    </Directory>

    change it to:

    <Directory />
        Options Indexes FollowSymLinks
        AllowOverride All
    </Directory>
  14. bolamuyis
    Member
    Posted 1 year ago #

    prodentite, am having the same problem you've documented here. Were you ever able to resolve it? I've followed all the suggestions above but the problem still persist. Thanks.

  15. esmi
    Forum Moderator
    Posted 1 year ago #

    @bolamuyis: Please stick to your own topic.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags