Skip to content

Instantly share code, notes, and snippets.

@TracKer
TracKer / allowSVG.php
Created July 3, 2018 09:29 — forked from benfrain/allowSVG.php
Allow SVG upload and preview to Media area of Wordpress (add this to functions.php)
function custom_mtypes( $m ){
$m['svg'] = 'image/svg+xml';
$m['svgz'] = 'image/svg+xml';
return $m;
}
add_filter( 'upload_mimes', 'custom_mtypes' );

For your Ruby, you'll must install this gems:

sudo gem install passenger

sudo passenger-install-apache2-module

At this moment, you'll asked to install some Apache2's deps (three deps):

sudo apt-get install apache2-prefork-dev