WordPress changes upload file size limit, including multi-site modification methods

888u

Last update at :2024-04-01,Edit by888u

The WordPress program has a background-media function, where you can upload files such as pictures and videos. Usually the server's default maximum file size that can be uploaded is 50M, while the host's default is 2M. This limitation greatly affects our ability to upload some videos or compressed files, so we provide some solutions.

The following modifications are all 200M as an example, you can adjust the size by yourself.


Modify upload file size limit for WordPress single site

Method 1: Modify the .htaccess file in the WordPress root directory and add the following code:

php_value upload_max_filesize 200M
php_value post_max_size 200M
php_value max_execution_time 300
php_value max_input_time 300

Method 2: Modify PHP configuration (recommended method):

If you have a pagoda panel, directly find the PHP settings of the software store, where you can adjust the upload file size.

If there is no panel, first find the php.ini file and modify the following parameters in it:

upload_max_filesize = 200M
post_max_size = 200M
max_execution_time = 300

Note: Just restart the PHP service after the above modifications are completed.


WordPress multi-site modification upload file size limit

This requires modifying a field in the database.

Enter the database management, find the wp_sitemeta table, find the row whose meta_key is fileupload_maxk, modify the corresponding value to 204800, and fill in the number directly. Do not bring any units, the default unit is KB.

Recommended site searches: domain name check, website registration information query, overseas server, free virtual host, Alibaba Cloud registration, Jiangsu high-defense server, Hong Kong server defense, ICP registration, US server rental website, free server

WordPress changes upload file size limit, including multi-site modification methods

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码