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 create a menu in WordPress using PHP?
- How to configure Nginx for WordPress?
- How to echo a shortcode in WordPress using PHP?
- How to send an email using PHP in WordPress?
- How to use the WordPress REST API with PHP?
- How to redirect to another page in WordPress using PHP?
- How to create pagination in WordPress using PHP?
- How to set a page title in WordPress using PHP?
- How to use hooks in WordPress with an example?
See more codes...