• Resolved danieler

    (@danieler)


    Hello all,

    got a litte matter and wondering how to solve. This is my first WP site so there might be something wrong.
    When I try to chage the menu bar or change a user role I got this message. How could I try to solve?

    Fatal error: Allowed memory size of 146800640 bytes exhausted (tried to allocate 8192 bytes) in XXXXX on line 207

    OT.: Is it possible (how?) to redirect some pages to the user but don’t redirect to the admin?

    Thanks for support!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Moderator James Huff

    (@macmanx)

    If you’re seeing this error either suddenly (no specific task was done to cause the error) or frequently, try deactivating all plugins to rule-out a plugin-specific issue and try switching themes to rule-out a theme-specific issue.

    Otherwise, here are three ways to increase PHP’s memory allocation:

    1. If you can edit or override the system php.ini file, increase the memory limit. For example, memory_limit = 256M

    2. If you cannot edit or override the system php.ini file, add php_value memory_limit 256M to your .htaccess file.

    3. If neither of these work, it’s time to ask your hosting provider to temporarily increase PHP’s memory allocation on your account. Keep in mind that most decent hosting providers allocate 32 MB to PHP under each account, and most decent hosting providers allow users to temporarily increase the memory allocation. If your hosting provider won’t accommodate you, perhaps it’s time to find a new hosting provider.

    (in the above examples, the limit is set to 256MB)

    Thread Starter danieler

    (@danieler)

    Thanks for your answer!

    I changed the memory_limit to 256M (is it not too much?). I edited without problem an user role but when tried to edit the menu bar and save I got this again:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) in /htdocs/public/www/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-config/wpml-config.class.php on line 207

    What could this be?

    OT:
    How do I increase the speed of my website? It loads really slow and I don’t understand why. I installed W3 loading a configuration file given by the theme developer but it seems really slow

    Moderator James Huff

    (@macmanx)

    I changed the memory_limit to 256M (is it not too much?).

    That depends on your hosting provider. They do impose hard limits, but usually those limits are higher than 256 MB.

    I edited without problem an user role but when tried to edit the menu bar and save I got this again:

    Is this the menu you’re building at Appearance -> Menus in your blog’s Dashboard? If so, how many items are in the menu?

    How do I increase the speed of my website? It loads really slow and I don’t understand why. I installed W3 loading a configuration file given by the theme developer but it seems really slow.

    Depending on your hosting provider, a caching plugin (if not configured properly) can actually slow down your site. See https://codex.www.ads-software.com/WordPress_Optimization for some recommendations.

    https://www.webpagetest.org

    is the best speed test site I’ve found, with a visual waterfall to help you pinpoint any bottlenecks and even a few tips to help speed up and optimize your site.

    Moderator James Huff

    (@macmanx)

    And another, just for the sake of variety. ??

    https://gtmetrix.com/

    Thread Starter danieler

    (@danieler)

    Is this the menu you’re building at Appearance -> Menus in your blog’s Dashboard? If so, how many items are in the menu?

    Yes, I have just 11 items in the menu. But I think I found out the problem through a little bit of goggling. It seems that WPML String Translation have some problem and other user reported this problem too. In fact I tried to disable it and I could edit all without problem. That meens that until they make an update I need to disable the plugin, make my changes and enable the plugin.

    See https://codex.www.ads-software.com/WordPress_Optimization for some recommendations.

    Thanks, I would read this out!

    https://www.webpagetest.org
    https://gtmetrix.com/

    Thanks for the sites! Good to know them for a non website beginner.
    I may think I got some bad results on webpagetest.org
    F – First Byte Time
    A – Keep-alive Enabled
    F – Compress Transfer
    N/A – Compress Images
    F – Cache static content
    X – Effective use of CDN

    Moderator James Huff

    (@macmanx)

    You’re welcome!

    If you get the same bad errors on GTMetrix, I’d recommend looking into fine-tuning your caching plugin, or the other optimization things at the Codex article.

    Thread Starter danieler

    (@danieler)

    Here the results:

    I may think I had to work on something here..
    Where do I enable gzip compression and what is his role?

    Moderator James Huff

    (@macmanx)

    Gzip compression essentially makes the page data smaller as it’s sent to the browser. That’s usually enabled at the server level, so you’ll need to contact your hosting provider.

    At GTMetrix, you can click on the name for each result for more info.

    Thread Starter danieler

    (@danieler)

    Hi James,

    thanks a lot for your help in all, really appreciate it.

    Would make just a last question, I guess I had bored you enough.

    I would like to “hide” that I were using wordpress to my users. I would not show “wp-uploads” & “wp-etc.” to the user, I would like to have a clear site, is it possible?

    And how much plugins is the max to install to not avoid the good usability?

    Thanks again

    Moderator James Huff

    (@macmanx)

    Sure, just start at https://codex.www.ads-software.com/Editing_wp-config.php#Moving_wp-content_folder ??

    As for plugins, there really is no maximum for WordPress itself, but there probably will be for your server. There are sites out there running hundreds, but those are all on dedicated servers with tons of RAM and CPU cores.

    Thread Starter danieler

    (@danieler)

    Hi James,

    must be honest, I’m having some doubts on how to do it and also asking me if this would move without problem all things already uploaded.

    The Wp-content folder could stay, avoiding issues, but If possible I don’t want to show it in the links.
    Maybe it was what you sent me and I did not understand it

    Moderator James Huff

    (@macmanx)

    Right, you just need to re-name the folders, and make the adjustments as stated in the examples at https://codex.www.ads-software.com/Editing_wp-config.php#Moving_wp-content_folder

    For example, if you don’t want people to see “wp-content”, rename that folder to “silly-folder” and add this to wp-config.php:

    define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/blog/silly-folder' );
    define( 'WP_CONTENT_URL', 'https://example/blog/silly-folder' );
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Memory exhausted’ is closed to new replies.