I hope you enjoy reading this blog post. If you want my team to just do your marketing for you, click here.
When working within your WordPress website, it’s common that you will have to upload files to your site. Usually they will be in the form of photos, but sometimes you might need to upload a pdf document or videos to the site. By default most web hosts put limits on the size that file uploads can be. They are usually anywhere from 2MB to 8MB in size.
As you’ve probably figured out, this can be a big issue for site administrators, as video is typically larger than 8MB, especially if you’re hosting high definition content. Likewise, some pdf books are way larger than 2MB, and can even be 100MB or more depending on the size of the book or content.
After performing a few searches on Google, I stumbled across a post that reveals the answer to the problem. It all has to do with a little variable in the php.ini file called post_max_size.
While a lot of people thought it was just an issue with WordPress itself, it’s in fact totally unrelated. What we need to focus on here is server related and deals with the php.ini file that communicates with the apache web server.
The post_max_size variable sets the maximum size of POST data that PHP will accept. Therefore even if you have these variables set like so:
file_uploads = On
upload_max_filesize = 1000M
WordPress is going to limit you to 8MB upload since you can’t send POST data over that amount. So the solution here is simple. By setting the post_max_size to a higher value (say 1000MB), you can upload as many large files as you want.
If you ever need to upload a larger file, just change that number to something greater.
In the writing of this article, we’re using a VPS server to deploy our websites. Depending on your website’s host, you may not be able to access the php.ini file to make this change (especially on shared hosting). In those cases you can usually get in contact with customer support and ask them for assistance in getting that resolved.