“The uploaded file exceeds the upload_max_filesize directive”
Why WordPress rejects large uploads, how to check the current limit, and the options for uploading files bigger than it.
On this page
Does this match what you’re seeing?
- WordPress says the uploaded file exceeds the upload_max_filesize directive
- Theme or plugin zip uploads fail
- The media library shows a maximum upload size that’s too small
PHP limits the size of a single upload with upload_max_filesize, and the whole request with post_max_size. WordPress shows the effective limit in Media → Add New.
Option 1: raise the limit
Check whether these settings can be changed for your account, and raise both together — post_max_size must be at least as large as upload_max_filesize. Changing PHP settings: memory_limit, upload size and execution time
Option 2: upload another way
Big files don’t need to go through WordPress’s uploader.
- Themes and plugins: unzip on your computer and upload the folder into
wp-content/themesorwp-content/pluginsusing the File Manager or SFTP. How to upload and extract a zip file - Media: upload to
wp-content/uploadsvia SFTP, then use a media-import plugin to register them in the library.
Option 3: make the file smaller
- Images straight from a camera are often 5–10MB. Resize to the largest size your site displays and compress them. How to optimise images for a faster website
- Video belongs on a video platform, embedded in the page. It uses your 3GB and bandwidth quickly otherwise.
Everything in this guide works on Traxio’s WordPress hosting: £0.99 a month.
Common questions
How do I upload larger files to WordPress?
The limit comes from PHP’s upload_max_filesize and post_max_size. Raise both in your PHP settings. If the files are big — video especially — uploading by FTP into the right folder is faster and avoids the limit entirely.
What does “The link you followed has expired” mean in WordPress?
The file you tried to upload is larger than PHP allows, and WordPress reports it with that misleading message. Raise upload_max_filesize and post_max_size, or upload the file over FTP instead.
Spotted something out of date or unclear? Tell us and we’ll fix it.