WordPress Upload File Size Limit

It always happens on a new site, I try to upload a file, and wordpress tells me it is too big. Here is how you fix that. Assuming you have full access to your server, you can fix it by editing your php.ini file.

First, you need to find which php.ini file is loaded by your web server. To do that put a file called phpinfo.php file in your root directory with these contents:

<?php
phpinfo();
?>

Go to your.website/phpinfo.php and you should see something like this:

Find the loaded configuration file and edit with vi or nano. find and change the following items:


post_max_size = 20M
upload_max_filesize = 20M

I set mine to 20M – big enough for most files.

Restart your webserver and you should be all set. Reload the phpinfo file if you want to see your settings have taken.