Can't open php.ini in Laragon to potentially fix a memory limit issue with php (using Wordpress)

  • | 504 points

    hello everyone, I am having this common php error: ‘Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in C:\laragon\www\testone\wp-includes\class-wp-hook.php on line 312’
    I increased the memory limit in the wp-config
    define( 'WP_MEMORY_LIMIT', '256M' );
    define('WP_MAX_MEMORY_LIMIT', '256M');

    , in the .htaccess
    php_value memory_limit 256M
    php_value upload_max_filesize 12M
    php_value post_max_size 13M

    and created a php.ini file which I added in the usr/tpl folder
    memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)
    upload_max_filesize = 12M
    post_max_size = 13M

    (the php.ini didn’t exist after downloading laragon--and yes the show hidden files option is on--. I can't open it via laragon, i keep clicking and nothing happens) I also create a info.php file and it says that the max memory limit is 256M Nothing works ANy help would be greatly appreciated, thanks!

  • | 1825 points

    Hi @LorelaiG
    If in info.php shows the exactly the setting that you have set, then you have set it correctly.
    Can you describe more details about your wordpress and php version?
    maybe you can try download and use different version of PHP
    You can download PHP for windows via this link [](link url)

  • | 504 points

    Hello, thank you. I ended up uninstalling laragon again because even the switch to another php version did't work either. Now I'm having other issues...It's bug week!

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.