Skip to main content

Fatal error: Allowed memory size of 67108864 bytes exhausted wordpress

Fatal error: Allowed memory size of 67108864 bytes exhausted wordpress


open your file manager
then goto wordpress directory wp-include -> then   default-constants.php


change a memory size values
64 to 256 or your need

modifications see below light blue color  in default-constants.php  

<?php
/**
 * Defines constants and global variables that can be overridden, generally in wp-config.php.
 *
 * @package WordPress
 */
/**
 * Defines initial WordPress constants
 *
 * @see wp_debug_mode()
 *
 * @since 3.0.0
 *
 * @global int $blog_id
 */
function wp_initial_constants() {
 global $blog_id;
 /**#@+
  * Constants for expressing human-readable data sizes in their respective number of bytes.
  *
  * @since 4.4.0
  */
 define( 'KB_IN_BYTES', 1024 );
 define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES );
 define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES );
 define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES );
 /**#@-*/
 $current_limit     = @ini_get( 'memory_limit' );
 $current_limit_int = wp_convert_hr_to_bytes( $current_limit );
 // 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', '512M' );
  } else {
   define( 'WP_MEMORY_LIMIT', '128M' );
  }

 }
 if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
  if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
   define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
  } elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 512M */ ) {
   define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
  } else {
   define( 'WP_MAX_MEMORY_LIMIT', '512M' );
  }

 }

Comments

Post a Comment

Popular posts from this blog

How to delete Torrent power account

Sanjay Tech solutions 3 easy tips to delete torrent power account  Step 1 : login in to your account Step 2 : click on more profile settings Step 3 : you see red button with deactivate account click then enter your password Your account deactivate 

Anaconda update error PermissionError(13, 'Permission denied')

sanjay@luck:~$ conda update -n base conda Solving environment: done ## Package Plan ##   environment location: /home/sanjay/anaconda3   added / updated specs:     - conda The following packages will be UPDATED:     conda: 4.4.10-py36_0 --> 4.5.4-py36_0 Proceed ([y]/n)? y Preparing transaction: done Verifying transaction: done Executing transaction: failed ERROR conda.core.link:_execute(481): An error occurred while uninstalling package 'defaults::conda-4.4.10-py36_0'. PermissionError(13, 'Permission denied') Attempting to roll back. Rolling back transaction: done PermissionError(13, 'Permission denied') =========== you need to give a writable directory permission. on anaconda install directory. --> $ sudo chmod -R 755 anaconda3 sanjay@luck:~$ sudo chmod -R 777 anaconda3/  ============== sanjay@luck:~$ conda update anaconda-navigator Solving environment: done ## Package Plan ##   environment location: /home/sanjay/anaconda3   added / u