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 we have provided you with great information or service, there are a few ways you can show your appreciation:
  1. Become a AVNW Paid Subscriber.- We are constantly updating our data base with great tips and solutions to common problems, especially with Ultimate Member. If you found our site because of a WordPress issue, then your issue (if solved) will be published with the solution(s) for others to benefit from.
  2. Make a small donation.- We have buttons at the top and bottom that will allow you to do so via PayPal fast.
  3. Send us a testimonial.- Testimonials giving us praise for our good work is also valuable to us and encourages others to seek our support.
  4. Post a review (OP only).- If you came from a WordPress support board, posting a good review about our free service could also compel others to seek our advice & support.
  5. Like us on Facebook.- Recently our account had a problem on FB and we were forced to create a new one. We lost all our posts & likes. :(
If you do all 5, you'll get a surprise bonus from us. :)
Thank You!
User avatar
admin
Site Admin
 
Posts: 381
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