WordPress Fatal Error Allowed Memory

[워드프레스] Fatal error: Allowed memory size of 33554432 bytes exhausted 오류

워드프레스에서 “Fatal error: Allowed memory size of 33554432 bytes exhausted…”(치명적인 오류: 허용된 메모리 크기 33554432바이트가 소진되었습니다…) 와 비슷한 오류가 발생하는 경우:

1. wp-config.php 파일에 다음 라인을 추가합니다:

* ‘256MB’가 아니라 ‘256M’임에 유의합니다. 256M로 안 되면 512M로 변경해보시기 바랍니다.

2. PHP.ini 파일에 접근할 수 있는 경우 PHP.ini에서 memory_limit의 값을 증가시킵니다:
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 256M

3. PHP.ini에 접근할 수 없는 경우 .htaccess 파일에 다음 라인을 추가합니다:
php_value memory_limit 256M

4. 위의 방법으로 문제를 해결할 수 없는 경우 웹호스팅 업체에 연락하여 도움을 요청합니다.

♠ 동일한 내용을 다루는 “워드프레스에서 메모리(PHP Memory Limit) 확인 및 늘리기” 글도 확인해보시기 바랍니다. (글 개수가 너무 많다 보니 간혹 중복되는 주제로 글이 작성되기도 하네요.)

♠ 일부 공유호스팅에서는 메모리 크기를 늘리는 것을 허용하지 않을 수 있습니다. 그런 경우 다른 웹호스팅 업체로 이전하는 것을 고려해야 할 것입니다.

*일부 글에 제휴링크가 포함될 수 있습니다.기부를 통해 블로그 운영을 후원하실 수 있습니다.

WordPress Fatal error: Allowed memory size exhausted

what is Allowed memory size exhausted error in WordPress ?

This is one of the most common errors that is hard-to-fix problem especially with applications that process large amounts of data. some theme customizers display a white blank page instead of displaying the desired output. By default, WordPress automatically tries to increase PHP memory limit if it is less than 64MB. However, 64MB is often not high enough.. It is very common to exceed this limit and get the error

If you aren’t sure what is your PHP memory limit, the limit is described in the error message in bytes, so this is the conversion for you to make things simpler:

  • PHP: Fatal Error: Allowed Memory Size of 8388608 Bytes Exhausted – 8 MB
  • PHP: Fatal Error: Allowed Memory Size of 16777216 Bytes Exhausted – 16 MB
  • PHP: Fatal Error: Allowed Memory Size of 33554432 Bytes Exhausted – 32 MB
  • PHP: Fatal Error: Allowed Memory Size of 67108864 Bytes Exhausted – 64 MB
  • PHP: Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted – 128 MB
  • PHP: Fatal Error: Allowed Memory Size of 268435456 Bytes Exhausted – 256 MB
  • PHP: Fatal Error: Allowed Memory Size of 536870912 Bytes Exhausted – 512 MB
  • PHP: Fatal Error: Allowed Memory Size of 1073741824 Bytes Exhausted – 1 GB

After viewing the error message you will be able to determine the memory limit of your site.

How to resolve the Allowed memory size exhausted error in WordPress

The most basic step is to try to increase the memory limit.

First and foremost you need to edit the wp-config.php file on your WordPress site. Which is located in your WordPress site’s root folder, and you will need to use an FTP client or file manager in your web hosting control panel.

Next, you need to paste this code in wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

This code tells WordPress to increase the PHP memory limit to 256MB.

Once you are done, you need to save your changes and upload your wp-config.php file back to your server.

You can now visit your WordPress site and memory exhausted error should disappear now.

Note: If this solution does not work for you, then this means your web hosting service provider does not allow WordPress to increase PHP memory limit. You will need to ask your web hosting provider to increase your PHP memory limit manually.

Leave a Reply

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