You try to upload a theme, a backup or a video to WordPress and it answers that the file exceeds the maximum upload size. The limit is not WordPress’s: it belongs to PHP, running underneath. You change it in two values, in the right place, and you confirm it on the upload screen itself.
See today’s limit
In the WordPress dashboard, under Media, Add New, you will find the maximum file size the server accepts. Write it down. It is the figure you want to see change.
Change it in four steps
| 1 |
Understand there are two values. upload_max_filesize is the largest single file. post_max_size is the largest whole request, and it has to be equal to or bigger than the first. Change only one and the visible limit may not move.
|
|
| 2 |
Choose the value. A little above the biggest file you will really upload. The bigger the value, the more memory and time an upload may need, so do not set the maximum for the sake of it.
|
|
| 3 |
Change it in the right place. If your account shows the PHP options in “Select PHP Version”, that is the simplest way. Otherwise, or if you want the value for one folder only, use a .user.ini file in that folder. What applies where is in php.ini and .user.ini.
|
|
| 4 |
Wait a little, then go back to the upload screen. PHP reads .user.ini every so often, so the change can take a while to show. When the limit on screen goes up, you are done.
|
|
Other values that travel with it
| Value |
What it is for |
upload_max_filesize |
The largest single file PHP accepts. |
post_max_size |
The largest request in one go. Equal to or bigger than the one above. |
memory_limit |
The memory PHP may use. Images and large files need more. |
max_execution_time |
The time PHP has to finish. A slow upload needs more. |
Uploading large files in PHP explains each one, and PHP limits shows the one that fails without a word.
|
WordPress run as a network (MultiSite) has a second limit. The network settings carry a value of their own for the maximum upload size, and it outranks PHP’s. And if the site goes through Cloudflare, Cloudflare itself caps the size of each request: in that case, send the file by FTP.
|
|
For very large files, avoid the browser. A heavy video or a backup file goes up better by FTP or File Manager, and it takes no PHP memory. For video, embed it from a video service instead of storing it in WordPress. See uploading files with FileZilla.
|
|
Changed the values and the limit will not move? Tell us the site address and where you changed them, and we will tell you what the server is applying.
Open a support ticket
|
RECOMMENDED PRODUCT WordPress hosting One-click install, updates handled, and speed that holds up. from KSh858.00/mo (3-year plan, with coupon) See plans |