Title: Fatal error: Allowed memory size&#8230;
Last modified: August 31, 2016

---

# Fatal error: Allowed memory size…

 *  Resolved [carlovitulo](https://wordpress.org/support/users/carlovitulo/)
 * (@carlovitulo)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-allowed-memory-size-87/)
 * 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)

 *  [WebPrezence](https://wordpress.org/support/users/webprezence/)
 * (@webprezence)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-allowed-memory-size-87/#post-7056498)
 * 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](https://wordpress.org/support/users/carlovitulo/)
 * (@carlovitulo)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-allowed-memory-size-87/#post-7056500)
 * THANKS! IT WORKED!
 *  Thread Starter [carlovitulo](https://wordpress.org/support/users/carlovitulo/)
 * (@carlovitulo)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-allowed-memory-size-87/#post-7056508)
 * 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](https://wordpress.org/support/users/carlovitulo/)
 * (@carlovitulo)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-allowed-memory-size-87/#post-7056509)
 * I did not open another issue because maybe there is a correlation between what
   happenede before and now
 *  [WebPrezence](https://wordpress.org/support/users/webprezence/)
 * (@webprezence)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-allowed-memory-size-87/#post-7056534)
 * What is your URL?
 *  Thread Starter [carlovitulo](https://wordpress.org/support/users/carlovitulo/)
 * (@carlovitulo)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-allowed-memory-size-87/#post-7056540)
 * 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
 *  [WebPrezence](https://wordpress.org/support/users/webprezence/)
 * (@webprezence)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-allowed-memory-size-87/#post-7056542)
 * If you’re still getting that database error when clicking **About** in the menu,
   try reading this tutorial:
 * [http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/](http://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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [WebPrezence](https://wordpress.org/support/users/webprezence/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-allowed-memory-size-87/#post-7056542)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
