Adding attachments of any type to WordPress

All content here is written in relation to WordPress 3.0 self-hosted

Amazingly I failed to find a single page on the net describing this problem, or how to attach any files to WordPress.

It seems that the main problem is that the Content Uploader is geared towards uploading media – GIF, PNG, JPG, PDF, DOC etc… But if you want to upload other files (eg: .ZIP files) then the uploader will error out with a very useless File type does not meet security guidelines. Try another..

The problem here is that WordPress is looking at the extension of the file, blocking the content from being uploaded, but then provides no system to update the list of allowed extensions/MIME types.

Eventually I found a plugin (pjw-mime-config) which allows you to modify the registered MIME types supported by a WordPress installation. Simply install the plugin, visit the config section (Settings -> MIME Types) and add your extension/MIME type to the list.

Leave a Reply

Your email address will not be published. Required fields are marked *