This page is a translated version of the page Manual:$wgMaxUploadSize and the translation is 54% complete.
Other languages:
ファイルとファイル アップロード: $wgMaxUploadSize
アップロード ファイルの最大サイズ (バイト単位)
導入されたバージョン:1.8.0 (r16159)
許容される値:(整数または配列) (下記参照)
既定値:1024*1024*100 (100MB)



指定する値は、1つのファイルの最大サイズ(バイト単位)を表します(アップロードされたすべてのファイルの合計ではありません)。 この制限はアップロード時に適用されるため、後でこの値を下げても、新しい制限を超える既存のファイルは削除されません。 This limit only applies to chunked uploads and uploads without separate chunks might have a lower upload limit based on the PHP setting.

There are 1024 bytes in a kilobyte, and 1024 kilobytes in a megabyte, so 1024 * 1024 * 100 = 100 megabytes.

The limits for file uploads are controlled by PHP configuration directives. To change the limits for file uploads, you need to modify php.ini, see upload_max_filesize and post_max_size PHP configuration options as well as Manual:Configuring file uploads for details. Note that whichever one of these php.ini variables is smallest will be the limiter. By default, PHP does not allow uploaded files to be more than 2 megabytes.


This limits the maximum size of uploaded files, in bytes, regardless of how they are uploaded.

$wgMaxUploadSize = 20000000;


If you would like different maximum sizes for file uploads and upload-by-URL, you can set this variable to an array. 例:

$wgMaxUploadSize = [
    '*' => 250 * 1024, // 250 KB
    'url' => 500 * 1024, // 500 KB

This example will set the maximum for all uploads to 250 KB, except for upload-by-URL, which will have a maximum of 500 KB.

URLによるアップロードを有効にするには、$wgAllowCopyUploads を参照してください。

MediaWiki バージョン:
This option has no effect on the normal upload feature for MediaWiki 1.17 and lower! If you've enabled $wgAllowCopyUploads , this setting does limit the size of files copied from a remote URL as expected. When uploading files from your local machine, this setting has no effect (for at least versions 1.9.3 through 1.12).