file type is not permitted 📝 WordPress

WordPress: Sorry, you are not allowed to upload this file type / Sorry, this file type is not permitted for security reasons

WordPress blocked the upload because the file extension/MIME type isn’t in its allowed list (SVG, JSON, WEBP on old versions, fonts, etc.).

Seen on: WordPress

Meaning

WordPress checks both the extension and the real content type. SVG, JSON, CSV variants and font files are blocked by default; files whose content doesn’t match the extension are also rejected.

Common causes

  • Extension not in the allowed list (SVG, JSON, fonts)
  • Real MIME type doesn’t match the extension
  • Multisite network upload file types setting
  • Security plugin restrictions

⚡ Quick fix

  1. Allow the type with the upload_mimes filter (sanitize SVGs!)
  2. Use a dedicated plugin for SVG uploads (sanitizes)
  3. Multisite: add the extension in Network Settings → Upload file types

Detailed fix by platform

WordPress

  1. php
    add_filter('upload_mimes', function ($m) {
        $m['json'] = 'application/json';
        return $m;
    });

How to diagnose

  1. Type — Extension and real MIME (file --mime-type)
  2. Site — Multisite settings?
  3. Plugins — Security plugin rules

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.