Saturday, February 7, 2026
HomeLanguagesCodeigniter, Laravel, WordPress PHP Fatal error Allowed memory size of bytes exhausted

Codeigniter, Laravel, WordPress PHP Fatal error Allowed memory size of bytes exhausted

Through this tutorial, you will learn how to fix PHP: fatal error: allowed memory size of 8388608,16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824 bytes exhausted PHP, laravel, codeIgniter, WordPress in linux ubuntu, windows, mac.

How To Fix PHP Fatal error: Allowed memory size of bytes exhausted codeigniter, Laravel, WordPress

Steps to fix laravel, codeIgniter, wordpress PHP fatal error allowed memory size of 8388608,16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824 bytes exhausted in linux ubuntu, windows, mac:

  • Step 1 – Open php.ini
  • Step 2 – Edit php.ini
  • Step 3 – Save PHP.ini

Step 1 – Open php.ini

Find the directory of the php.ini directory. This will usually be etc/php.ini.

The location of the php.ini file can vary depending on the operating system and how PHP was installed. Here’s how to find the php.ini file on Ubuntu, Windows, and macOS:

Ubuntu:

  1. Open a terminal.
  2. Run the following command to find the location of the php.ini file:
    • php -i | grep “Loaded Configuration File”
  3. The output will display the path to the php.ini file.

Windows:

  1. Open a command prompt.
  2. Run the following command to find the location of the php.ini file:
    • php -i | findstr /C:”Loaded Configuration File”
  3. The output will display the path to the php.ini file.

macOS:

  1. Open a terminal.
  2. Run the following command to find the location of the php.ini file:
    • php -i | grep “Loaded Configuration File”
  3. The output will display the path to the php.ini file.

Step 2 – Edit php.ini

Once you have got php.ini file path. Now, you need to open php.ini file and add the line “memory_limt =” with limit; is as follows:

 ini_set('memory_limit', '1024M'); //

Step 3 – Save PHP.ini

Finally, You adjust the value accordingly and save it. And restart your server.

Recommended Tutorials

RELATED ARTICLES

Most Popular

Dominic
32491 POSTS0 COMMENTS
Milvus
126 POSTS0 COMMENTS
Nango Kala
6862 POSTS0 COMMENTS
Nicole Veronica
11987 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12075 POSTS0 COMMENTS
Shaida Kate Naidoo
6995 POSTS0 COMMENTS
Ted Musemwa
7237 POSTS0 COMMENTS
Thapelo Manthata
6947 POSTS0 COMMENTS
Umr Jansen
6933 POSTS0 COMMENTS