• Hello WP guys!
    I was following a course of developing theme in WP,
    installed bootstrap css and js folder inside the theme folder
    All steps since starting going ok, till reached to add some code in the file: functions.php
    ===========
    <?php

    function load_css()
    {

    wp_register_style(‘bootstrap’, get_template_directory_uri(). ‘/css/bootstrap.min.css’, array(), false, ‘all’ );
    wp_enqueue_style(‘bootstrap’);

    }
    add_action(‘wp_enqueue_scripts’, ‘load_css’);

    function load_js()
    {
    wp_enqueue_scripts(‘jquery’);
    wp_register_script(‘bootstrap’, get_template_directory_uri() . ‘/js/bootstrap.min.js’, ‘jquery’, false, true);
    wp_enqueue_script(‘bootstrap’);
    }
    add_action(‘wp_enqueue_scripts’, ‘load_js’);
    ===========

    When loaded the main (home page) this result was displayed:
    ———————-
    Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in C:\laragon\www\test\wp-includes\cache.php on line 544

    Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0
    ———————-

    I’m using windows 10, 64 bit,
    Local server: laragon

    As per the following the course on Youtube, saying that the main page will show as a blank page, why I am seeing these errors?
    Please help how to solve this issue,
    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello!
    You should try pasting this in wp-config.php just before the line that says ‘That’s all, stop editing! Happy blogging.’

    define( 'WP_MEMORY_LIMIT', '256M' );

    or a higher limit, depending on what you have set currently.

    Thread Starter almadar

    (@almadar)

    I tried this, unfortunately, the same error displayed:

    Fatal error: Allowed memory size of 3145728000 bytes exhausted (tried to allocate 20480 bytes) in C:\laragon\www\test\wp-includes\class-wp-hook.php on line 281

    Hm, that seems to do the trick most of the time. Yet as it didn’t work, give this a read: https://thisinterestsme.com/fix-fatal-memory-bytes-exhausted/

    Thread Starter almadar

    (@almadar)

    I can’t find any solution to solve this memory problem…
    still the same error,, I followed the string path to the files mentioned in the error and change the values, but the error still there..
    Thanks for trying to help..

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to fix this error?’ is closed to new replies.