Fatal error: Allowed memory size

Jika terjadi error Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /home/baliton/public_html/wp-includes/default-widgets.php on line 632

Langkah-langkah yang diambil :

  1. Coba buat file .htaccess di folder /public_html/ dengan menaikkan memory limit sampai 128M.
    php_value memory_limit 128M
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # End WordPress
  2. atau di beberapa referensi lain, edit file wp-setting.php, tambahkan baris berikut ini
    define( 'WP_MEMORY_LIMIT', '64M' );
  3. 1. Increase the memory limit setting in php.ini e.g. (memory_limit = 64M ;). Many hosts may not allow this.
    2. Increase the memory limit via .htaccess e.g. (php_value memory_limit 64M). Many hosts may not allow this.
    3. Increase the memory limit via wp-config.php e.g. (define(‘WP_MEMORY_LIMIT’, ’64MB’);)
  4. Alternatif lain, buat file php.ini di folder public_html
    memory_limit = 128M
    post_max_size = 128M

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>