All help articles
Updated on January 25th, 2024
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.” 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.
Table of Contents:
- MIME types explained
- Plugin method to authorize uploads for additional MIME types
- Functions.php method to authorize uploads for additional MIME types
- Allow unfiltered uploads via wp-config.php
- Configure multisite upload settings
MIME types explained
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.
File types supported by default
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.
Authorize uploads for additional MIME types using a plugin
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:
Authorize uploads for additional MIME types via functions.php
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' );
Allow unfiltered uploads via wp-config.php
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.
Note
Since Flywheel restricts editing the WordPress core, including wp-config.php, please reach out to our support team to perform this change.
Configure multisite upload settings
If you are developing a multisite, you can edit MIME types directly from the multisite settings, no plugins or coding required!
- From the WordPress admin area, navigate to Network Admin > Settings > Network Settings
- Scroll down to Upload Settings and add or remove file types from the Upload file types field.
Need help?
If you have any questions our Happiness Engineers are here to help!
Getting Started
New to Flywheel? Start here, we've got all the information you'll need to get started and launch your firstsite!
- Migrate your site to Flywheel using Flywheel Migrations
- Go live on Flywheel
- Demo sites on Flywheel
View all
Account Management
Learn all about managing your Flywheel user account, Teams andintegrations.
- Collaborators in Flywheel
- Transfer subscriptions between your account and your organization
View all
Billing
Everything about billing, invoices and payments can be foundhere.
- Overage pricing
- Transfer billing to my client
View all
Features
Flywheel hosting plans include a ton of great features. Learn about how to get a free SSL certificate, set up a staging site, andmore!
- Deploy to Flywheel via SSH and GitHub Actions
- Backups on Flywheel
View all
Platform Info
All the server and setting info you'll need to help you get the most out of your Flywheel hostingplan!
- Database Access
- Not recommended plugins
- SFTP Access and Uploads
View all
Site Management
Tips and tricks for managing your sites on Flywheel, including going live, troubleshooting issues and migrating or cloning sites.
- Managed Plugin Updates: Overview
- Enable/Disable WP_CACHE
- Point your DNS to Flywheel
View all
Developer Hub
Learn how to connect, deploy, and more with SSH on Flywheel's platform.
- SSH tunneling to access your site’s database
- Deploy to Flywheel via SSH and GitHub Actions
View all
Growth Suite
Learn 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?
View all
Managed Plugin Updates
Learn more about Managed Plugin Updates, and how you can keep your sites up to date, and extra safe.
- Managed Plugin Updates: Database upgrades
- Managed Plugin Updates: Pause plugin updates
- Managed Plugin Updates: Plugin Security Alerts
View all
Flywheel help
Help is just a click away! Log into Flywheel dashboard to instantly chat with an expert, respond to a ticket, or follow along with in-depth documentation. We happily offer support 24 hours a day, 7 days a week, 365 days a year!
Log in
Launch your next WordPress site inminutes.
Free migrations
24/7/365 support
14 daydemosites
Get started
- Watch a demo video
- Pricing
- Sign up
- Move site(s)
- Go live
- Become a partner!
Features
- WordPress hosting
- All-in-one SFTP
- Collaborators
- Billing transfer
- Demo sites
- Staging environment
- Demo sites
- Staging environment
- Local development
- Free migrations
- Local development
- Free migrations
- 24/7/365 support
- All features
Flywheel for
- Agencies
- Freelancers
- High-traffic sites
- Marketing teams
- WooCommerce sites
- All testimonials
Resources
- Blog
- Agency Directory
- Free WordPress themes
- Ebooks
- Videos
- Case studies
- All resources
Company
- About
- Security
- Careers
- Life at Flywheel
- Contact us
Customers
- Get support
- Help docs
- App status
- Product updates
- Agency Partners
- Referrals
- Upgrade plan
© 2013–2024 WPEngine, Inc. All rights reserved.
WP ENGINE®, VELOCITIZE®, TORQUE®, EVERCACHE®, and the cog logo service marks are owned byWPEngine,Inc. | Privacy Policy