Support » Fixing WordPress » missing htaccess

  • ryanmuir


    So i am trying to increase memory allocation for the PHP code in order to solve a problem i am having with my WordPress/Gallery plug in, however, i dont seem to have an .htaccess file in my installation. I created one with only the line i needed to add, and it messed up every page on the server, i took it down and everything worked fine again. so here comes the question.

    How do I restore my .htaccess, or what does it need to include to not screw up the server?


Viewing 10 replies - 1 through 10 (of 10 total)
  • I’m not sure what memory allocation has to do with .htaccess, but I can explain how you can get yours functioning again.

    What you want to start with is a totally empty .htaccess file in your blog’s root folder. Certain things need to be written *first* in order for rewriting to work. The next thing you want to do is go to Options -> Permalinks, figure what you want, and hit ‘Update’. This will write in all the correct rules, correctly.

    If you are still having trouble your host might be using an older version of Apache. Try this plugin if that’s the case.

    I can’t see how an “older version of apache” would make any difference, unless it was truly ancient.

    ryanmuir – if you upload a blank .htaccess to your blog’s root directory make sure that it is writable by the server. Most FTP clients should allow you to do a CHMOD 666 on the file

    Actually now that I read back more about it in Google’s cache of that page, this makes more sense to me. I can explain: if your web server is still using Apache 1.3 (which many still do) it would be a good idea to get this. The plugin works around a bug in Apache 1.3’s use of mod_rewrite which causes it to use “greedy? regexes, which if your goal is to increase memory… well, definately a good idea.

    I also found a workable download.

    How do you create an .htaccess file?

    If your file manager has an option to create a file, you can use that. Otherwise, I think you could use a text editor, such as Notepad. Create a file, but leave it completely blank/empty. Name it “.htaccess” That’s it. In my file manager this was very simple; I just typed in the name, hit enter, and that was it. In a text editor, you will need to choose the “save as” option for “all files” and type “.htaccess” instead of letting it append “.txt” Once the file is in your directory, the program will put INTO the file whatever it needs to.

    My 2.0 installation had no .htaccess file either. I created one and put it in the root folder (not in the wordpress/ folder). How can I make WP find it?

    Hmmmm…I’m not sure. Mine just DID. This might be a silly question, but did you do anything in WordPress yet that REQUIRES the .htaccess file (like changing the permalink settings)?

    WordPress does not find nor use an .htaccess file

    The .htaccess file is used by the Apache web server to determine what rules need to be executed on any files requested from the directory in which the .htaccess file is found, as well as any subdirectories.

    If you put the .htaccess file in your WordPress directory, it will affect any files requested of that directory or its subdirectories by any web user.

    You create an .htaccess file by saving a text file as .htaccess

    You should really look for a primer on htaccess. There are a billion out there but WordPress has their own. Again, .htaccess is not a tool of WordPress, it is used by the Apache web server software.

    I had forgotten about this thread so I hadn’t updated it. Sorry.

    But it turned out that my particular problems had to do with my using Safari 1.3.2. When it dawned on me to try Firefox, voilá, the .htaccess file was created and various stuff turned up in my administration pages that Safari just hadn’t showed. I had tried in vain to get Iimage Browser to work for example.

    Geoffe: I _had_ spent a lot of time reading about .htaccess. Trouble was, the information did nothing towards solving my problem. Which was just plain User Error. 🙂

    This was great. Helped quite a bit.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘missing htaccess’ is closed to new replies.