apache
Help: Uploading MP3s on WordPress doesn’t work
Today I ran into a minor issue with WordPress.
When uploading an MP3 file (in my case, although I’m sure many other file types) — I was getting an “HTTP Error” or “Internal Server Error” depending on how I uploaded the file. The file wasn’t even that big, just a 150K test file.
There were 2 things that had to happen..
Add an MP3 Mime Type
Out of the box, WordPress doesn’t want you to upload an MP3 file to the Media Library. You have to add it.
You can do this by using the “upload_mimes” hook in your functions.php file:
function addMimeTypes($mimes) {
$newmimes = array_merge($mimes, array(
'mp3' => 'audio/mpeg'
));
return $newmimes;
}
add_filter('upload_mimes', 'addMimeTypes');Disable FastCGI
Yes, unfortunately FastCGI use of PHP was causing me to have problems so I had to switch back to PHP being run as an Apache Module.
To do this, you’ll have to find out per your hosting provider how to do this. I’m at Media Temple and it was pretty easy.
Keep in mind that FastCGI lowers your memory usage, and disabling it may have other negative effects.
How to speed up your WordPress Blog
I finally got around to speeding up my WordPress blog and wanted to share with everyone the various things I did. I reduced my average page load time on certain pages from 15 seconds to about 1.5 seconds. That’s a big change.
My favorite test was a quick click through. On my new host I timed 6 page loads down to about 5 seconds. When I did the same test on my old setup, it took about 20 seconds (I know, below the 15 seconds average, that was really only for 1 page, but one of my most trafficked pages).
Please share, it makes me happy:
Subscribe to Email Alerts
Make a Donation
Popular Posts
Follow Me
Recent Posts
Archives
Tags
Blogroll
- 456 Berea St
- ActionScript 3 Design Patterns
- adactio – home of Jeremy Keith
- ajaxian
- Boxes and Arrows
- Chris Brogan
- CSS Globe
- InsideRIA
- Jarrod Michael Studios
- Johan Brook: Designer and Developer
- Mad Vertices
- NETTUTS
- Portsmouth Community Calendar
- Roomware Blog
- Signal vs. Noise
- Six Revisions
- Snook
- Style Grind
- Tiago’s Weblog
- Viget Extend
- Vitamin
- Whats the latest
- Woork
- zupko.info
