WordPress.org

Ready to get started?Download WordPress

Forums

Php memory limit not updated (22 posts)

  1. xphunt3r
    Member
    Posted 4 years ago #

    Hi
    I am having the problem with php memory limit. I have increased php memory to 128MB in php.ini but it is not updated. It still show i have 32MB php memory limit. When I check php info file, it shows 128MB. When I check php limit information with TPC! Memory Usage plugin, it shows 32MB. I talk to web hosting, they told they have increased it to 128MB but why I am still having 32MB.
    When I add php_value memory_limit 16M to .htaccess file it shows 500 server error to my site.
    My wordpress memory limit is set to 128Mb so there is no problem with wp memory.

    Any help?

    kind regard

  2. Mike McKoy
    Member
    Posted 3 years ago #

    Did you ever get this resolved? If so... how?

  3. chinmoy
    Member
    Posted 3 years ago #

    write in wp-config.php file following code
    define("WP_MEMORY_LIMIT", 128);

    One more thing that when you updare the php.ini file then need to restart the server(apache or IIS); After that you will get updating settings.

  4. Mike McKoy
    Member
    Posted 3 years ago #

    I did and set it to 200mb

    The max memory available is now 200mb but it still shows the memory limit as 90MB! See below. Any ideas...

    *****************************************************
    Mem: WP 200M Usage 58% 52.11M Limit 90M *

    Server: OS Linux Software Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.13 Version 64Bit
    System: PHP 5.2.13 SQL 5.1.48 Build 5.1.48
    WordPress: VER 3.0.1 Max Post 500M Max Upload 500M
    Debug: State 0 Display 1 Log 0 Script 0 Deprecated 0

    SQL Uptime: 0 days, 1 hours, 9 minutes, 49 seconds

    Default Theme: twentyten (since wp-3.0)
    Allow DB Repair: 0 (since wp-2.9)
    Auto-Save: 0 Interval 60 seconds (since wp-2.5)
    WP (Hyper - Super - W3 Total) Cache: 1 (since wp-2.6)
    Magpie RSS Cache: 1 Age 3600 seconds (since wp-1.5)
    Post Revisions: 1 (since wp-2.6)
    Trash: 0 Empity 30 days (since wp-2.9) Media 0 (wp-3.0?)

    Need MU~LTI-SITE Version?

    Legend 0=disabled 1=enabled * PHP or WP

  5. Reuben Gunday
    Member
    Posted 3 years ago #

    Did you restart apache after increasing the PHP limit?

  6. Mike McKoy
    Member
    Posted 3 years ago #

    Sure did... Restarted many times. I think thats why I see the available memory as 200mb. But setting the memory limit in the config file didn't help.

  7. Reuben Gunday
    Member
    Posted 3 years ago #

    hmm...Just check if you inserted the code correctly in wp-congifg.php file...
    Eg:-
    define('WP_MEMORY_LIMIT','200m');

  8. Mike McKoy
    Member
    Posted 3 years ago #

    man... this is weird. I actually cut and paste your statement verbatim... Plus I restarted apache from the root account in ssh.

    define('WP_MEMORY_LIMIT','200m');

    The only difference was the lowercase 'm'. But... no luck. still says the memory limit is 90.

    I don't get it? is this cached or in the database somewhere?

  9. Reuben Gunday
    Member
    Posted 3 years ago #

    Where are you adding this code? at the end of the file?

  10. Mike McKoy
    Member
    Posted 3 years ago #

    Hey there... I'm putting it in the config.php file near the end. See below.

    /** WordPress absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    define('WP_MEMORY_LIMIT','200m');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
  11. Reuben Gunday
    Member
    Posted 3 years ago #

    clear the cache & deactivate all cache plugins and see if it helps.
    if it doesn't open wp-includes >> default-constants.php and check whether this code exists(on line 39)
    @ini_set('memory_limit', WP_MEMORY_LIMIT);

  12. Mike McKoy
    Member
    Posted 3 years ago #

    hey there...

    @ini_set('memory_limit', WP_MEMORY_LIMIT); does exist.

    I also manually deleted the cache. that must be getting set somewhere. Arggh :(

    Site is very slow sometimes.

  13. Reuben Gunday
    Member
    Posted 3 years ago #

    try to change that line and see if it works(also clear cache after changing it)
    @ini_set('memory_limit', '200M');

  14. Mike McKoy
    Member
    Posted 3 years ago #

    didnt work. man!

  15. einrad
    Member
    Posted 3 years ago #

    I really need help on this too. I tried everything above, but in my case it looks like something is keeping it at a memory limit of 32M.

    Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home/mysite/public_html/blog/wp-includes/kses.php(550) : runtime-created function

    My host tried bumping it up to 64M and 80M but the same thing, exhausted at 32M. Help!

  16. Kevin Cristiano
    Member
    Posted 3 years ago #

    Give this Plugin a try: Memory Bump

  17. einrad
    Member
    Posted 3 years ago #

    That plugin looks like it is for a wordpress update. I am getting the message all of a sudden when I go into the admin panel and view the list of posts.

  18. einrad
    Member
    Posted 3 years ago #

    Tried the plugin, did not work. When I signin and review posts, the third post displays the error mentioned above in the list of posts and no posts after the third one displays. I am at a loss right now what else might be affecting the memory limit. I am at 3.01.

  19. danoneil
    Member
    Posted 3 years ago #

    Who is your host? I'm having the same problem as this - only affects me when trying to update larger plugins or wordpress itself.

  20. chrishoward
    Member
    Posted 3 years ago #

    This trick doesn't work for me ever since WP 3.

    what I found worked was to create a PHP.INI file in the wp-admin folder with the line:

    memory_limit = 128M

    (or whatever you want to make it)

  21. plinth
    Member
    Posted 3 years ago #

    Just to throw in my two pennies - moving the php.ini file from the public_html root (where I was told to put it), into the wp-admin folder worked for me.

  22. smithdoctah
    Member
    Posted 3 years ago #

    @ Plinth

    well done good sir after many attempts trying the 4 methods in other posts, moving the php.ini to wp-admin worked.
    --
    memory_limit = 64M;
    --
    in the php.ini

    AND

    move it to your wp-admin folder.

    cheers.

Topic Closed

This topic has been closed to new replies.

About this Topic