Don’t Panic! Solving the "File Type Not Permitted" Error in WordPress
Ever tried to upload a file to your WordPress site, only to be slapped with the dreaded message: “Sorry, this file type is not permitted for security reasons”? It’s frustrating, right? You might think, “¿Qué pasó?” Did I just try to upload something dangerous? Is my site in trouble? Don’t worry, amigo. This message is just WordPress giving you a heads-up that the file type you’re trying to upload isn’t allowed.
In this chat, let’s dig into why you’re seeing this error and, more importantly, how to fix it without losing your cool.
Understanding the “File Type Not Permitted” Error
Picture this: You’re loading your website with dreams of growing your business online, and instead of success, you hit a wall. This error pops up because WordPress has a list of file types it supports for safety reasons. If you stray from that list, you’ll be met with this message.
For example, if you attempt to upload a new image format like AVIF, which is still shaking things up in the tech world but isn’t widely recognized yet, you’ll get that error. WordPress is like that cautious friend who won’t let you try the new dish at a restaurant because they’re worried it’ll make you sick.
Let’s take a closer look at what file types WordPress does allow!
Common WordPress File Types
You can share and upload various file types on WordPress, but they need to fit into specific categories. Understanding these can save you from frustration.
Images
- .jpg
- .jpeg
- .png
- .gif
Documents
- .doc, .docx
- .ppt, .pptx
- .xls, .xlsx
Audio
- .mp3
- .wav
Video
- .mp4, .m4v
- .mov
- .wmv
WordPress also lets you upload HTML files, but it’s best not to upload videos directly. They can eat up storage and slow your site down. Instead, consider using a video hosting service – it’s like letting someone else do the heavy lifting while you sit pretty.
Got an Error? Let’s Fix It!
If you want to skip the hassle of that error message, let’s explore some easy solutions to get back to business:
1. Double-Check Your File Extension
This might sound simple, but sometimes we accidentally save files in the wrong format. Before diving into settings, make sure your file’s extension is correct. If you tried uploading a .jpg but saved it as .avi, that’s going to trigger the error.
2. Adjust Multisite Network Settings
If you’re running a network of sites with WordPress Multisite, you can easily allow additional file types through your settings. Head over to Settings > Network Settings, scroll down to Upload Settings, and add the file extension you need.
If you’re using a single site, don’t worry, we have other solutions for you.
3. Edit Your wp-config.php File
Want to allow any file type to be uploaded? You can add a single line of code to your wp-config.php file. Just remember to back it up first! Here’s how:
- Get into your File Manager via the hosting control panel.
- Find the public_html folder and locate wp-config.php.
-
Paste this line above
/* That’s all, stop editing! Happy blogging. */
:
php
define(‘ALLOW_UNFILTERED_UPLOADS’, true); - Save the changes and log back in.
This gives you a wide-open door, but it’s safer to specify what you want!
4. Use the functions.php File
For stricter control, you can extend uploads in the functions.php file. Add MIME types using a filter. After editing, you can allow specific file types like SVGs easily!
5. Plugin Power
Don’t want to mess with code? No problem! You can use plugins like WP Add Mime Types or File Upload Types by WPForms. They simplify the process:
- Install and activate the plugin.
- Go to Settings > File Upload Types.
- Check the extensions you want to add and save.
6. Time to Call for Help
If all else fails, don’t hesitate to reach out to your hosting provider. They might have stricter limits and can help navigate the situation better.
Closing Thoughts: Secure Your Uploads
While it’s tempting to bypass these restrictions, think about security — especially for your business in McAllen. Uploading any file type can open the gate to malware and potential threats.
Being selective about file types keeps your site safe from malicious intrusions. Always make sure to upload files from trusted sources and regularly scan for malware.
Want a website that does more than just sit there? A professional, custom-built site from a trusted local provider can make a world of difference in your marketing, lead conversion, and sales strategies.
Ready to upgrade your online game? Let’s talk! Contact Ericks Webs Design today, and let’s build something that truly works for your business!
Source:
https://blog.hubspot.com/website/file-type-not-permitted-security-reasons