How to Increase WordPress Upload Limit: A Complete Guide
Have you ever tried uploading a large image, video, plugin, theme, or backup to WordPress only to receive an error saying that the file is too large?
The WordPress upload limit is controlled by your hosting environment and PHP configuration. The limit determines the maximum file size that can be uploaded through WordPress.
For example, your website might display:
Maximum upload file size: 64 MB
If you try to upload a 100 MB file, WordPress will reject it.
Fortunately, there are several ways to increase the upload limit. The right method depends on your hosting provider, server configuration, PHP version, and whether you use a control panel such as cPanel or DirectAdmin.
What Is the WordPress Upload Limit?
The WordPress upload limit is the maximum size of an individual file that WordPress allows you to upload through the Media Library and certain other upload interfaces.
You can check the current limit by going to:
WordPress Dashboard → Media → Add New
WordPress displays the maximum allowed file size below the upload area.
For example:
Maximum upload file size: 128 MB
This value is generally controlled by PHP’s upload_max_filesize setting.
However, increasing only this value may not always be enough.
Several PHP directives can affect file uploads.
| PHP Setting | Purpose |
|---|---|
upload_max_filesize | Maximum size of one uploaded file |
post_max_size | Maximum size of an HTTP POST request |
memory_limit | Maximum memory available to a PHP script |
max_execution_time | Maximum execution time for a PHP script |
max_input_time | Maximum time PHP spends processing input |
For example, if you want to allow a 256 MB upload, you might configure:
upload_max_filesize = 256M
post_max_size = 256M
In some environments, administrators set post_max_size slightly higher than upload_max_filesize to accommodate the complete HTTP request.
Why Increase the WordPress Upload Limit?
The default limit may be sufficient for normal websites, but larger projects often require more.
You may need a higher upload limit when:
- Uploading high-resolution images
- Installing large themes
- Installing large plugins
- Importing website backups
- Uploading videos
- Migrating a WordPress website
- Importing large XML files
- Restoring a website from a backup
- Uploading large media libraries
Instead of changing the limit unnecessarily, choose a value appropriate for the files your website actually needs.
Method 1: Increase the Limit Using cPanel
If your hosting provider uses cPanel, you may be able to change PHP settings without editing configuration files manually.
Step 1: Log in to cPanel
Open your hosting account and access cPanel.
Step 2: Find PHP Settings
Look for:
MultiPHP INI Editor
Depending on the hosting configuration, you may see slightly different PHP management options.
Step 3: Select Your Domain
Choose the domain associated with your WordPress website.
Step 4: Modify PHP Values
Locate:
upload_max_filesize
and increase it.
For example:
upload_max_filesize = 256M
Then locate:
post_max_size
and increase it as well:
post_max_size = 256M
You may also need to increase:
memory_limit = 512M
depending on what you’re trying to upload or process.
Step 5: Save the Changes
Save your configuration and return to WordPress.
Go to:
Media → Add New
Check whether the maximum upload size has increased.
Method 2: Increase the Upload Limit in DirectAdmin
If your server uses DirectAdmin, the exact interface depends on your hosting provider and PHP configuration.
A common approach is to access PHP settings through the domain’s PHP configuration interface.
Look for options related to:
upload_max_filesizepost_max_sizememory_limitmax_execution_timemax_input_time
For example:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
Save the configuration and check the upload limit from the WordPress dashboard.
Important
On some DirectAdmin servers, users cannot modify these PHP directives themselves. The hosting provider may need to change the PHP configuration at the server or user level.
Method 3: Modify php.ini
If your hosting environment allows a custom php.ini file, you can configure PHP directly.
Create or edit:
php.ini
Add:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 300
max_input_time = 300
Save the file and test the upload again.
Why Change post_max_size?
upload_max_filesize controls the maximum size of an individual uploaded file.
post_max_size controls the maximum size of the entire POST request.
Therefore, setting upload_max_filesize to a high value while leaving post_max_size too low can still prevent large uploads.
Method 4: Modify .user.ini
On many shared hosting environments running PHP-FPM or CGI-based configurations, .user.ini can be used to customize PHP settings for a website.
Create:
.user.ini
in the appropriate website directory, often the document root.
Add:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 300
max_input_time = 300
Save the file and wait for PHP to reload the configuration.
Some hosting environments cache .user.ini changes, so the new settings may not appear immediately.
Method 5: Modify .htaccess
Some Apache/PHP configurations allow PHP settings to be changed through .htaccess.
You can try:
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value memory_limit 512M
php_value max_execution_time 300
php_value max_input_time 300
However, this method does not work on every server.
If PHP is running through PHP-FPM, these directives may not be accepted in .htaccess. In some configurations, they can even result in a 500 Internal Server Error.
If your website stops working after adding these lines, remove them and use another supported configuration method.
Method 6: Use a WordPress Plugin
If you don’t have access to PHP configuration files or your hosting provider doesn’t allow direct changes, a WordPress plugin may help depending on the server configuration.
Search the WordPress plugin directory for reputable plugins that manage PHP settings or upload limits.
Before installing any plugin, check:
- Recent updates
- WordPress compatibility
- Active installations
- User reviews
- Developer reputation
- Support activity
Important Limitation
A WordPress plugin cannot override a server-level restriction that the hosting provider has deliberately imposed.
If PHP’s maximum upload size is restricted by the server, you may need your hosting provider to increase it.
Method 7: Ask Your Hosting Provider
On shared hosting, you may not have permission to change all PHP settings.
In that situation, contact your hosting provider and request an increase.
You can send a request such as:
Please increase the PHP
upload_max_filesizeandpost_max_sizelimits for my domain. I need to upload files up to 256 MB.
Your hosting provider may also need to check:
- PHP-FPM configuration
- Web server limits
- ModSecurity rules
- Nginx configuration
- Account-level resource limits
- Server-level PHP restrictions
This is often the easiest solution when you don’t have administrative access to the server.
Don’t Forget Nginx or Web Server Upload Limits
Sometimes PHP isn’t the only restriction.
For websites running behind Nginx, the server may have a request-body limit such as:
client_max_body_size 256M;
If this value is smaller than the file you’re attempting to upload, the web server can reject the request before WordPress or PHP processes it.
For example, PHP might allow:
upload_max_filesize = 256M
but Nginx might allow only:
client_max_body_size 64M;
In that situation, a 100 MB upload can still fail.
If you manage your own VPS or dedicated server, check the web server configuration as well.
How to Check the New Upload Limit
After changing the configuration, log in to WordPress.
Go to:
Media → Add New
WordPress should display the updated limit.
You can also check:
Tools → Site Health → Info → Media Handling
Depending on your WordPress version, relevant PHP and media configuration information may be displayed there.
What If the WordPress Upload Limit Doesn’t Change?
If you changed the PHP configuration but WordPress still shows the old limit, check the following.
1. Confirm the Active PHP Version
Your domain may be using a different PHP version than the one you modified.
2. Check the Correct PHP Configuration
Your server can have multiple PHP versions with separate configuration files.
3. Verify post_max_size
Make sure post_max_size isn’t lower than the file size you want to upload.
4. Check the Web Server
Nginx or another web server may impose an additional upload restriction.
5. Restart PHP-FPM
On a VPS or dedicated server, PHP-FPM may need to be reloaded after configuration changes.
6. Check Hosting Restrictions
Your hosting provider may enforce maximum values that cannot be overridden at the account level.
Example Configuration for a 256 MB Upload
If your goal is to allow files up to approximately 256 MB, a configuration might look like:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 300
max_input_time = 300
For an Nginx server, you may also need an appropriate request-body limit, such as:
client_max_body_size 256M;
These values are examples, not universal requirements. Your hosting environment may require different settings.
Increasing the Upload Limit Isn’t Always the Best Solution
A very large upload limit can consume significant server resources.
For example, allowing uploads of several gigabytes can create problems on shared hosting environments.
Before increasing the limit, consider:
- Available disk space
- PHP memory
- CPU resources
- Server bandwidth
- Maximum execution time
- Backup storage
- Number of simultaneous users
For very large backups or media files, using an appropriate migration, backup, object-storage, or server-side transfer method may be more efficient than uploading everything through the WordPress Media Library.
Common WordPress Upload Errors
You may encounter several different errors when uploading large files.
“The uploaded file exceeds the upload_max_filesize directive in php.ini”
This usually indicates that the PHP upload_max_filesize value is too low.
“Post Content-Length of X bytes exceeds the limit”
This can indicate that post_max_size is too small.
HTTP 413 Request Entity Too Large
This commonly indicates that a web server or reverse proxy is rejecting a request because it exceeds its configured request-body limit.
Upload Times Out
A timeout may be caused by:
- Slow network connection
- Low
max_execution_time - Low
max_input_time - Server resource limitations
- Reverse-proxy timeout settings
Increasing the upload size alone may not solve a timeout problem.
Best Practices for Large WordPress Uploads
Before uploading very large files, follow these practices:
Create a Backup
Always maintain a recent backup before changing server or WordPress configuration.
Increase Limits Gradually
Don’t automatically set the limit to several gigabytes. Choose a value based on your actual requirements.
Use a Staging Website
Test configuration changes on staging when possible.
Monitor Server Resources
Large uploads can consume disk space, memory, CPU, and bandwidth.
Keep PHP Updated
Use a supported PHP version compatible with your WordPress installation and plugins.
Check Multiple Limits
Remember that PHP, the web server, reverse proxies, and hosting providers can all impose upload restrictions.
Frequently Asked Questions
What is the maximum WordPress upload size?
There is no single universal limit. The maximum upload size depends on your PHP, web server, hosting, and WordPress environment.
Can I increase the upload limit without editing WordPress files?
Yes. You may be able to change the limit through cPanel, DirectAdmin, your hosting provider, or a suitable WordPress plugin.
Why does WordPress still show the old upload limit?
The domain may be using a different PHP configuration, or another server-level restriction may be overriding your change.
Does increasing upload_max_filesize increase the WordPress upload limit?
It can, but post_max_size and other server restrictions may also affect the final limit.
Can I set the upload limit to 1 GB?
Technically, some hosting environments can support very large uploads, but whether it is practical depends on your server resources and configuration.
Will increasing the upload limit make WordPress faster?
No. Increasing the upload limit changes the maximum size of files that can be uploaded. It does not inherently improve website performance.
Final Thoughts
Increasing the WordPress upload limit is usually straightforward once you identify which part of the hosting stack is restricting the upload.
For shared hosting, cPanel, DirectAdmin, .user.ini, or contacting your hosting provider may be the easiest approach. On VPS and dedicated servers, you may also need to check PHP-FPM and web-server settings such as Nginx’s client_max_body_size.
The key is to remember that WordPress uploads can be affected by multiple limits, not just one PHP setting. Configure the limits according to your website’s actual needs, test the changes carefully, and avoid setting unnecessarily large values.
With the correct PHP and server configuration, you can safely handle larger WordPress uploads without repeatedly encountering file-size errors.