How to allow SVG upload in WordPress

WordPress disables SVG upload in media.
This is because SVG can contain harmful code that can be used to hack your site.
But if you’re the only one uploading files to your page, then you can enable it for convinience with editing the file “wp-config.php” and adding this line:
define(‘ALLOW_UNFILTERED_UPLOADS’, true);

After this, reupload the file and test it again.

You should now be able to upload your SVG graphics with no error as you disable the blocking of Upload types.