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:
To view this code please make a small donation or login to see it!

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

If you wish to add visual documentation (screenshots), make a donation and we'll let you know when the post has been updated


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.- Our account had recently a hacking problem on FB and we were forced to create a new one. We lost all our posts & likes. :(
  2. Send us a testimonial.- Testimonials thanking for our good team work can be valuable to us and may encourage others to seek our support.
  3. Post a review.- Posting a good review about this site could also compel others to seek our advice & support.

Thank You!
User avatar
admin
Site Admin
 
Posts: 432
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