If you’ve ever tried to upload a file to your WordPress site and suddenly got hit with the error:
“Sorry, you can’t upload this file type for security reasons.”
or
“You can’t add this file type.”
…then you’re not alone.
This is one of the most common upload problems WordPress users face.
The good news?
This error is easy to fix — safely — without breaking your site security.
In this complete guide, you will learn:
-
Why WordPress blocks certain file types
-
What file types WordPress supports
-
How to safely allow new file types
-
Exact fixes using plugins, code, hosting, and cPanel
-
How to fix the error for SVG, WebP, JSON, CSV, ZIP, EXE, APK, and more
-
Security tips (VERY important)
-
Common FAQs to give you easy solution
Let’s begin!
What Does “You Can’t Add This File Type” Mean in WordPress?
WordPress blocks certain file formats from being uploaded to protect your website from:
-
malware
-
viruses
-
executable files
-
malicious scripts
-
corrupted attachments
Every file has a MIME type (Multipurpose Internet Mail Extensions), which helps WordPress recognize the file’s purpose.
Example:
-
.jpg→ image/jpeg -
.png→ image/png -
.pdf→ application/pdf -
.svg→ image/svg+xml
If a file’s MIME type is not approved, WordPress instantly stops the upload.
Thus, the error happens because:
-
The file type is not allowed
-
The MIME type does not match
-
The server blocks the file
-
WordPress settings block unfiltered uploads
-
A plugin interferes with allowed file types
Now let’s fix it.
Supported File Types in WordPress (Default)
WordPress allows these file types without modification:
Images
-
JPG / JPEG
-
PNG
-
GIF
-
WebP
-
ICO
To improve performance and speed, it’s a good idea to optimize these image formats using a reliable tool. Here’s a full breakdown of the best WordPress image optimization plugins, including detailed comparisons.
You can also improve your site’s loading speed by enabling lazy loading for images. Here’s a complete guide on how to enable and optimize lazy loading in WordPress for better performance.
Documents
-
PDF
-
DOC / DOCX
-
PPT / PPTX
-
XLS / XLSX
-
ODT
-
PSD
-
RTF
-
TXT
Audio
-
MP3
-
WAV
-
OGG
Video
-
MP4
-
MOV
-
WMV
-
AVI
Archives
-
ZIP
Anything outside this list will trigger the “You can’t upload this file type” error.
Common File Types WordPress Blocks
These often cause the error:
-
SVG
-
JSON
-
CSV
-
PSD (sometimes)
-
WebP (older sites)
-
EXE
-
APK
-
RAR
-
TTF / OTF (fonts)
-
CSV
Now let’s fix this problem using safe and recommended methods.
Fix 1: Enable Unfiltered Uploads (Easiest and Safe for Admins Only)
If you are the admin and trust the files you’re uploading, this is the fastest fix.
Add this to your wp-config.php above the line:
/* That's all, stop editing! Happy publishing. */
Pros
-
Works for all file types instantly
-
Fastest fix
Cons
-
Only recommended for trusted admins
-
Not recommended for sites with multiple authors
Fix 2: Use a File Upload Plugin (Safest for Beginners)
The best way to allow new file types without touching code is using a plugin.
Recommended Plugins
-
WP Extra File Types
-
File Upload Types by WPForms
-
MIME Types Plus
How to Use WP Extra File Types
-
Install → Activate
-
Go to Settings → Extra File Types
-
Tick the file types you want
-
Save
Supports:
-
SVG
-
JSON
-
CSV
-
ZIP
-
WebP
-
Custom types
Why this method is great
-
Beginner-friendly
-
No risk of breaking site
-
No coding needed
If the changes don’t show immediately, your site may be loading an old cached version. Clearing your cache usually fixes this issue. Here’s a full comparison of the best WordPress caching plugins to help you choose the right one and boost your site performance.
Fix 3: Allow Specific MIME Types via functions.php (Safe Method)
If you want a developer-friendly method, add this code to your theme’s functions.php:
You can add more as needed.
Pros
-
Clean
-
Developer-friendly
-
Safe
Cons
-
Code can be lost after theme update unless child theme is used
Fix 4: Fix MIME Type Issues via Hosting (cPanel / DirectAdmin)
Sometimes hosting providers block certain MIME types. WordPress blocks unsupported file types or throws errors when server-level file permissions cause conflicts. Sometimes you may even face related issues like the destination folder already exists error in WordPress when uploading themes or plugins.
To fix via cPanel
-
Go to cPanel → MIME Types
-
Add the missing MIME type
Example for SVG:
-
Extension: svg
-
MIME Type: image/svg+xml
To fix via .htaccess
Add:
Fix 5: Disable Security Plugins Blocking Uploads
Plugins like:
-
Wordfence
-
Sucuri
-
iThemes Security
-
All-In-One Security
…sometimes block file uploads. If you’re not sure which security plugin you’re using or want to choose a better one, check out this list of the best WordPress security plugins, where we review the top options and compare features.
To fix
-
Temporarily disable the security plugin
-
Upload the file
-
Re-enable the plugin
-
Add allowed file type inside plugin settings
Fix 6: Fix Incorrect File Extensions
Sometimes the file extension looks correct but the actual file type is wrong.
Example:
-
A
.jpgthat is actually a.webp -
A
.svgwith scripts inside it
Solution:
Convert the file using an online converter or image editing software.
Fix 7: Upload via FTP (Bypass WordPress Restrictions)
If nothing works:
-
Open FileZilla / cPanel File Manager
-
Upload the file to
/wp-content/uploads/2025/ -
Copy file URL
-
Paste into WordPress
This bypasses MIME checks.
Fix 8: Allow SVG (Special Case)
SVG is powerful but risky because it can contain scripts.
Only allow trusted SVG files!
Use the Safe SVG plugin.
It sanitizes SVGs before upload.
Fix 9: Fix for Multisite Users
If you’re using WordPress Multisite:
WordPress blocks many file types at the network level.
Fix
Go to:
Network Admin → Settings → Upload Settings → Allowed file types
Add the file type.
Fix 10: Check PHP Version & Server Restrictions
Old PHP versions cause upload issues.
Minimum recommended: PHP 8.1+
Ask your host to update it for you.
Common File Types and How to Allow Each One
Allow SVG
Allow WebP
Allow JSON
Allow CSV
Allow ZIP
(Usually already enabled)
Allow EXE / APK / RAR (Not recommended)
These file types can be dangerous.
If you must allow:
Security Warning (VERY IMPORTANT)
Allowing risky file types (SVG, EXE, APK, JS, PHP, HTML) can expose your website to:
-
Malware
-
XSS attacks
-
Shell scripts
-
Server takeover
Always follow these safety tips:
-
Allow only the file types you truly need
-
Only admins should upload files
-
Scan files before uploading
-
Keep backups
Best Method Recommended (Safe + Easy)
Use:
File Upload Types by WPForms
It’s safe, beginner-friendly, supports custom MIME types, and prevents harmful files.
Conclusion
If you’ve tried everything and the error still won’t go away, don’t waste hours fighting WordPress. Get instant help from our experts with our Emergency WordPress Support service, available 24/7 for urgent fixes.
The “You can’t add this file type” error in WordPress is very common and usually easy to fix. Whether you choose a plugin, code snippet, wp-config update, or server-side fix — the error can be resolved within minutes.
Just remember:
-
Allow only trusted file types
-
Prefer plugins for safety
-
Use code only if you’re comfortable
-
SVGs must be sanitized
-
For risky file types, be extremely careful
If you follow this guide, you’ll never struggle with file upload restrictions again. To avoid future upload errors and keep your site running smoothly, follow this essential WordPress maintenance checklist, which covers updates, backups, cleanups, and performance checks.
FAQs About “You Can’t Add This File Type” in WordPress
1. Why does WordPress block file types?
To prevent malicious scripts and dangerous files that can infect your website.
2. Is it safe to allow all file types?
No. Only allow file types you trust.
3. How do I fix this error without plugins?
Use the upload_mimes filter in functions.php.
4. Why is SVG not allowed?
Because SVG can contain JavaScript, making it a security risk.
5. Does this error affect WooCommerce uploads?
Yes, WooCommerce still uses WordPress upload rules.
6. How do I allow file types for all users?
Add allowed MIME types in Network Admin (for multisite) or via plugin.