You are currently viewing Enable uploading .csv file type on your WordPress Website

Enable uploading .csv file type on your WordPress Website

Step 1: Copy the code below & paste it to your 'wp-config.php' file your WordPress website directory

				
					define('ALLOW_UNFILTERED_UPLOADS', true);
				
			

Step 2: Copy the code below & paste it to your theme's 'functions.php' file

				
					function my_custom_mime_types( $mimes ) {
$mimes['csv'] = 'text/csv';
unset( $mimes['exe'] );
 return $mimes;
}
add_filter( 'upload_mimes', 'my_custom_mime_types' );
				
			

Leave a Reply