WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to upload an XML file (RSS feed) as part of a product in the WP-Ecommerce plug-in.

The idea being that a customer buying the product would be given this XML file to download which ideally launch iTunes to download the balance as part of a podcast.

I can't seem to upload the .XML feed file. I can upload other file types without a problem, but that one seems to be blocked. Where would I go to allow .XML files to be uploaded? Is it a WP-ECommerce thing, a WordPress thing, or perhaps something on the hosted server itself?

share|improve this question

WordPress does not allow uploads of .xml files but you can add it by adding a mime type for it. This worked for me:

function addUploadXML($mimes) {
    $mimes = array_merge($mimes, array('xml' => 'text/xml'));.
    return $mimes;
add_filter('upload_mimes', 'addUploadXML');

Also, when I researched the mime type, I came up with a number of different suggestions for what to use as a mime type for xml. I just used 'text/xml' but I also saw 'application/rss+xml' and 'application/xml' among others.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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