Support » Fixing WordPress » Mobi and ePub files disallowed

  • Resolved Bad_Egg


    I am an author with WordPress sites for my various books. I want to make updates available for my non-fiction but WordPress says that due to security reasons mobi and ePub files cannot be uploaded to my media database. I tried hotlinking to the mobi and ePub files stored on my main website but the hotlink returns a 404 error (a similarly hotlinked PDF is fine, so I know it isn’t a hotlink issue).

    Any plans to make acceptance of mobi and ePub files possible? It’s kind of a drag otherwise.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Just add this to your themes functions.php

    function addUploadMimes($mimes) {
        $mimes = array_merge($mimes, array(
            'epub|mobi' => 'application/octet-stream'
        return $mimes;
    add_filter('upload_mimes', 'addUploadMimes');

    Sorry for the late reply — this worked and thank you!

    No, it does not work. It is causing an error in loading the functions.php file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mobi and ePub files disallowed’ is closed to new replies.