Some WordPress plugins and themes have a larger size than the maximum file upload size allowed by your WordPress configuration. If you are experiencing this issue, you can manually upload the theme or plugin you want to install via FTP. We have an example of how to install a WordPress theme (Divi theme) via FTP if you want to learn more. Read it here. Divi Builder and the pro version of Essential Addons are two of the examples of WordPress plugins that have a large enough size.
If you prefer to install your theme/plugin via the WordPress dashboard, you can increase the maximum file upload size of your WordPress. There are several ways to do so, depending on the access you have to your WordPress site.
Go try one of the following methods to increase the maximum file upload size on your WordPress site. By the way, you can check the maximum file upload size on your WordPress by adding a new media (Media -> Add New). The information you are looking for lies beneath the media box.
1. By editing the php.ini file
As you know, the core of WordPress is written in PHP. Some core functions in WordPress are controlled by the PHP configuration on your server. You can edit the php.ini file to change the PHP configuration on your server. Look for the following line.
upload_max_filesize = 64M
Change the number 64 with the maximum file size you want to allow.
If you use a shared hosting service, chances are you won’t see the php.ini file on your WordPress directory. You can try to create one manually and add the following lines.
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
2. By editing the .htaccess
If the method above doesn’t work, you can try to edit the .htaccess file which lies on the root directory of your WordPress installation. .htaccess itself is a configuration file for use on web servers running the Apache Web Server software. Add the following lines to the .htaccess file.
php_value upload_max_filesize 64M<br> php_value post_max_size 64M<br> php_value max_execution_time 300<br> php_value max_input_time 300
3. By editing the theme functions file
Most WordPress themes have a functions file (functions.php). This file is typically located under the root directory of your theme. This file plays a role to add features or change default features on your WordPress site. In some cases, you can also increase the maximum file upload size by adding a new function to this file. Edit the functions file on your theme and add the following lines. You can add these lines to the bottom section of the file.
@ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '64M'); @ini_set( 'max_execution_time', '300' );
If none of the methods above work, the only way to increase the maximum file upload size on your WordPress site is by contacting your hosting provider.