You may have seen this error at least once when installing a theme, plug-in, or uploading an image or file. Sometimes it has nothing to do with the theme or plugin. The problem is your server settings, which limits the maximum size for uploaded files. Especially, it is more common in themes with large demo data.
This is a common error and can be easily fixed by file setting. This error message indicates that the file you are trying to upload is larger than your web host allows.
The way to overcome this problem is very easy, you need to increase the file size upload limit. You can do this yourself or ask your web hosting support team to increase the file size limit.
Ways you can fix it:
Updating Your php.ini file
Editing Your .htaccess file
Editing your wp-config.php File
Contact Web Hosting Support
If you are developing code with PHP language, each server has a php.ini file. You need to open this file and edit your new memory limit.
Follow these steps to edit the php.ini file
If you are working in localhost, you can open the php.ini file in the directory where the php is installed and search the lines below and change the values. If you are using a server application like XAMPP, you should edit the php.ini file in the xampp\php directory.
upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 400M
file_uploads = On
max_execution_time = 180
If you are working on a hosting server, you can follow the steps below to edit the php.ini file below.
Settings may vary based on what web hosting company you are using. Here is list of popular webhost documentation for quick reference:
You can browse the quick reference of the popular hosting companies below.
If editing in PHP.ini doesn’t work, you can edit your .htaccess file to fix this problem.
Follow these steps to edit your .htaccess file
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 400M
php_value max_execution_time 180
php_value max_input_time 180
If none of these solutions work, you can try editing the wp-config.php file located in the root directory of your WordPress website.
If none of these solutions worked for you, you can consult your web host. Your web host may have configured their servers to prevent you from increasing the file size.