0

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.

1
  • Talk to your hoster what the maximum of your hosting is. If it's limited by the server you can't do anything but change hosting. I've never seen a simple managed hosting with 1GB of php memory.
    – Pat_Morita
    Commented May 4, 2019 at 8:11

2 Answers 2

1

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!

1
  • .user.ini file already exists with that information.
    – Grey-lover
    Commented May 4, 2019 at 8:26
-1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.