Wordpress Memory limit not increasing

I have set 1024M in php.ini file:

memory_limit = 1024M

I have set it in .htaccess file:

IfModule mod_php7.c
    php_value memory_limit 1024M
/IfModule

I have set it in wp-config.php file:

define( 'WP_MAX_MEMORY_LIMIT' , '1024M');
define( 'WP_MEMORY_LIMIT', '1024M' );

But I still get the following error on a plugin page in my Wordpress admin area:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 61440 bytes) in /home/eroticnaughtines/public_html/wp-includes/functions.php on line 4212

And yes, all the files are in the root directory of my Wordpress installation.

Topic apache memory php server Wordpress

Category Web


Adding

define( 'WP_MAX_MEMORY_LIMIT' , '1024M');
define( 'WP_MEMORY_LIMIT', '1024M' );

before

define('ABSPATH', dirname(__FILE__) . '/');

in your wp-config.php file should do the trick.


Try to create .user.ini file in root and put below code

upload_max_filesize = 500M
post_max_size = 256M
memory_limit = 500M
max_execution_time = 300
max_input_vars = 500M

Try and let me know if any query.

Hope it will help!

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.