How To Allow Additional Upload File Types in WordPress
Many file types you may want to upload to your WordPress blog or site will not be allowed by default. This is down to security concerns; uploading incorrect files etc that could bring down the site or introduce vulnerabilities. If you know what you are doing here is how to unlock any file type you want.
Don’t feel comfortable editing core files? Have a look through the plugins available.
A list of the default allowable file types for uploading is available here.
- Find the functions.php within the folder: wp-includes/
- Scroll down to the function: function wp_get_mime_types() {}
- Add a new line in the appropriate section, or the MISC section if you are unsure. For example, for adding the XML file type, insert the following line:‘xml’ => ‘application/xml’,Once you saved/uploaded you will be able to upload XML files within WordPress.List of all MIME types explained available here.
You may also want to take a look at How to Increase Your WordPress Memory Limit
Leave a Reply
Want to join the discussion?Feel free to contribute!