php-wordpressHow to increase the upload limit in WordPress using PHP?
The upload limit in WordPress can be increased by editing the php.ini
file. The following code can be used to increase the upload limit:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
The code above will increase the upload limit to 64MB, the post max size to 64MB, and the maximum execution time to 300 seconds.
Code explanation
upload_max_filesize
: This sets the maximum size of a file that can be uploaded.post_max_size
: This sets the maximum size of a post that can be uploaded.max_execution_time
: This sets the maximum time a script can run before it is terminated.
Helpful links
More of Php Wordpress
- How to disable PHP warnings in WordPress?
- How to use get_header in WordPress using PHP?
- How to get the current URL in WordPress using PHP?
- How to add a shortcode in WordPress?
- How to send an email using PHP in WordPress?
- How to create a snippet in WordPress using PHP?
- How to run an SQL query in WordPress using PHP?
- How to use the WordPress REST API with PHP?
- How to redirect to another page in WordPress using PHP?
See more codes...