ข้ามไปยังเนื้อหา
เครื่องมือ

Max Upload Size Fixer

Raise the upload limit — and get all three values consistent

ทำงานในเบราว์เซอร์ของคุณ ไม่มีการอัพโหลดอะไร

Target
Where can you edit files?

Hosts differ in what they let you touch. Generate the format you can actually use — and if the first one silently does nothing, that usually means your host overrides it, so try the next.

Resulting upload limit

128 MB

settings

wp-config.php can raise WordPress's own memory limit, but it cannot raise PHP's upload_max_filesize — that is a PHP directive, not a WordPress one. If your host locks PHP settings, no amount of wp-config editing will change the upload cap, and you will have to ask them.

เกี่ยวกับ Max Upload Size Fixer

WordPress upload limits are set in three places that must agree: upload_max_filesize, post_max_size, and memory_limit. Set your target size and this emits all three, correctly ordered, for php.ini, .htaccess, and wp-config.php.

FAQ

คำถาม

ฉันเพิ่ม upload_max_filesize แล้วแต่ไม่มีอะไรเปลี่ยน ทำไม?

เพราะ WordPress ใช้ค่าที่เล็กที่สุดในสามค่านี้: upload_max_filesize, post_max_size และ memory_limit การเพิ่มค่าหนึ่งขณะที่อีกค่ายังต่ำอยู่ไม่เปลี่ยนอะไรเลย post_max_size ต้องใหญ่กว่า upload_max_filesize เพราะ request body บรรทุกทั้งไฟล์และฟอร์มรอบๆ ไฟล์ด้วย

wp-config.php เพิ่มลิมิตการอัพโหลดได้ไหม?

ได้เพียงบางส่วน และเรื่องนี้ทำหลายคนสะดุด wp-config.php เพิ่ม memory limit ของ WordPress ได้ แต่ upload_max_filesize เป็น directive ของ PHP ที่ PHP มักอ่านเสร็จไปแล้วก่อนที่ WordPress จะโหลด ถ้าโฮสต์ของคุณล็อกการตั้งค่า PHP ไว้ การแก้ wp-config เท่าไหร่ก็ไม่เปลี่ยนลิมิตนั้น

โฮสต์ไม่ให้ฉันแก้ php.ini แล้วทำไงต่อ?

ลองไฟล์ .user.ini ใน web root ของคุณ — โฮสต์แบบ shared หลายเจ้าอ่านมัน ถ้ายังไม่ได้อีก แสดงว่าลิมิตถูกบังคับอยู่เหนือบัญชีของคุณ และมีแต่โฮสต์เท่านั้นที่เปลี่ยนได้ ลองถามพวกเขาดู มักเป็นตั๋วแก้บรรทัดเดียว