WordPress blocks SVG uploads by default because SVG files can contain code, which could be used to attack a site.
To allow them safely:
- Go to Plugins › Add New Plugin and search for Safe SVG.
- Install and activate it.
- Upload SVGs through the Media Library as normal.
Safe SVG cleans each file as it's uploaded, removing scripts and other risky content. You can restrict uploads to administrators in its settings.
Only upload SVGs from sources you trust, and avoid code snippets that allow SVGs without sanitising them.