Title: .htaccess-file missing
Last modified: August 19, 2016

---

# .htaccess-file missing

 *  Resolved [Karo](https://wordpress.org/support/users/hypsnos/)
 * (@hypsnos)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/htaccess-file-missing-1/)
 * 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!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Clicknathan](https://wordpress.org/support/users/clicknathan/)
 * (@clicknathan)
 * [17 years ago](https://wordpress.org/support/topic/htaccess-file-missing-1/#post-1079738)
 * 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.
 *  [shane-g](https://wordpress.org/support/users/shane-g/)
 * (@shane-g)
 * [17 years ago](https://wordpress.org/support/topic/htaccess-file-missing-1/#post-1079770)
 * Hi,
 * 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] </IfModule>
 * # END WordPress
 * <IfModule mod_security.c>
    SecFilterEngine Off SecFilterScanPOST Off </IfModule
   >
 * Also set your desired permalinks from the wordpress admin area..
 * [spam link moderated]
 *  Thread Starter [Karo](https://wordpress.org/support/users/hypsnos/)
 * (@hypsnos)
 * [17 years ago](https://wordpress.org/support/topic/htaccess-file-missing-1/#post-1079873)
 * 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!! 🙂
 * Yours
 * Hypsnos

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘.htaccess-file missing’ is closed to new replies.

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [Upload Image](https://wordpress.org/support/topic-tag/upload-image/)
 * [upload media](https://wordpress.org/support/topic-tag/upload-media/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Karo](https://wordpress.org/support/users/hypsnos/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/htaccess-file-missing-1/#post-1079873)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
