.htaccess

WordPress 3.4.1 upgrade stopped Media Library working

I recently upgraded one of my WordPress websites to version 3.4.1. As soon as I did this I started experiencing issues with my media library.

Whenever I uploaded an image to the library I would be hit with a 404 error. I also got the same when I tried inserting an image into a post.

I searched the net extensively and tried many possible fixes but none of them worked. I tried altering my .htacces file (http://wordpress.org/support/topic/file-upload-link-error-404), I tried re uploading my wp-admin and wp-includes folders. I made sure my permissions were correct for the uploads folder and also the wp-content folder. I switched to the WordPress TwentyEleven theme but still the same issue was there. I even created a new site on the same host and was experiencing the same issue so decided it was something to do with my host.

I contacted my hosting company and explained the problem to them and with a couple minutes they had rectified the issue. Apparently the mod_security module was causing the conflict. They disabled it and just like that my site was working again.

A lot of the blog posts I found while searching for this had said that it was something to do with mod_security but none of the things I added to the .htaccess file seemed to be effective. 

I hope this helps someone having the same I had.

Some images return 404 error on wordpress site

I recently ran into an issue on a wordpress site I maintain. Images randomly stopped showing up on the site.
On further investigation I found that the images were just returning a 404 error.
After some searching the internet, I came across this article which basically said that it had something to do with the plugin ‘User Access Manager’.
The plugin adds a .htaccess file to the wp-content/uploads folder which stopped images being retrieved correctly.
The .htaccess file contains the following code

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) /index.php?uamfiletype=attachment&uamgetfile=$1 [L]
 Scroll to top