Need bigger files in WordPress?
At some point while uploading large media files, you may have run into a limit as to the maximum WordPress upload size allowed. This isn’t directly a WordPress configuration, but is a limit set by your web hosting provider. You can see the current limit by going to Media → Add New in your WordPress dashboard.
In the example above, my maximum upload file size is 24 MB. This would be plenty for photos, but perhaps I have an archive or large video file that exceeds that amount.
For a Definitive Answer…
Since the PHP configuration that controls the maximum upload size is a web server configuration (rather than just a WordPress configuration), the process to do it, and whether or not it’s even allowed, are different from web host to web host.
The best way to figure it out in your particular situation is to contact your web hosting company’s support group and ask. They’ll tell you how to change the value. If you’re on a shared hosting plan or have a stubborn web host, it might not be possible.
Or You Can Try And See What Happens
If you want to try to alter the upload limit on your own, here are two ways to attempt the change. In the examples below, we’re setting the value to 20 megabytes.
The .htaccess File
There should be a file called .htaccess located at the web root directory.
Open that file and add these lines:
php_value upload_max_filesize 20M
php_value post_max_size 20M
Save the file and check in WordPress to see if your upload limit has increased.
The php.ini File
Look for a file called php.ini in your web root directory.
If that file doesn’t exist, create it (either via your CPanel or FTP).
Look for the lines indicating
If those lines exist, increaes the values to your new upload limit. If they previously said 10M and you want to upload up to 20M, make that change.
If those lines didn’t exist, add these two lines:
upload_max_filesize = 20M
post_max_size = 20M
Save the file, and you may need to restart PHP. Then check in WordPress to see if your upload limit has increased.
If these DIY methods didn’t work, contact your web hosting company for a definitive answer that will work for your situation.
If the instructions in this section are unclear or are above your knowledge level, it’s best to just contact your web host as suggested above. ↩
Leave a Reply