Fatal Error Menu
-
I’m trying add more pages to my main menu, and i receive this mensage:
Allowed memory size of 41943040 bytes exhausted (tried to allocate 49152 bytes) in /home/factores/public_html/wp-admin/includes/nav-menu.php on line 965
What i need to do?
My website is http://www.factoresdetransferencia4life.com
-
Hey there,
The error is telling you need more memory, the more code you use, the more the site is loaded, the more php is processed and the more memory you need.
Adding plugins and themes push up the requirement for memory.
You could do one of the following like edit your php.ini file or add your own (depending on setup):
memory_limit = 256Mhttaccess:
php_value memory_limit 256MThere is WordPress constant you can try:
define('WP_MEMORY_LIMIT', '256MB');You would change the memory in those to whatever it is you require. 256M was simply an arbitrary number.
If you are not sure how, if this doesn’t work, or have further issues then it would be best to ask your host to help you out with this one, they might be able to see something else occurring.
Take care.
Hi Timothy,
Thank you for your answer…..but…could you tell me step by step what i need to do? and where can i find the pnh.ini?? I have not knowledge with php…..sorry about my english..is terrible!Ï have another question. I don’t like the submenu transparent…..it merges with the background of the page, can i change this? Thank you!
Hey there,
In most hosting environments you won’t have access to the main php.ini, but some will let you create your own to override defaults.
If you have root access you should be able to edit it, else you’d have to create it. If it doesn’t take affect then it’s probably not applicable to your hosting environment.
As I mentioned if you get stuck then your host will be the best one to chat with on this because they know your set up the most intimately. 🙂
For the menu, it seems like maybe this is added direct in the header rather than through a CSS file so maybe your theme has some options to change the background colour. You should maybe check those first.
This is the CSS you’d use if you were adding it manually:
#top-nav-list > li ul, .top-nav-list > ul > li ul { background: #022433; }I think looking at the head though that if you add this to a css file that will be loaded before and so it might not take affect. If that’s the case you would either need to edit the original (not advised) or use !important like this:
#top-nav-list > li ul, .top-nav-list > ul > li ul { background: #022433 !important; }There is a chance that the theme has a CSS field in the options, if not then you can make a child theme:
http://codex.ww.wp.xz.cn/Child_Themes
http://premium.wpmudev.org/blog/create-wordpress-child-theme/Or you can instead use a plugin if you like:
http://ww.wp.xz.cn/plugins/custom-css-manager-plugin/screenshots/
http://ww.wp.xz.cn/plugins/my-custom-css/screenshots/
http://ww.wp.xz.cn/plugins/pc-custom-css/
http://ww.wp.xz.cn/plugins/imporved-simpler-css/screenshots/
Have a fantastic day! 🙂
Thank you!
I used the code:#top-nav-list > li ul, .top-nav-list > ul > li ul {
background: #022433 !important;
}
on the CSS and the menu now is ok, no more transparent!About the memory space…i deleted some plugins and now is ok, i don’t until when!
Thanks for your precious help.
Great! 🙂
FYI on the removing of plugins, best to only ever use what you actually need. Using more just because you can will often lead to a slower website, timeout and memory issues.
If the plugins you removed were not many and small ones (and even with larger ones) then it would still be wise to increase the memory, concurrent users will use more memory and if you found the tipping point easily then it’s probably not far off happening again.
The P3 plugin can help see what other plugins are hogging your resources 🙂
https://ww.wp.xz.cn/plugins/p3-profiler/
Take care.
Thank you again!
The topic ‘Fatal Error Menu’ is closed to new replies.
