Skip to content
WordPress

Raising the WordPress Upload Size Limit on Any Host

WordPress upload size limit blocks large images, videos, and PDFs. Here are all the fixes — cPanel MultiPHP INI, php.ini, .htaccess, wp-config.php, user.ini, and managed hosting settings.

Raising the WordPress Upload Size Limit on Any Host

You try to upload a large image, video, or PDF and WordPress shows “The uploaded file exceeds the upload_max_filesize directive in php.ini” or simply fails silently. The default PHP file upload limit on most hosting is 2–8MB — far too low for modern photography, video, and document uploads. Understanding what controls the WordPress upload size limit and which of the several overlapping settings actually applies in each hosting environment is essential for resolving upload failures permanently rather than with temporary workarounds. This fits into the wider topic we cover in our WordPress Errors Complete Guide.

WordPress Upload Size Limit — What Controls It

The WordPress upload size limit is controlled by three separate PHP configuration values that all must be set correctly for large uploads to succeed. Setting only one when all three need updating produces confusing results where the limit appears to be raised but uploads still fail.

The three controlling values: upload_max_filesize sets the maximum size of a single uploaded file — the most commonly cited limit. post_max_size sets the maximum size of the entire POST request body, which includes the file plus form fields — this must be larger than upload_max_filesize or even files under the upload limit will fail when the total request body exceeds this value. memory_limit sets the maximum PHP memory for a single script execution — WordPress processes the entire uploaded file in memory during upload, so the memory limit must be at least as large as the largest expected upload. A common misconfiguration is raising upload_max_filesize to 64M but leaving post_max_size at 8M, which means any upload larger than 8M still fails even though upload_max_filesize allows it. Verify all three values in WordPress admin → Tools → Site Health → Info → Server → check upload_max_filesize, post_max_size, and memory_limit. All three should be sized appropriately for the largest expected upload.

WordPress’s own upload limit display in Media → Add New shows the current effective WordPress upload size limit as “Maximum upload file size: X MB” — this reflects the smallest of upload_max_filesize and post_max_size. If this number does not match the values set in php.ini, the configuration change did not take effect or was overridden by another configuration file. The value shown in the WordPress admin is the authoritative runtime limit regardless of what the ini files show — use this as the confirmation metric after making any configuration change. According to the official PHP documentation, the order of precedence for php.ini values is: .htaccess or user.ini overrides → php.ini → compiled defaults, with the most specific and recently processed value winning — which is why adding directives to .htaccess or a local php.ini in the WordPress directory successfully overrides the hosting server’s global php.ini without requiring a support ticket.

Increasing the Upload Limit on cPanel Hosting

cPanel is the easiest path for increasing the WordPress upload size limit without requiring server-level access or creating configuration files.

Via cPanel MultiPHP INI Editor: cPanel → Software → MultiPHP INI Editor → select the PHP version used by the WordPress site → find upload_max_filesize, post_max_size, and memory_limit → increase each to the desired value (64M, 128M, or 256M depending on expected upload sizes) → Apply. The changes apply immediately without server restart on most cPanel installations. Verify in WordPress admin → Tools → Site Health → Server section — the new values should appear within 60 seconds.

If the MultiPHP INI Editor is not available, create a php.ini to raise the WordPress upload size limit in the WordPress root with the required directives:

upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 256M
max_execution_time = 300

The max_execution_time directive is important for large uploads — uploading a 100MB video file may take several minutes on a slow connection, and if PHP’s execution timeout is 30 seconds (the default), the upload script is killed before completion. Set max_execution_time to 300 seconds (5 minutes) or higher for sites that handle video uploads. After creating the php.ini file, verify the WordPress upload size limit has updated in the WordPress admin. Our guide on using WordPress site health covers the Server info tab that displays current PHP limits in one place, making it the fastest way to confirm whether the configuration changes have taken effect.

Increasing Upload Size via .htaccess and wp-config.php

When php.ini is not supported, increase the WordPress upload size limit through .htaccess or the cPanel INI editor is unavailable, the WordPress upload size limit can be increased through .htaccess (for Apache servers) or through wp-config.php.

Via .htaccess — add these lines above the # BEGIN WordPress comment:

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300

The php_value directive works on Apache with mod_php (the most common shared hosting PHP mode). It does not work with PHP-FPM (FastCGI) — the more modern PHP execution mode used by Nginx servers and many current Apache configurations. If .htaccess directives are ignored (the limit does not change after adding them), the hosting uses PHP-FPM and requires a user.ini file instead: create a file named .user.ini (with the leading dot) in the WordPress root directory with the same content as the php.ini approach above. PHP-FPM reads .user.ini files automatically on a periodic schedule (every 300 seconds by default) — changes may take up to 5 minutes to appear, unlike .htaccess which applies immediately.

Via wp-config.php — another path for the WordPress upload size limit it displays (though this does not change the actual PHP limit): @ini_set('upload_max_filesize', '128M'); @ini_set('post_max_size', '128M'); @ini_set('memory_limit', '256M'); added to wp-config.php. The @ini_set() function works on hosting environments where PHP is configured in “changeable” mode for these directives — typically shared hosting with PHP running as the web server user. On hosting with strict ini settings, ini_set() calls are silently ignored. Verify effectiveness by checking the limit displayed in Media → Add New after adding these lines. If the WordPress upload size limit updates, ini_set() is working. If it does not change, the hosting requires the .htaccess or php.ini approach. Our guide on fixing WordPress admin performance covers the memory_limit configuration in detail since the same setting affects both upload handling and overall admin PHP memory availability.

Upload Size on Managed WordPress Hosting

Managed hosts set their own WordPress upload size limit configurations that cannot be changed through the standard .htaccess or php.ini methods, because these hosts use custom server configurations that override user-level PHP ini files.

For Kinsta: the default upload limit is 128MB. To increase it beyond this, open a support ticket requesting a higher limit for the specific environment — Kinsta support can increase the limit to any value up to server capabilities. For WP Engine: the default upload limit is 50MB. Request increases through WP Engine’s support portal. For Cloudways: the WordPress upload size limit is configurable through the platform dashboard → Application → PHP Settings → change the values directly in the platform UI without requiring a support ticket. For Pressable: default 150MB, contact support for higher limits.

For very large file uploads on any hosting — video files over 1GB, raw photography files, large database exports — the WordPress media library is not the appropriate upload mechanism regardless of the WordPress upload size limit setting. PHP upload timeouts, browser connection instability during multi-minute uploads, and the memory overhead of processing large files through PHP all create reliability issues at extreme file sizes. Instead: use FTP or SFTP to upload large files directly to wp-content/uploads/ → use the Add Media from URL plugin or WP CLI (wp media import /path/to/file.mp4) to register the uploaded file in the WordPress media library without PHP re-uploading it. For video specifically, hosting on YouTube, Vimeo, or Cloudflare Stream and embedding in WordPress produces better playback performance and eliminates storage overhead while the WordPress upload size limit becomes irrelevant for video content. Reviews from the WordPress support community confirm that the post_max_size being lower than upload_max_filesize is the most commonly overlooked cause of upload failures that persist after the upload_max_filesize is raised, accounting for a large proportion of cases where users report the limit change had no effect.

WooCommerce product image uploads and virtual product file downloads have specific WordPress upload size limit considerations. Product images work within the standard media upload limits described above. Virtual product downloads — PDF ebooks, software, audio files — are uploaded as product files through the WooCommerce product data panel. Large digital product files (audio courses, high-resolution asset packs, software installers) may exceed even a raised upload limit. The alternative for very large digital products: upload the files via FTP directly to wp-content/uploads/ → use the WooCommerce product editor → Product Data → Downloadable → Choose File → enter the file path manually rather than uploading through the browser. This approach bypasses the PHP upload limit entirely by providing the already-uploaded file’s server path, allowing product files of any size to be associated with WooCommerce downloadable products without any PHP memory or upload size constraints.

Multisite WordPress installations have an additional WordPress upload size limit control at the network level: Network Admin → Settings → Upload Settings → Max upload file size (in KB) — this network-wide setting caps the upload size for all subsites regardless of the PHP configuration. If the PHP limit is raised to 128M but the network setting is 1500 (1.5MB), the 1.5MB limit applies. Raise the network upload setting to match or exceed the PHP limit (setting it to 131072 for 128MB, or 0 for unlimited). Individual subsite administrators cannot override the network-level upload limit from their subsite’s settings — only the network super admin can change it. This network-level cap is a deliberate architectural decision in multisite, preventing any single subsite from monopolising hosting storage with unrestricted file uploads, while the network admin maintains central control over the overall upload policy across all sites.

Chunked file uploading plugins provide an alternative approach to the WordPress upload size limit problem — instead of raising the PHP limits, these plugins split large files into smaller chunks that each fall within the existing limits, then reassemble them on the server. FilePond, WP Big File Uploads, and similar plugins implement this approach. The advantage: works on hosting environments where PHP limits cannot be changed (some managed hosts, restrictive shared hosting). The disadvantage: chunked upload plugins add JavaScript dependencies, require careful compatibility testing with the active theme and other plugins, and may not work with all file types or in all WordPress contexts. Raising the PHP limits directly remains the preferred approach when the hosting environment allows it, as it resolves the WordPress upload size limit system-wide without adding plugin dependencies or potential compatibility issues.

Diagnosing exactly which setting is the active constraint when the WordPress upload size limit does not reflect configuration changes requires checking all configuration layers. The phpinfo() function reveals which php.ini file is actually being loaded and what values each directive currently has after all configuration overrides are applied: create a file named phpinfo.php in the WordPress root with the single line <?php phpinfo(); ?> → visit yoursite.com/phpinfo.php → search for “upload_max_filesize”, “post_max_size”, and “memory_limit” → each shows two values: “Local Value” (currently active) and “Master Value” (the global php.ini value). If the Local Value shows the raised limit, the change is working. If Local Value matches Master Value and both show the old limit, the configuration file being modified is not being loaded. Delete the phpinfo.php file immediately after the diagnostic to avoid exposing server configuration details to unauthorised visitors.

The WordPress REST API upload endpoint has its own considerations for the WordPress upload size limit — when media is uploaded via the REST API (by the block editor, by headless applications, or by plugins using the API programmatically), the request goes through the same PHP upload limits as browser uploads. However, some REST API clients implement their own chunked upload logic that splits files into smaller API requests, working around the limit from the client side. The WP-CLI wp media import command bypasses all upload size limits entirely because it operates at the PHP CLI level with a separate php.ini configuration (often allowing unlimited file sizes by default) and imports files directly from the server filesystem rather than through an HTTP upload. For developers and administrators with server access, WP-CLI media import is the most reliable method for importing very large media files that exceed the WordPress upload size limit regardless of hosting environment.

Browser-side upload validation in WordPress shows the WordPress upload size limit error before the file even reaches the server when the file size exceeds a client-side check. The WordPress media uploader checks the file size in JavaScript before initiating the upload — if the file is already over the configured limit, WordPress rejects it at the browser level with the “exceeds the maximum upload size for this site” message without sending any data to the server. After raising the PHP limits and verifying they are correctly applied in the WordPress admin Server info section, this browser-side message updates to reflect the new limit automatically. If the message still shows the old limit after confirming the PHP configuration is correct, hard refresh the WordPress admin page (Ctrl+Shift+R) to clear the browser cache of the old limit value that was embedded in the admin page’s JavaScript on the previous page load. Our guide on How to Increase WordPress Memory Limit Safely With Reliable Methods covers an adjacent issue.

Nikolas Lamprou

Nikolas Lamprou (MSc; GCFR, SC-200, Security+) has been working with computers professionally since 2009 — starting with web development and e-commerce, and moving into cybersecurity over the years. Based in Greece, he brings over 15 years of real-world IT experience to SolveTechToday, where he writes about Windows fixes, software reviews, security tools, and AI applications. His goal is straightforward: cut through the noise and give readers clear, honest guidance on the tech decisions that matter.

Stay Ahead

Fix your next problem before it starts

Get the week's best Windows fixes, software picks, and security guides delivered straight to your inbox. No noise, just solutions.

Press ESC to close · Try "Windows 11" or "Chrome"