Server Requirements

If you are installing your theme from the WordPress theme installer, but get a message that says Are you sure you want to do this?, most likely your web server is configured with low PHP settings that only allow a certain size ZIP file to be uploaded via WP admin.

Most hosting companies configure their servers to only have the maximum file upload size limit at 8-10 MB, some are less. Our theme ZIP is currently about 15 MB in size which is due to the included plugins and all the demo content. So if you get this error, your web server is rejecting the upload due to the overall size of the zip file. WordPress is, unfortunately, giving you a rather ambiguous message in response. This is not a theme issue or bug.

Memory Size: memory_limit = 256M
Script execution time: max_execution_time = 400
Number of input variables: max_input_vars = 4000

If you don’t have access to the php.ini file, you can add the following values in your .htaccess file:

php_value max_execution_time 400
php_value memory_limit 256M
php_value upload_max_filesize 10M

Directive for wp-config.php

@ini_set( 'max_input_vars' , 4000 );

Be careful using these settings, some hosting companies don’t allow users to change php settings, if you experience any problem after making these changes, please revert these in your .htaccess file, using your FTP client.

Also, there is another way to prevent this error, you can upload your theme via FTP.

Information

We recommend to use PHP v5.6.x or later to avoid incompatibility issues. Also if you're using the latest PHP version such as v7.2.x, try switching to earlier version such as v7.1.x.

In the meantime, you can also add the following code into your wp-config.php file by replacing the line you already have define('WP_DEBUG', false);.

define( 'WP_DEBUG', true ); 
if ( WP_DEBUG ) {
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );
}

This will create an error log file under your wp-content directory, with the name of debug.log and also it will not display any errors for your visitors.

Last updated