How To Upload APK file In WordPress ,.WordPress allows you to only upload the most commonly used file types. Trying to upload an .apk file to your WordPress post? Getting: Sorry, This file type is not allowed. Please try another.

How To Allow Upload Of APK Fileapk-file-wordpressapk-file-wordpresss In CMS WordPress

we will show you how to add additional file types to be uploaded in WordPress. WordPress allows you to upload most common image files, audio/ video, PDF, Microsoft office and OpenOffice documents.

add this code in your theme’s functions.php

  • go to theme – Open the functions.php file of the theme you are using, located in:
    wp-content/themes/xxx-your-selected-theme-xxx/functions.php
  • And add this lines of code:
add_filter('upload_mimes', 'acp_custom_mimes');

function acp_custom_mimes ( $existing_mimes=array() ) {
// ' with mime type '<code>application/vnd.android.package-archive</code>'
$existing_mimes['apk'] = '<code>application/vnd.android.package-archive</code>';
return $existing_mimes;
}

you just have to add additional lines of code like: wordpress allowed file types

.auaudio/basic
.avivideo/msvideo, video/avi, video/x-msvideo
.bmpimage/bmp
.bz2application/x-bzip2
.csstext/css
.dtdapplication/xml-dtd
.docapplication/msword
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotxapplication/vnd.openxmlformats-officedocument.wordprocessingml.template
.esapplication/ecmascript
.exeapplication/octet-stream
.gifimage/gif
.gzapplication/x-gzip
.hqxapplication/mac-binhex40
.htmltext/html
.jarapplication/java-archive
.jpgimage/jpeg
.jsapplication/x-javascript
.midiaudio/x-midi
.mp3audio/mpeg
.mpegvideo/mpeg
.oggaudio/vorbis, application/ogg
.pdfapplication/pdf
.plapplication/x-perl
.pngimage/png
.potxapplication/vnd.openxmlformats-officedocument.presentationml.template
.ppsxapplication/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptapplication/vnd.ms-powerpointtd>
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation
.psapplication/postscript
.qtvideo/quicktime
.raaudio/x-pn-realaudio, audio/vnd.rn-realaudio
.ramaudio/x-pn-realaudio, audio/vnd.rn-realaudio
.rdfapplication/rdf, application/rdf+xml
.rtfapplication/rtf
.sgmltext/sgml
.sitapplication/x-stuffit
.sldxapplication/vnd.openxmlformats-officedocument.presentationml.slide
.svgimage/svg+xml
.swfapplication/x-shockwave-flash
.tar.gzapplication/x-tar
.tgzapplication/x-tar
.tiffimage/tiff
.tsvtext/tab-separated-values
.txttext/plain
.wavaudio/wav, audio/x-wav
.xlamapplication/vnd.ms-excel.addin.macroEnabled.12
.xlsapplication/vnd.ms-excel
.xlsbapplication/vnd.ms-excel.sheet.binary.macroEnabled.12
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltxapplication/vnd.openxmlformats-officedocument.spreadsheetml.template
.xmlapplication/xml
.zipapplication/zip, application/x-compressed-zip
READ MORE:  LaGuardia Airport Advances with Groundbreaking of Terminal C

If you liked this article,…….

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}