You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WordPress上传大小异常:后台显示64MB上限却限制500KB以上文件

Hey Ahmad, let's tackle this frustrating upload size mismatch you're dealing with in WordPress. It’s super common to see the admin dashboard show one limit but hit a stricter actual restriction—here are the most reliable fixes to get your 64MB upload limit working as advertised:

Fixes for WordPress Upload Size Mismatch

1. Check and Update PHP Configuration (php.ini)

WordPress pulls its upload limits from your server’s PHP settings, which might be overriding the dashboard’s displayed value. Here’s what to do:

  • First, create a temporary phpinfo.php file in your site’s root directory with this code:
    <?php phpinfo(); ?>
    
  • Access this file via your browser (e.g., yourdomain.com/phpinfo.php) to find where your php.ini file is stored.
  • Open php.ini and adjust these three directives to match (or exceed) the 64MB limit shown in WordPress:
    • upload_max_filesize = 64M
    • post_max_size = 70M (needs to be larger than the upload limit)
    • memory_limit = 128M (gives WordPress enough memory to handle large files)
  • Save the file and restart your web server (Apache or Nginx) for changes to take effect.

2. Adjust Settings via .htaccess

If you don’t have access to php.ini, add these lines to your site’s root .htaccess file (back it up first just in case):

php_value upload_max_filesize 64M
php_value post_max_size 70M
php_value memory_limit 128M
php_value max_execution_time 300

This forces PHP to use the higher limits directly through your server’s configuration file.

3. Check for Plugin/Theme Restrictions

Security plugins (like Wordfence, iThemes Security) or custom themes often add their own upload limits to prevent malicious files.

  • Navigate to your security plugin’s settings and look for "File Upload Restrictions" or similar options—ensure they’re set to at least 64MB.
  • Check your theme’s functions.php file for any code that sets upload_max_filesize manually, and adjust or remove it if present.

4. Verify Hosting Control Panel Limits

If you use cPanel, Plesk, or another hosting control panel:

  • Look for tools like "Select PHP Version" or "MultiPHP INI Editor."
  • Use these tools to set upload_max_filesize and post_max_size to 64MB or higher.
  • If you still hit a wall, your host might have a hard limit in place—reach out to their support team to request an increase.

内容的提问来源于stack exchange,提问作者Ahmad

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:49:02