Monthly Archives: February 2011

WordPress media “has failed to upload due to an error”

A quick checklist for myself, because this problem nearly always seems to occur on a fresh WordPress install, and it’s easy to forget what works!

1. Create the uploads folder yourself, in lowercase – “uploads” not “upLoads”

2. upload this folder to the wp-content folder

3. change the uploads folder’s permissions to 777 (and temporarily change wp-content to 777 as well just to be sure)

4. go to settings > media and add the full url to the uploads folder into the “Full URL path to files” field.

5. upload an image

6. reset permissions for wp-content to what they were to start with.

No guarantees but it seems to work for me.

note: Since I originally put this up we have started using a different isp and the problem rarely occurs now, so the solution above is probably a solution for specific situations rather than across the board. However anything is worth trying if you’re stuck so I hope it’s useful to someone!


New look for Co-operative Futures

Co-operative Futures new homepage

A new brand and website for consultancy Co-operative Futures.

Read more in the portfolio


WordPress, Tinymce, br class=”spacer_”, and unwanted white space all over the place

Using WordPress with the TinyMCE advanced plugin, if you view your content in the html editor all the p and br tags are stripped away by default.

If you are used to working with ‘proper’ html you probably won’t like that.

You can get your p’s and br’s to display again by checking ‘Stop removing the <p> and <br /> tags when saving and show them in the HTML editor’, on the tinyMCE settings screen.

However you will probably start to find nasty unwanted white spaces appearing all over your pages:

<p><br class="spacer_" /></p>

has been inserted all over the place, seemingly at random.

I can’t find a way to stop this happening (trying to hack TinyMCE is beyond me) but the following jquery at least hides the unwanted empty lines.

$("p br.spacer_").each(function () {

where the displayNone class hides the p.

If you do want an empty paragraph somewhere on the page, use


and the jquery won’t hide it.