(Solved) WordPress Dissallow to Upload SWF Files

Friday 27 September 2013
Posted in: WebDev

Do you remember my previous post, about e-belajar project? Yes it still continue, I’ve changed the domain from e-belajar.co.cc (which is free) to loveit.web.id (paid).

I don’t understand about my site configuration. Previously, I was able to upload a SWF file (*.swf) to my WordPress media. I need to upload flash file because I need to embed flash object to my post in loveit.web.id.

unable to upload swf file wordpress

Maybe it because I’ve upgrade my WordPress version into the latest? Right now I’m unable to upload flash file. There’s warning message showing up after the process uploading end.

Sorry, this file type is not permitted for security reasons

After do some Google on bing, I found a solution for that. I adding this function into my WordPress function file.

/* allow upload flash */
add_filter('upload_mimes', 'add_custom_upload_mimes');
function add_custom_upload_mimes($existing_mimes){
$existing_mimes['swf'] = 'text/swf'; //allow csv files
return $existing_mimes;
/* allow upload flash */

You might also enjoying this post.