Sometimes when you try to upload a file to WordPress®, you’ll see this error: “Sorry, this file type is not permitted for security reasons.” 1 Or if you’re using the latest version of WordPress, the error message may say, “Sorry, you are not allowed to upload this file type.”
This usually occurs because the file’s MIME type (also called “Media type”) is restricted from upload due to default WordPress settings.
Luckily, there are several ways to authorize additional file types for upload.
MIME stands for Multipurpose Internet Mail Extensions. MIME types are used by browsers and other internet devices to determine the type of content associated with a page.
For instance, if you have a .png file and a .jpeg file on a page, the browser would know by their MIME types (not their file extension) to treat both files as images, rather than videos or other file types.
By default, WordPress stores a list of registered MIME types in wp-includes/functions.php. However, not all MIME types recognized are allowed to be uploaded in the WordPress admin dashboard.
Images | .jpg .jpeg .png .gif .ico |
Documents | .pdf (Portable Document Format; Adobe Acrobat) .doc, .docx (Microsoft Word Document) .ppt, .pptx, .pps, .ppsx (Microsoft PowerPoint Presentation) .odt (OpenDocument Text Document) .xls, .xlsx (Microsoft Excel Document) .psd (Adobe Photoshop Document) |
Audio | .mp3 .m4a .ogg .wav |
Video | .mp4, .m4v (MPEG-4) .mov (QuickTime) .wmv (Windows Media Video) .avi .mpg .ogv (Ogg) .3gp (3GPP) .3g2 (3GPP2) |
To allow uploading of file types not listed above, there are a few ways to get around the restrictions.
We recommend WP Extra File Types. Setup is really simple, just click the file types you want to allow and save your changes.
Other plugin options include:
If you’re code-savvy, you can add the requirements to the active theme’s functions.php file. The example below can be modified for the file types you want to allow:
function my_theme_custom_upload_mimes( $existing_mimes ) { // Add webm to the list of mime types. $existing_mimes['webm'] = 'video/webm'; // Return the array back to the function with our added mime type. return $existing_mimes; } add_filter( 'upload_mimes', 'my_theme_custom_upload_mimes' );
All uploads can be authorized with the addition of the following line to the site’s wp-config.php file:
define('ALLOW_UNFILTERED_UPLOADS', true);
It’s important to note that this allows all file types to be uploaded by administrator-level users. It’s best practice to add file types as needed.
If you are developing a multisite, you can edit MIME types directly from the multisite settings, no plugins or coding required!
If you have any questions our Happiness Engineers are here to help!
New to Flywheel? Start here, we've got all the information you'll need to get started and launch your first site!
View allLearn all about managing your Flywheel user account, Teams and integrations.
View allFlywheel hosting plans include a ton of great features. Learn about how to get a free SSL certificate, set up a staging site, and more!
View allAll the server and setting info you'll need to help you get the most out of your Flywheel hosting plan!
View allTips and tricks for managing your sites on Flywheel, including going live, troubleshooting issues and migrating or cloning sites.
View allLearn more about Growth Suite, our all-in-one solution for freelancers and agencies to grow more quickly and predictably.
Getting started with Growth Suite
Growth Suite: What are invoice statuses?
Growth Suite: What do client emails look like?
Learn more about Managed Plugin Updates, and how you can keep your sites up to date, and extra safe.
Restoring Plugin and Theme Management on Flywheel
Managed Plugin Updates: Database upgrades
Managed Plugin Updates: Pause plugin updates
We can help! Check out our Brand Resources page for links to all of our brand assets.
Brand Resources