When WordPress rejects a large image, theme, or plugin archive, first check the maximum upload file size displayed on the Media upload screen. The quickest safe fix is usually your hosting panel: raise upload_max_filesize, then set post_max_size higher to allow room for the rest of the request data.
Before changing files, download a backup of any configuration file you plan to edit.
Change the maximum upload file size in your hosting panel
Open your hosting control panel and look for PHP settings, PHP options, MultiPHP INI Editor, or a similarly named page. Set values such as:
upload_max_filesize = 64M
post_max_size = 80M
Some hosts provide separate PHP settings for each domain. Confirm that you are editing the domain and PHP version used by the affected WordPress site.
Save the changes, then open the Media upload screen in WordPress and check the displayed maximum upload size. Hosting panels may take several minutes to apply PHP configuration changes.
If the panel prevents you from selecting a higher value, the host has probably imposed an account-level limit. Contact support rather than trying to override it from WordPress.
Edit php.ini when you manage the server
On a VPS or dedicated server, update the php.ini file used by the website:
upload_max_filesize = 64M
post_max_size = 80M
The post_max_size value must be larger than upload_max_filesize because the POST body contains the uploaded file and additional request data. PHP documents both settings in its core configuration reference.
You may need to restart PHP-FPM or the web server after saving the file. The exact command depends on the services and PHP version installed on the server.
Do not assume the PHP configuration used by WP-CLI is also used by the website. Run:
wp --info
This identifies the PHP binary and configuration loaded for command-line requests, but the web server may use a different php.ini. Check the web-facing value in WordPress after making the change.
If the site behaves incorrectly after editing php.ini, restore your backup and restart the affected service again.
Use .user.ini on compatible shared hosting
When you cannot edit the main php.ini, ask your hosting provider whether .user.ini files are supported and where the effective file should be placed for your domain. The correct location depends on the host and PHP configuration.
Create or update the file in the location specified by the provider:
upload_max_filesize = 64M
post_max_size = 80M
This method works only when the host permits per-directory PHP configuration. Changes can also be delayed by PHP’s .user.ini cache.
Remove the two lines if they cause an error. If WordPress still shows the old limit after waiting for the host’s configuration cache to refresh, ask the provider to confirm that PHP is reading the file and that the requested values do not exceed an account-level limit.
Do not rely on wp-config.php for this limit
You may find instructions that add ini_set() calls to wp-config.php. That is not a dependable fix for upload limits because PHP normally treats upload_max_filesize and post_max_size as per-directory configuration settings. By the time WordPress runs, PHP has already processed the upload request.
Change the hosting or PHP configuration instead. Avoid adding upload-limit code to a theme’s functions.php, since it has the same timing problem and disappears when the theme changes.
Check for another server-level limit
If WordPress displays the higher value but large uploads still fail, another layer may be rejecting the request. Common examples include:
- An Nginx request-body limit
- A reverse proxy or CDN upload limit
- A managed hosting platform limit
- A WordPress multisite network upload limit
- Insufficient PHP memory or request-processing time
A 413 Request Entity Too Large response usually points to the web server or proxy rather than WordPress. On Nginx, the client_max_body_size directive controls the permitted request-body size and returns a 413 response when that limit is exceeded. Ask the host which layer returned the error and provide the file size you need to upload.
For multisite installations, open Network Admin > Settings and check the upload settings. As described in the official Network Admin settings documentation, a network administrator can impose a separate maximum upload file size even when PHP permits larger uploads.
WordPress’s uploading FAQ also recommends contacting the hosting provider when server configuration prevents uploads. This is the correct escalation path when your PHP changes are ignored, overwritten, or capped by the platform.