View Full Version : ePub files on WordPress sites


Ravenswd
04-15-2012, 10:24 AM
I came to this forum looking for a solution to a problem I was having. I ended up finding the solution on my own, but I thought I would share it with you in case anyone else runs into the same problem.

If you have a WordPress site and you offer ePub files for download, then you may run into this strange condition I was experiencing:

Anyone who attempts to read the files on a Nook (and possibly other devices) gets nothing but a screen full of garbage nonsense characters. Sometimes it works correctly, though.

After a lot of digging, I discovered: It works properly if someone downloads the file and then manually transfers it to the Nook. If, however, they browse the internet on their Nook and download the file directly, they get a screen full of garbage.

The problem is that WordPress overrides the Mime Type that ePub files need to be identified properly when downloaded. (It does the same to mobi files as well, but for some reason they never gave me any problems.) This can be fixed easily by adding a line to your .htaccess file which will set the correct Mime Type:

AddType application/epub+zip .epub
AddType application/x-mobipocket-ebook .mobi

You can find more information at the same place I found this: http://eschipul.com/2010/08/adding-ebook-epub-and-mobi-downloads-to-wordpress/

If anyone else has the same problem I was having, I hope this helps you.