AVeryNiceWeb

Permalinks - "Fatal error: Out of memory (allocated..."

Permalinks - "Fatal error: Out of memory (allocated..."

Postby admin » Mon Dec 19, 2016 9:39 am

Symptom: You go to Admin panel => Permalinks and you get the following error:
Fatal error: Out of memory (allocated 80478208) (tried to allocate 72 bytes) in /home/account-name/public_html/your-site.com/wp-includes/plugin.php on line 130

The "tried to allocate" part can be different values.

Essentially, your server doesn't have enough resources to support all the plugins running at the same time.

Solution: You can either increase the php memory size in your server, deactivate plugins or call your host to see if he can increase it for you.

You could also try the following:
  1. Try adding this line to your wp-config.php file:
    define('WP_MEMORY_LIMIT', '64M');
  2. If you have access to your PHP.ini file, change the line in PHP.ini
    If your line shows 32M try 64M:
    memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
  3. If you don't have access to PHP.ini try adding this to an .htaccess file:
    php_value memory_limit 64M
  4. Go to /wp-includes/default-constants.php
    FIND:
    Code: Select all
       // Define memory limits.
       if ( ! defined( 'WP_MEMORY_LIMIT' ) ) {
          if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
             define( 'WP_MEMORY_LIMIT', $current_limit );
          } elseif ( is_multisite() ) {
             define( 'WP_MEMORY_LIMIT', '64M' );
          } else {
             define( 'WP_MEMORY_LIMIT', '40M' );
          }
       }

    REPLACE WITH:
    Code: Select all
       // Define memory limits.
       if ( ! defined( 'WP_MEMORY_LIMIT' ) ) {
          if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
             define( 'WP_MEMORY_LIMIT', $current_limit );
          } elseif ( is_multisite() ) {
             define( 'WP_MEMORY_LIMIT', '96M' );
          } else {
             define( 'WP_MEMORY_LIMIT', '-1' );
          }
       }
Refresh your browser. DONE. This should allocate the most memory resources possible for WordPress.
The AVNW Support Team
http://www.AVeryNiceWeb.com

We also have great domain names for your next website. Go through the list and make an offer now!

Shopping for a new website? See our design deals.

How much is your website worth? Get a free estimate.

And, if our post has provided you with great information, there are a few ways you can show your appreciation:
  1. Like us on Facebook
  2. Post a review.- Posting a good review about this site could help us provide improved support.

Thank You!
User avatar
admin
Site Admin
 
Posts: 459
Joined: Mon Jan 13, 2014 3:18 am
Location: New York City

Return to WordPress

Who is online

Users browsing this forum: No registered users and 0 guests

cron