Quantcast
Viewing all articles
Browse latest Browse all 3201

MacManX (James Huff) on "Can't upload an .xml file: security error"

Ah, ok. The Media uploader only uploads certain files: http://codex.wordpress.org/Uploading_Files#About_Uploading_Files_with_WordPress

The easiest way around that is to of course upload the file via SFTP or FTP instead: http://codex.wordpress.org/FTP_Clients

Another way around it is to add this to your theme functions file, which apparently does work, but I honestly never recommend things like this (when FTP is perfectly doable option):

add_filter('upload_mimes', 'custom_upload_xml');

function custom_upload_xml($mimes) {
    $mimes = array_merge($mimes, array('xml' => 'application/xml'));
    return $mimes;
}

via http://ernieleseberg.com/xml-uploads-in-wordpress/


Viewing all articles
Browse latest Browse all 3201

Trending Articles