Error with WordPress Visual Composer plugin

0

I have installed WordPress and the theme 'Hood Theme', which once installed asks to install a series of plugins, including the Visual Composer.

Once everything is installed, the website works, but the control panel (wp-admin) does not work and sends the following error:

  

Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to allocate 491520 bytes) in /home/miweb/wp-content/plugins/Ultimate_VC_Addons/modules/Ultimate_Team.php on line 367

This WP template already has it installed in another folder of the same domain, and it works without problems. I contacted the support of the template and they told me to increase the memory limits of PHP and WordPress, so I did it with the values they recommended:

In Wordpress%% co:

define('WP_MEMORY_LIMIT', '512M');

In the php.ini (this is what my hosting provider configured directly to me):

max_execution_time = 300
max_input_time = 600
max_input_vars = 2000
memory_limit = 512M

I have verified that these values are working by entering miweb / phpinfo.php

Once all the above is done, the problem persists, and in the support of the template do not throw me any solution that works for me. Let's see if we can find the fault here.

And these are the versions I'm using:

  • WordPress version: 4.7.5

  • PHP version: 5.2.17

  • Visual Composer version: 4.1 +

asked by Mark Lenders 12.06.2017 в 16:03
source

2 answers

0

It is not advisable to use the version of PHP 5.2.17 for a Wordpress 4.7.5 (I recommend upgrading to 4.8 to remove the vulnerabilities that that version has)

The best you can do is have PHP 7 or failing PHP 5.6 , the memory consumption will be much lower and with this you may not need or increase the maximum consumption of Wordpress.

In any of the cases, you have to be careful to modify by hand any Wordpress core file, since in any update of the same those values will be lost.

Something is not right if modifying the wp-config.php changes are not applied, keep in mind that the file itself has already been controlled if those definitions exist:

// Define memory limits.
if ( ! defined( 'WP_MEMORY_LIMIT' ) ) {
    if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
        define( 'WP_MEMORY_LIMIT', $current_limit );
    } elseif ( is_multisite() ) {
        define( 'WP_MEMORY_LIMIT', '64M' );
    } else {
        define( 'WP_MEMORY_LIMIT', '40M' );
    }
}

if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
    if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
        define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
    } elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) {
        define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
    } else {
        define( 'WP_MAX_MEMORY_LIMIT', '256M' );
    }
}

Maybe somewhere in your code you already had it defined.

    
answered by 13.06.2017 в 11:59
-1

SOLVED

It turns out that I was changing the Wordpress memory in the general wp-config.php, but in this case it had to be changed in:

wp-includes / default-constants.php

Changing line 41 which is: define ('WP_MEMORY_LIMIT', '40M');

For this: define ('WP_MEMORY_LIMIT', '512M');

Greetings and thanks again.

    
answered by 12.06.2017 в 16:59