Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Kara Marotta
Kara Marotta
2,799 Points

getting error: video-file.m4v The uploaded file exceeds the upload_max_filesize directive in php.ini.

hello I keep getting: video-file.m4v The uploaded file exceeds the upload_max_filesize directive in php.ini. when i try to upload video. I've searched the web, i've tried to mess with php code, i've tried plugins that say my max upload is much bigger than this video. nothing is working. I'm using mamp, this is my first go with wordpress. i've tried to even upload the video via localhost on the php side of mamp. nothing seems to be working . help!

5 Answers

Ivan Penchev
Ivan Penchev
13,833 Points

Okay then this is easy to answer. php.ini is the configuration (settings) file for php, this is the language that wordpress uses.

The error "The uploaded file exceeds the upload_max_filesize directive". means exactly what it says, You are trying to upload a file (lets say 10 mb) however the maximum size you can upload to the server is 5 (lets say) mb.

In order to do that you need to locate the php.ini file that your MAMP uses.

To do this on the mamp panel at localhost you can just click php.info from the menu. Look for the value Loaded Configuration File. This tells you which php.ini file PHP is using in the context of the web server.

If you are using the Pro version you have this option, which should look something like this: Start MAMP PRO Edit File > Edit Templates > PHP <version number> php.ini Restart MAMP Pro

In both cases you are looking for a varible upload_max_filesize which has some MB setted next to it, just increases the MBs.

Ivan Penchev
Ivan Penchev
13,833 Points

can you tell us more about your wordpress hosting, which company is it from, what are the characteristics of it.

Kara Marotta
Kara Marotta
2,799 Points

Well I’m using mamp, so it’s local hosting. I’m doing the Wordpress basics lessons. Have not used a hosting service or ftp. Just local on my pc

Kara Marotta
Kara Marotta
2,799 Points

Thank you for the help. I tried making changes in MAMP Pro, it doesn’t seem to work. In fact I get an error loading my page. I can still load using basic mamp so I’m using that. How do I make changes in php.ini with basic mamp? I’m looking all over for this. Really appreciate the help

Kara Marotta
Kara Marotta
2,799 Points

It took some searching on basic mamp, you have to find the php file in mamp and make the adjustments in notebook. I tried doing this on MAMP Pro but it would error. Ivan gave good instructions. But for anyone in the future look for the php file in your mamp directory. Then search for upload_max_filesize. Change that value. I also did post_max_size