sudo vim   /var/www/html/wp/wp-config.php

I have add the line in wp-config.php. enter image description here

why still can't upload deb package whose size is only 5m in my wordpress?

enter image description here


2 Answers 2


I think the error message speak for itself. The "file type is not allowed". WordPress upload only allowed for certain file types, see Uploading Files.

  • You can customize the file type which can be uploaded to whichever you like.
    – showkey
    Commented Jan 29, 2017 at 5:24
  • 1
    $existing_mimes['exe'] = 'application/exe'; it can make exe file to be uplaoded.
    – showkey
    Commented Jan 29, 2017 at 5:25

sudo vim /var/www/html/wp/wp-includes/functions.php

function custom_upload_mimes ( $existing_mimes=array() ) {
    $existing_mimes['deb'] = 'application/deb';
    return $existing_mimes;
  • 2
    That's not the functions.php you want to touch. It will be overwritten with the next WP update.
    – fuxia
    Commented Jan 29, 2017 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.