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

Jonathan Pearson
PLUS
Jonathan Pearson
Courses Plus Student 6,704 Points

Maximum file size

I am trying to upload a zip file of a music album that is a little over 90mb but my limit is 32mb. Is there any way that I can change that?

5 Answers

Jonathan Pearson Hey there!

If you'd like to use a plugin rather than creating your own file via FTP, you can try this: https://wordpress.org/plugins/increase-upload-max-filesize/ (though I am not sure how well this works since I usually opt for the manual FTP file creation method)

If you'd like create your own file via FTP you can do this:

Create a file and name it " php5.ini " ...

Then place the following:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

(you can change the value to whatever, like 300M — though actual upload capability is based on your hosting provider)

If this doesn't work try changing the file name to "php.ini".

If none of the above works then it is likely you have a web host that ignores PHP ini rules set in these .ini files.

You can then refer to this article to try other methods i.e. (setting upload size in functions.php or .htaccess)

http://www.wpbeginner.com/wp-tutorials/how-to-increase-the-maximum-file-upload-size-in-wordpress/

Hope this helps, good luck!

Josiah

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

Thanks for the reply! I am very new at making my own site with wordpress so bare with me haha. Im not sure how to find my directory to my wordpress site to be able to do what you recommended. Not sure if you can help or if i just put myself in a crappy situation,

Jonathan Pearson No problem!

Do you know how to install plugins on your site?

If not, watch this: https://www.youtube.com/watch?v=AXM1QgMODW0

Then you can install this: https://wordpress.org/plugins/increase-upload-max-filesize/

Once you install that you can edit your upload limit :)

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

Yup I know how to install plugins :) I got a plugin that made it where i can upload 250mb! Im still having issues uploading the zip file of the album though. When i try to upload it it gives me a http error.

Jonathan Pearson

What plugin is it?

Do you have a lot of plugins on your site?

Try disabling all of them (except the one that allows memory limit to be expanded) and try uploading the zip.

It could be a plugin interfering. Also, try a stock theme, it could be your theme.

It may also be that your web hosting has a set upload size limit!

I would contact them to make sure with them to make sure.

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

Its called Upload Max File Size and my hosting is Web hosting for students. The plugin isnt that popular but the view reviews made it seem promising.

Do you have FTP access? Are you on windows or mac?

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

I'm not sure if i have ftp access. It sounds familiar though. And the domain and hosting is through Zac Gordons company Web Hosting For Students. Oh and I have a windows

Jonathan Pearson you should have FTP access if you are running on wordpress from Wordpress.org. Did you use CyberDuck or Filezilla to set up your wordpress? Or did you do it through your web hosting online panel?

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

I think i did it through the online panel. I honestly cant remember. Before I made my site I started using WordPress locally on my computer. I later switched over to using it live. So things got complicated for me when I made the switch. I went looking for my Word Press files on my comp and I can't seem to find them. Very stressful.

lol! sorry to hear that. well, do you have access to your web hosting account? if so, log in and find the files there (i dont have a student account so I cant help you there). if you are able to find the file manager (assuming there is one) then just create a php5.ini and/or php.ini file and add:

max_execution_time = 300;

memory_limit = 300M;

upload_max_filesize = 300M;

post_max_size = 300M;

If you can't find the files there, then you'll need to use filezilla to log into your server and view the files.

Then create a php5.ini and/or php.ini file, placing it in the root directory.

Here is how to set up filezilla: https://www.youtube.com/watch?v=MCGctsHKizw

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

I was able to find my username and password that Web hosting for students gave me for cpanel. Would I be able to find the files through that?

Yes! (well assuming they allow you too) lol.

Look for "File Manager" or something of that nature.

Then you'll see folders and such.

If you see wp-admin, wp-content and so on then that's where you should create the php5.ini file!!!

If you see folders but don't see wp-admin , wp-content and so on then look for a folder called "public ..." or "home ..."

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

Awesome! I found the File manager and the wp content/ admin! Do I create a new folder? Or do I put the php5.ini in another folder?

No!

(Before creating it, I'd open a new tab, log into your WP dash and uninstall/delete the upload file size plugin so they dont interfere.. I'd also just deactivate all other plugins for now just to be sure. That's just me though)

Moving forward... Just create a file in that directory (where you see those folders) and name it "php5.ini" .

Then open it and enter:

max_execution_time = 300;

memory_limit = 300M;

upload_max_filesize = 300M;

post_max_size = 300M;

Then save!

After that, you may or may not need to "reset the php web process" for it to work. I don't know if it will be necessary nor if your web hosting allows you to do this (in godaddy and other web hosting providers they do allow this).

But try it and go check and see if it did.

Haha!! I just wrote you about that! Check comment above ^^ also I'd disable all other plugins for now if I were you!

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

I made the file, entered the text that I needed and then I closed out cpanel and nothing happened. I deactivated all my plugins and it still says i can only upload 32mb. I'm not sure if I'm able to reset the php web process I'm not sure what that would look like.

Jonathan Pearson this is normal!

In your cPanel, look for "processes" or "system processes".

In there you can "kill" all web processes. It will basically refresh your php5.ini file.

(It won't ruin or affect anything else).

Also, sometimes depending on the hosting provider, they will only recognize either php5.ini or php.ini.

So you can also create a second file and call it "php.ini" with the same values if resetting the web processes doesn't work.

(I know about all this because I've had the same issue myself)

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

Hmm I'm looking around in cpanel and I'm not seeing anything like that. Do i need to click into something else to see that?

Hard for me to know without seeing your cPanel.

You could share a screenshot (just make sure no private info is listed) or you could call them.

Also, why don't you try creating a php.ini file in addition to the php5.ini file and see if it changes in your dashboard!

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

I created the second php file. So now i have php.ini and php5.ini and still nothing has changed. To fix this problem would i call cpanel or my hosting provider?

Yeah , all you need to do is reset the web / php processes so that if will update the new values set within the php.ini file.

So if you cant find that option, I'd call them!

otherwise, your .ini refresh rate is usually automated and will update on it's own after some time.

Good luck and let me know what happens!

Any luck!?

Jonathan Pearson
Jonathan Pearson
Courses Plus Student 6,704 Points

I tried contacting cpanel but it wouldnt let me send an email to them. Some sort of error with the system. And they don't have a phone number to call. Pretty unlucky day today with this stuff haha. i'll be trying to work on it during this week. I cant thank you enough for all your help! Very nice of you!

Hey no worries, you'll figure it out! Trust me! I'm surprised it hasn't refreshed on it's own. Let me know what happens once they respond!