how to upload and allow downloads of .mobi and .epub formats

Assuming that you are using the WordPress native Media uploader then you can use the upload_mimes filter hook to add or remove allowed file types, for example: function custom_myme_types($mime_types){ //Adding avi extension $mime_types[‘avi’] = ‘video/avi’; //Removing the pdf extension unset($mime_types[‘pdf’]); return $mime_types; } add_filter(‘upload_mimes’, ‘custom_myme_types’, 1, 1); You can see that to add a file … Read more

How to handle image resize in media_handle_sideload?

If you look at media_handle_sideload in source, you can see how it works. The function that generates the various sizes is within wp_generate_attachment_metadata, the image_make_intermediate_size function. You could possibly use the wp_handle_sideload function instead and manually resize it via image_make_intermediate_size.

increase maximum upload file

Please try to upload the php.ini file to the document root directory or to the same directory as wp-config.php. You may also want to modify memory_limit to 120M and modify max_execution_time to 300.