[resolved] .htaccess-file missing (4 posts)

  1. Karo
    Posted 6 years ago #

    I'v downloaded and started using my wordpress domain. Now, when I for the first time needed to upload images straight from my server -I get an error.
    After some searching around the forum I found that my .htaccess file is missing -as in not downloaded.

    What I have done:

    *Changed my DNS-settings (my host told me to do this)
    *Asked if my host support mod_rewrite -they do!
    *Created an .htaccess file and uploaded it to the root om my website

    But what goes in it? For now the .htaccess is empty because I don't know what to do with it! What kind of code is in the one that wordpress should have created?

    If someone could give me a visual example that would be great!

  2. Clicknathan
    Posted 6 years ago #

    If you go into Settings > Permalinks and edit your Permalinks settings (as in, choose the one you want / had previously), WP will create the .htaccess file for you, assuming the one you uploaded has write access.

    That should do it as far as creating what WP needs for the .htaccess file.

    I've never heard of .htaccess having much to do with file upload errors. Usually this is either an issue with your /wp-content/uploads folder not being writable.

  3. Shane G
    Posted 6 years ago #


    Create a .htaccess and assign write permissions to that file after that add this code into that file:

    # BEGIN WordPress

    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off

    Also set your desired permalinks from the wordpress admin area..

    [spam link moderated]

  4. Karo
    Posted 6 years ago #

    Wow! Thank you so much both of you, but it was Shane G's explanation that really worked for me!

    I changed the .htaccess code and also followed this from your website!

    2) Change the permissions of upload folder to 755.

    3) Go to your WordPress Admin then Settings - Misc. Set ‘Store uploads in this folder’ to: wp-content/uploads and leave Full URL path to files blank.

    I've had this problem with me in my dreams, thank you!! :)



Topic Closed

This topic has been closed to new replies.

About this Topic