• Resolved carlovitulo

    (@carlovitulo)


    Hello everyone

    After the istallation i added a theme and started to add plug ins. I don’t know why now, I can’t anymore access to my dashboard. When I click “customize” I have the following error (I modified the wp-config.php file whit debug set as true)

    Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 81 bytes) in /hsphere/local/home/bbbmaoh/capsulecoproduction.com/wp-includes/class-wp-post.php on line 240 ( i put the row in Italic).

    At line 240 the file class-wp-post.php on line 240 I have the following text:
    public function __construct( $post ) {
    foreach ( get_object_vars( $post ) as $key => $value )
    $this->$key = $value;
    }

    Thanks for anyone who will help me!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Add these lines to your wp-config.php:

    define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘512M’ );

    just above:

    /* That’s all, stop editing! Happy blogging. */

    Also, go to your child theme’s functions.php (or a custom functions option if you have one), and add these lines:

    /* Set memory limits */
    @ini_set( ‘upload_max_size’ , ‘128M’ );
    @ini_set( ‘post_max_size’, ‘128M’);
    @ini_set( ‘max_execution_time’, ‘300’ );

    Lastly, if the problem persists, ask your host to adjust your php.ini file.

    Thread Starter carlovitulo

    (@carlovitulo)

    THANKS! IT WORKED!

    Thread Starter carlovitulo

    (@carlovitulo)

    It seems that there is one other problem:
    Now if I click to any page of my header menu it return the following error:
    The page you requested is NOT AVAILABLE

    How this could be?

    Thread Starter carlovitulo

    (@carlovitulo)

    I did not open another issue because maybe there is a correlation between what happenede before and now

    What is your URL?

    Thread Starter carlovitulo

    (@carlovitulo)

    I resolved the problem by deleting all the pages and emptying the trash. It seems that the url of those pages have a number.

    By the way the site is: capsulecoproduction.com

    Thanks for your support

    If you’re still getting that database error when clicking About in the menu, try reading this tutorial:

    https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error: Allowed memory size…’ is closed to new replies.