• Hi,

    I often have Critical Errors with Memory Limit issue. I have set:

    memory_limit = 1024M

    for in Direct Admin panel which is the max value allowed there.

    But the memory limit still happens quite often when creating or updating posts at WP Admin backend.

    How can I solve this consistent issue?

    Appreciate any advice.

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • AddWeb Solution

    (@addweb-solution-pvt-ltd)

    Hi @daro2013,

    To increase the WordPress memory limit, you can try one of the following methods:

    Edit the wp-config.php file: In the root folder, right-click on the wp-config.php file and select View/Edit. Find the line containing WP_MEMORY_LIMIT and change 64M to 256M or any other value you want.

    Change your server settings via PHP.ini: You can modify the PHP.ini file to increase the memory limit. However, this method requires access to the server’s root directory and may not be possible on shared hosting plans.

    Edit your .htaccess file: You can modify the .htaccess file to increase the memory limit. However, this method requires access to the server’s root directory and may not be possible on shared hosting plans

    Hope it helps! 🙂

    Thread Starter daro2013

    (@daro2013)

    Hi @addweb-solution-pvt-ltd

    I have tried this:

    define(‘WP_MEMORY_LIMIT’, ‘1024’);

    What is the max value for wp memory limit; my server’s RAM is 16GB.

    Cheers

    Thread Starter daro2013

    (@daro2013)

    I set memory limit to define(‘WP_MEMORY_LIMIT’, ‘2048’); in wp-config.php, but it wont be increased above 1024M.

    Any help is very appreciated.

    Cheers

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    1. Check the server configuration: The maximum memory limit that can be set depends on the server configuration and the version of PHP being used. According to Stack Overflow, it is not possible to set a memory limit higher than 2GB for a PHP script running as an Apache module.
    2. Increase the memory limit using other methods: You can try increasing the memory limit by modifying the .htaccess file or using the hPanel PHP Configuration. Alternatively, you can upgrade your hosting plan.

    Try adding the code to the .htaccess file:  php_value memory_limit 2048M

    3. Modify the wp-config.php file: You can try modifying the wp-config.php file by adding the following code before the line : define(‘WP_MEMORY_LIMIT’, ‘256M’);
    If this doesn’t work, you can try increasing the limit to 512M or 1024 M.

    Hope this helps! 🙂

    Thread Starter daro2013

    (@daro2013)

    modifying in .htaccess file causes critical errors – wont work for my website.

    modify in wp-config.php does not increase more than 1024M

    I may try in php.ini, but it may not work like wp-config.php

    The best option for me is change hosting plan or use a different VPS server; that is the right way because different vps servers are not the same even they have the same specifications. This server was installed a few days ago, before it, there are no such issues. Both servers from the same server provider.

    Cheers

    • This reply was modified 4 months, 2 weeks ago by daro2013.
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.