Do you need to increase the maximum file upload size limit in your WordPress blog? In WordPress file upload size is limited by default and you will be unable to upload the file that is more than the size allocated in WordPress. In this guide you will learn how to increase the maximum file upload size limit in WordPress.
What is Maximum File Upload Size Limit in WordPress?
WordPress maximum file upload size limit is the uploading size that is set in the WordPress core. If the uploading file size is greater than the size allocated in WordPress than you need to increase the file upload size limit.
You can see the maximum file upload size that is set for your WordPress blog simply going to Media then Add New in admin panel.
How to increase the Maximum File Upload Size Limit in WordPress?
When you try to upload themes, plugins or images that exceed the file size limit WordPress will throw the below message.
The uploaded file exceeds the upload_max_filesize directive in php.ini.
You can increase the file size limit easily following the methods below.
Time needed: 10 minutes.
- Add the Code in functions.php
- Add the code in .htaccess File
- Edit php.ini File
Add the Code in functions.php
You can increase the file size limit adding the below code in functions.php. Click on Appearance then Editor. From the right side click on functions.php and add the code.
@ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '64M'); @ini_set( 'max_execution_time', '300' );
Add the Code in .htaccess File
You can edit the .htaccess file and add the following code using FTP client such as FileZilla. You can also use the plugins such as Yoast SEO that provide you the tools to edit .htaccess file from the WordPress dashboard.
php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300
Edit php.ini File
You need to access root directory of your web server using FTP client. In the root directory edit the php.ini file and add the following code. If you didn’t find php.ini then you can create the new one
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
If the above methods didn’t work for you than you have to contact your website hosting provider to increase the file size limit.
We hope this guide on how to move the blog from Blogger to WordPress is helpful. You may also like to see the guide to troubleshoot WordPress errors.