WP 3.0 – Fatal error: Allowed memory size of 33554432 bytes exhausted . . .

Today WordPress.org released the new version of the WP – WP 3.0. The new version is a very impressive update of the cms. But soon after upgrading from my 2.9.x to 3.0 version of wordpress, i tried to make a post in the admin panel and upon publishing it i got this error on wordpress 3.0:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 491520 bytes) in /home/mukhbirc/public_html/addon/nabtron/technab/wp-content/themes/thesis_17/lib/classes/options_site.php on line 851

Well this error is nothing new for many of us. To fix this error, simply follow this:

1. Goto your wordpress root directory

Either login via ftp or use the filemanager if your web host provides you with this feature (to get a cpanel based hosting click here).

2. Edit the config file

In your wordpress 3.0 installation root folder, find the file named:

config.php

Open the file to be edited in your favorite editor

3. Add the code to file and save

Add this code to your config.php file ( type it manually if it don’t work on copy / paste )

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

after the lines :

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

Save the file and refresh your wordpress page and it should not give the error again.

If the error still appears then try changing 64M to 128M.

Let me know if error still persists.

Update: If you are still having the issue while updating your wordpress to 3.0, try deactivating all the plugins and try again (thanks to kazimir)

84 Responses to WP 3.0 – Fatal error: Allowed memory size of 33554432 bytes exhausted . . .

  1. JT

    Set it as high as 300 + megs, no change.

  2. Nabeel

    can you paste the error code here please?

  3. jt

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2964967 bytes) in…………….. still doing it and this is the exact coding:

    /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’, ”);
    define(‘WP_MEMORY_LIMIT’, ’312M’);

    I tried 64 and 128 also

  4. Nabeel

    added you on yahoo messenger

  5. Nabeel

    i can try to solve your issue if you can come online on messenger (Added you on yahoo already)

  6. Kazimir

    Hello guys, i have the same problem when i try to upgrade automatically from WordPress 2.9 to WordPress 3.0, did you find any solution ? :)

  7. Nabeel

    did you read this article to know the solution Kazimir?

  8. kazimir

    ow yes i did, tried it and didn’t work, but i dezactivate all my plugins and tried to upgrade again and then worked
    Thanks!

  9. Nabeel

    thanks kazimir, i updated the article with your info too.

  10. JT

    http://img227.imageshack.us/img227/4068/noooooooo.jpg

    Please see the picture. I’ve disabled plugins, upgraded to 3.0 – and now I cannot use my dashboard. It re-directs me back tothe message shown in the picture…

    SO annoyed.

    =[

    Cannot do ANYTHING at all – on my site now.

  11. jt

    I have installed the full version of yahoo messenger now. I was using my inbox chat before.

    Please try to help me ASAP. I am willing to pay whatever I need to pay.

    Simply livid that these instructions have my site USELESS. It’s barely two months old and now the members have NOTHING to do.

    I cannot even tell them the site is under construction because I cannot access my forums and I cannot post in the blog section of the site.

  12. Nabeel

    sent email on your email id

  13. Nabeel

    ok i have noticed that if you try to copy paste the code it goes wrong in some text editors, instead replace the ‘ marks with your keyboard ones

  14. Nabeel

    there was some issue with wp as it didnt show the code properly, the code in this article is working now.

  15. Vitaly Makarkin

    Thank you for me it works.

  16. Nabeel

    You’re welcome vitaly

  17. Sjoerd van het Schip

    Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 311296 bytes) in /storage/mijndomein/users/120697/public/sites/www.ikwileensterkmerk.nl/wp-admin/includes/template.php on line 2135

    i get this error, even after i edit the config.php…even to 128M…
    any idea’s?

  18. Nabeel

    did you get the issues solved? please let me know if you want me to look into it for you.

  19. ezoryak

    valuable information. thank you. i changed the wp-config.php
    error going on but the wp-admin and wp-login

  20. Nabeel

    are you unable to login to admin panel?

  21. Entreated

    Okay i have been trying to resolve this for a while now with no luck.
    I edited the config with various different values, have also tried different versions of WP from the manually installing to auto install from Fantastico and both didn’t work and produce the memory issue from a fresh install with nothing changed.

    Any ideas?
    Thanks in advanced.

  22. Nabeel

    Lemme know if you need my service and want me to look on your server and wordpress.

  23. Entreated

    Just replied and forgot to include name and email how fun!

    Well just brief this time then:

    Yeah the error is still there i have been using different plugins / methods to get around this but it would be good to have it gone for good then i can just go in a straight line rather than it being a pain in the arse ha!

    Also i want to make sure it’s nothing to do with WordPress itself before i contact my host.

  24. Nabeel

    i’ve sent email to your email id.

  25. jaswinder singh

    thanks sir .. its relay working .. my site working fine now.. thanks again….

  26. Nabeel

    glad to know that it’s working for you Jaswinder

  27. Luis Gregorio |Como Ganhar Dinheiro na Internet

    Thank you for this post.It was valuable information my site working again !!!

  28. Nabeel

    you’re welcome

  29. najib

    thank you for this post, it save my life.
    merci pour cette article, elle m’a sauver,
    chokran, i don’t know how to thank you ?

  30. Nabeel

    you’re welcome Najib!

    don’t know how to say thanks??? well I accept paypal too . . . o_0

  31. Lauren K Sharp

    Not worked for me, what a pity!

  32. Nabeel

    need assistance?

  33. Massimo

    today i tried to upgrade automatically at wp 3.0.3 It (italian , my language) but it starts to give me this error Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes)……

    i tried to add tha codу line but it seems to not work!

  34. Nabeel

    i can help you in it

    let me know if you need my services.

  35. Smiljan

    Someone told me to add something similar in .htaccess, and when I did, it didn’t work. Next, I googled it for few days trying few other articles in vain. Nothing worked till I found your post and lucky it WORKED! Thanks! :)

  36. Nabeel

    I’m glad to know that it worked for you!

  37. evcorreu

    This works for me, other sites don´t mention where to put the code n’ works when i did it your way.

    thanks¡¡¡

  38. Nabeel

    Glad to know that it worked for you! :)

  39. Narendran

    Thanks buddy its working for me.
    Maybe typing it manually is the key for working it.
    Copying and pasting it doesn’t work every one.

  40. Nabeel

    I added the tip to the article too. Thanks.

  41. Yan76ers

    Thanks!
    It works for me.
    Just copying and pasting it under other “define” lines.

  42. Nabeel

    great! glad to know it worked!

  43. amateur videos

    thank you for this post, it save my life.

  44. Nabeel

    You’re welcome! :) Glad to know that!

  45. angela

    not working for me. Tried all ways but to no avail. Should I be trying to free up some space in wordpress?

  46. Dr. Nabeel

    when do you get this error?

  47. chris

    I upped it to 128 but now it fails at 7bytes!!! but whats odd is the main index.php shows up but when i try and edit or create new posts i have an issue any insight you may have?

  48. Dr. Nabeel

    try disabling plugins and enable them one by one to check which plugin is causing it.

  49. chris

    I did and in fact got rid of the entire plugin folder but still get issues within the dashboard when trying to add posts or even change settings. I even updated to 3.2.1 WP but it did not work either. any other ideas on what it may be? Would I be able to kill all the wordpress files and just upload again? or would the same issue arise

  50. yogendra

    man…u are a saviour!!!! thanksss sooooooooooo much!!!!

  51. Dr. Nabeel

    you’re welcome!

  52. ravindra rajput

    Hi ,
    I had successfully updated few plugins then I went ahead to update wordpress but it was unsuccessful.

    But then when I tried logging into my wp-admin dashboard I am getting this error

    Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 376984 bytes) in /home/ravsworl/public_html/wp-admin/index.php on line 13

    My website is http://ravsworld.com

    I tried all these steps:
    1) Increased memory limit in wp-config file
    2) Renamed all the plugins folder using FTP connection

    Still I am unable to solve this issue.

    Please help me resolve this issue as neither me nor my webhosting provider has recent backup to do rollover.

    Thanks & regards,
    Ravindra

  53. Dr. Nabeel

    if you want my services to help you get this fixed, please let me know.

  54. Nazmus

    +1 to you!

    Most people that give these instructions just tell you what to paste into what file, never where to do it, sometimes placement matters a great deal.

    You just saved my blog.

  55. Dr. Nabeel

    Glad to know that you find this post helpful :)

    and thanks for the +1

  56. Jaulas para chinchillas

    Just wanted to thank you for this solution! Finally found something that worked!
    Cheers

  57. Dr. Nabeel

    You’re welcome Jaulas! glad to know that your wordpress is working fine now

  58. yuvaraj

    thanks now its working fine, that fatal error rectified

  59. Dr. Nabeel

    Glad to know that your wordpress fatal error is fixed now!

  60. Imran Hunzai

    I have tried almost everything. It still gives me this:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3676225 bytes) in /home/ihunzai/public_html/wp-includes/class-http.php on line 1420

  61. Dr. Nabeel

    Imran if you want to hire me to fix it for you please let me know

  62. Emmy

    Didn’t work for me… and deactivating the plugin caused more errors.. :(

  63. Emmy

    fixed it… i think

  64. Dr. Nabeel

    oh, do you want me to have a look at it?

  65. Dr. Nabeel

    ok great, how did you fix it?

  66. tava tea scam

    apparently, it is the wp-config.php file and add in the extra code from like this

    define(‘WPLANG’, ”);

    to like this and save it

    define(‘WPLANG’, ”);

    define(‘WP_MEMORY_LIMIT’, ’64M’);

  67. Dr. Nabeel

    thanks :) I said something similar too!

  68. tava tea scam

    dr nabeel .. am no intention to grab the headline .. just trying to help .. btw I went to your website .. cool .. are you using the woo theme?… look familiar

  69. Dr. Nabeel

    no it’s thesis :)

  70. Jae Dyer

    I am having the same issue as they are describing below. I tried everything, even the directions you mentioned here and nothing has changed. I am getting the same error. I am depritely pleading for help ASAP.

  71. Dr. Nabeel

    Jae please let me know if you want me to look at this error for you

    send me the logins and I’ll check

  72. Norbert

    Thanks for this article. This wars really nice and helpfull..best wishes Norbert

  73. Martin - Inverness Web Designer

    Many thanks for posting this solution, it’s taken me over half an hour of searching to resolve this issue on a client’s website and your fix has solved it.

    You posted this middle of last year and WP has evolved since, but it still works so glad I found you with an epic long-tail search!

  74. Dr. Nabeel

    Glad to know it fixed the error for you

    can you tell me the keywords you used for search?

  75. Ralf Kothe

    Thank for this advise. My page runs again.

  76. Dr. Nabeel

    glad to know that it worked for you Ralf

  77. Matthias

    Hi,

    first thx for your solution, i follow your instructions, but id doesn’t work. I added also the 128 M, but not succesfully.
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);
    define(‘WP_MEMORY_LIMIT’, ‘128M’);

    could you help me on?

    .mag

  78. Dr. Nabeel

    it could be due to server settings, did you try talking to your server guys about it ?

  79. webuser

    Great, thanks. The fix in the wp-admin that is suggested all over did not work, but yours did. Perfect

  80. Martin Oxby

    Just saw your reply 7 months later :-/ I’m sorry, I didn’t subscribe by e-mail.

    I think it was just a copy and paste of the actual error, rather than just a ‘keyword or keyphrase’ :)

  81. Dr. Nabeel

    ook, btw, what bought you back here again after so long ?

  82. Martin Oxby

    Just checking through all of our website’s backlinks and saw this thread in the list and realised I had been rude and not replied. So I’m sorry for that.

  83. Dr. Nabeel

    don’t be sorry :) its fine!

  84. Dr. Nabeel

    Glad to know that it worked for you marcus to get your wordpress error fixed . . . and sorry about late response . . . very late infact :)

Leave a Reply

Your email address will not be published. Required fields are marked *