Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Kupası
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Düzeltme: WordPress Belleği Tükendi Hatası – PHP Belleğini Artırın

Editoryal Not: WPBeginner üzerindeki ortak bağlantılardan komisyon kazanıyoruz. Komisyonlar, editörlerimizin görüşlerini veya değerlendirmelerini etkilemez. Editoryal Süreç hakkında daha fazla bilgi edinin.

WordPress’te izin verilen bellek boyutu tükendi hata mesajı görüyor musunuz?

Bu en yaygın WordPress hatalarından biridir ve WordPress’teki PHP bellek sınırını artırarak kolayca düzeltebilirsiniz.

Bu makalede, PHP bellek sınırını artırarak WordPress bellek tükendi hatasını nasıl düzeltebileceğinizi göstereceğiz.

Fix: WordPress Memory Exhausted Error – Increase PHP Memory

WordPress Bellek Tükendi Hatası Nedir?

WordPress bellek tükendi hatası, web siteniz görevleri yerine getirmekte zorlanıyorsa görebileceğiniz bir mesajdır.

WordPress, çalışması için belleğe ihtiyaç duyan sunucu taraflı bir programlama dili olan PHP kullanılarak oluşturulmuştur.

Tıpkı diğer bilgisayarlarda olduğu gibi, web sunucuları da aynı anda birden fazla uygulamayı çalıştırmak için sınırlı miktarda belleğe sahiptir. WordPress barındırma sağlayıcıları, PHP dahil olmak üzere farklı uygulamalara belirli bellek boyutları tahsis eder.

WordPress kodunuz varsayılan olarak ayrılan bellekten daha fazla bellek gerektirdiğinde, bu hata mesajını görürsünüz:

Önemli hata: İzin verilen bellek boyutu 33554432 bytes tükendi (2348617 byte ayırmaya çalıştı) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx

Memory exhausted error displayed on a WordPress site

WordPress siteniz varsa sunucu belleğini tüketiyor olabilir:

  • Çok sayıda resim, video ve diğer medya türleri
  • Çok sayıda kullanılmayan WordPress eklentisi
  • Barındırma planı kaynaklarını aştı

Varsayılan olarak WordPress, PHP bellek sınırı 64MB’den azsa otomatik olarak artırmaya çalışır. Ancak, 64MB genellikle yeterince yüksek değildir.

Bunu söyledikten sonra, bellek tükendi hatasını önlemek için WordPress’te PHP bellek sınırını nasıl kolayca artırabileceğimizi görelim.

Eğitimde gezinmek için aşağıdaki hızlı bağlantıları kullanabilirsiniz:

Not: Bu yöntemlerden bazıları WordPress dosyalarınızı doğrudan düzenlemenizi gerektirir. Web sitenizde daha fazla hata görünmesini önlemek için önce web sitenizi yedeklemenizi öneririz.

Seçenek 1: wp-config.php Dosyasını Düzenleme

İlk olarak, WordPress sitenizdeki wp-config.php dosyasını düzenlemeniz gerekir. Bu, kök dizinde bulunan ve genellikle public_html olarak adlandırılan temel WordPress dosyalarından biridir.

FileZilla gibi bir FTP istemcisi veya web barındırma kontrol panelinizdeki dosya yöneticisini kullanmanız gerekecektir.

Ardından, aşağıdaki satırı wp-config.php dosyasına, ” Hepsi bu kadar, düzenlemeyi durdurun!” yazan satırdan hemen önce yapıştırmanız gerekir. Mutlu bloglar.

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

Bu kod WordPress’e PHP bellek sınırını 256 MB’a çıkarmasını söyler.

Daha fazla ayrıntı için, wp-config.php dosyasının nasıl bulunacağı ve düzenleneceği ile ilgili adım adım kılavuzumuza bakın.

İşiniz bittiğinde, değişikliklerinizi kaydetmeniz ve wp-config.php dosyanızı sunucunuza geri yüklemeniz gerekir.

Artık WordPress sitenizi ziyaret edebilirsiniz ve bellek tükendi hatası ortadan kalkmış olmalıdır.

Seçenek 2: .htaccess Dosyasını Düzenleme

Bir sonraki yöntem .htaccess dosyasını düzenlemektir. Bu dosya da WordPress web sitesinin kök klasöründe bulunur.

Burada, #END WORDPRESS yazan satırdan önce aşağıdaki kodu yapıştırmanız gerekir.

php_value memory_limit 256M

Önceki koda benzer şekilde, WordPress’e PHP bellek sınırını 256MB’a çıkarmasını söyleyecektir.p

Bundan sonra, değişikliklerinizi kaydedin ve dosyayı web sunucunuza geri yükleyin. Artık WordPress web sitenizi tekrar açarak bellek sınırı hatasının ortadan kalkıp kalkmadığını görebilirsiniz.

.htaccess dosyasını bulamıyorsanız, .htaccess dosyasının neden eksik olabileceği ve nasıl bulunacağı hakkındaki kılavuzumuza göz atın.

Seçenek 3: php.ini Dosyanızı Kontrol Etme

Yukarıdaki yöntemler işe yaramazsa, php.ini dosyanıza bakmak isteyebilirsiniz.

php.ini, PHP sürümü ve PHP betikleri dahil olmak üzere PHP ayarlarınızı kontrol eden bir dosyadır. Genellikle barındırma sağlayıcınız yönettiği için bir WordPress çekirdek dosyası değildir.

PHP bellek kullanım limitinizi görmek için kodunu kontrol edebilirsiniz. Daha fazla ayrıntı için php.ini dosyasının nasıl bulunacağı ve düzenleneceği hakkındaki kılavuzumuza bakabilirsiniz.

Ancak bu gelişmiş bir yöntem olduğundan, WordPress bellek sınırını manuel olarak artırıp artıramayacaklarını öğrenmek için web barındırma sağlayıcınızın destek ekibiyle iletişime geçmenizi öneririz. Aksi takdirde, bu daha fazla hataya neden olabilir.

Daha fazla bilgi için WordPress desteğini nasıl düzgün bir şekilde isteyeceğinize ilişkin kılavuzumuzu okuyabilirsiniz.

Seçenek 4: WordPress Hosting’inizi Yükseltme

Sürekli olarak bellek tükendi hatasıyla karşılaşıyorsanız, bu web sitenizin mevcut barındırma planını aştığının bir işareti olabilir.

Web siteniz daha fazla ziyaretçi çektikçe ve daha fazla içerik ekledikçe, sorunsuz çalışması için daha fazla kaynağa ihtiyaç duyar. Daha yüksek bellek tahsisine sahip bir plana yükseltmek kalıcı bir çözüm olabilir.

Aşağıdaki durumlarda WordPress barındırma hizmetinizi yükseltmeyi düşünün:

  • Önceki çözümleri denediniz ve hata devam ediyor.
  • Web sitenizin trafiği veya içeriği önemli ölçüde arttı.
  • Daha fazla kaynak gerektiren özellikler veya işlevler eklemeyi planlıyorsunuz.

Bluehost, web sitenizin ihtiyaçlarına göre ölçeklenebilen uygun fiyatlı ve güvenilir WordPress barındırma planları sunar. WordPress için özel olarak optimize edilmiş kullanıcı dostu bir platform sağlayarak web sitenizi yönetmenizi kolaylaştırır.

Bluehost kupon kodumuzu kullanırsanız, ilk satın alma işleminizde% 61’e varan indirim elde edebilirsiniz. Almak için aşağıdaki düğmeyi tıklamanız yeterlidir:

Bluehost offer for WPBeginner readers

WordPress Belleğinizin Tükenmesini Nasıl Önlersiniz?

Artık WordPress bellek tükendi hatasını düzelttiğinize göre, tekrar olmasını önlemek için bazı proaktif adımları burada bulabilirsiniz:

Umarız bu makale PHP bellek sınırını artırarak WordPress bellek tükendi hatasını çözmenize yardımcı olmuştur. Ayrıca WordPress hatalarını gidermek için adım adım yeni başlayanlar kılavuzumuzu ve sitenizi büyütmek için en iyi WordPress eklentileri için uzman seçimlerimizi görmek isteyebilirsiniz.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Açıklama: İçeriğimiz okuyucu desteklidir. Bu, bazı bağlantılarımıza tıklarsanız komisyon kazanabileceğimiz anlamına gelir. WPBeginner'ın nasıl finanse edildiğini, neden önemli olduğunu ve nasıl destek olabileceğinizi görün. İşte editoryal sürecimiz.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Ultimate WordPress Araç Kiti

Araç setimize ÜCRETSİZ erişim sağlayın - her profesyonelin sahip olması gereken WordPress ile ilgili ürün ve kaynaklardan oluşan bir koleksiyon!

Reader Interactions

464 yorumBir Cevap Bırakın

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. mohadese esmaeeli says

    With your permission, I’d like to add a note for users to the article:
    Please note that htaccess is a hidden file. First, check if it exists. In case you couldn’t find the .htaccess file in your hosting, you can create one using text editor programs like Notepad. Simply create a file named htaccess. Alternatively, in the public_html directory, click on “New File” and create a file with the same name.

  3. mohadese esmaeeli says

    I have encountered this issue multiple times, and it seems to be one of the most common problems in the WordPress domain. Each time, I either contacted the hosting support or edited the htaccess file to resolve the issue. The htaccess file appears to be like a magic solution, and whenever an issue arises, it can be quickly reviewed and fixed.

  4. Mrteesurez says

    I used to encounter some errors like this on my websites but I didn’t know what to do. Something when I tried to solve it, I just uninstall the step and re-install it back and upload the backup.
    I noticed the problems still persist, when I enable wp debug mode, t then see the exact errors and the it’s source.
    I later find this guide and implented it and it works.

    Thanks.

  5. karma tsheten says

    AFter updating my .htaccess it gives me this error:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

  6. Jiří Vaněk says

    Regarding the .htaccess file, be cautious. Many shared web hosting providers may have directives for increasing the memory limit disabled. Such a directive in the .htaccess file can cause a 500 error on the website, requiring its removal or commenting out. Be careful with this. Sometimes, simply increasing the memory limit may not solve the problem but rather delay it, like a painkiller. The pain might subside, but it doesn’t mean the cause has been resolved. Therefore, while increasing the memory limit might seem like a solution, it’s also important to check what is consuming the memory. Sometimes, people increase the memory limit from 512 MB to 1024 MB without considering whether it’s necessary, and whether the memory limit isn’t masking an underlying issue on the website.

    • WPBeginner Support says

      Thank you for sharing your feedback on the htaccess change. Unless the host has very strict rules in place adding to the htaccess shouldn’t cause an error it is more likely to not work and would require you reach out to the host to request an override.

      Yönetici

  7. Aisha says

    It doesn’t solve my problem still shows an error after placing the code “define( ‘WP_MEMORY_LIMIT’, ‘256M’ );” and I also change the size of Memory_limit of Php.ini file

    • WPBeginner Support says

      As we state in the article, if our code does not work, there is a good chance your hosting provider is overriding the memory limit and you would need to reach out to your host to fix the error.

      Yönetici

  8. Sohaib Siddiq says

    It doesn’t solve my problem still shows an error after placing the code “define( ‘WP_MEMORY_LIMIT’, ‘256M’ );” & this is my front-end page showing

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 8192 bytes) in /home/X/wp-includes/class-wp-dependencies.php on line 260

    • WPBeginner Support says

      If the code does not work for you, we recommend reaching out to your hosting provider as they may have a limit set on their end that could be the root of the issue.

      Yönetici

  9. Ifedayo says

    Thank you, this was helpful! All problem has been solved by carefully following this step-by-step instructions. Keep up the good work :)

  10. Doy says

    Hi,

    Thank you for this awesome website. I got this in the error log after adding this code.
    [26-Apr-2022 02:45:31 UTC] PHP Warning: Use of undefined constant ‘WP_MEMORY_LIMIT’ – assumed ‘‘WP_MEMORY_LIMIT’’ (this will throw an Error in a future version of PHP) in /wp-config.php on line x

    Is this a problem? Should I remove the code?

    • WPBeginner Support says

      That would only be an error for future versions of PHP. This solution should only be a temporary fix and your hosting provider should be able to assist with the root cause of the issue.

      Yönetici

  11. Alison Taylor says

    Thank you! You folks rock. This solved my problem. WPBeginner is my go-to website for learning new things about WordPress, even though I’m not a beginner.

  12. J h says

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

    How again do you upload the file back to your server?

    • WPBeginner Support says

      You would need to use FTP or your host’s file manager again and there should be the option to upload and replace the file :)

      Yönetici

  13. Daniel says

    The changes are not having effects. We are still with 40MB and the site does not accept the changes. What should I do?

    • WPBeginner Support says

      As we state at the end of the article, if our recommendations do not work, please reach out to your hosting provider as they may have set a limit that would override what you as a user can set.

      Yönetici

  14. Liviu says

    Really worked.

    I had white screen when I wanted to create a new post on PC browser. But worked on my phone.

    Thanks

  15. John Harries says

    Thank you for providing a straight forward solution to an error which occurred when I tried to update the php version from 7.1 to 7.4

  16. Mart says

    Fantastic, thank you soooo much for this, simple straight talk.. excellent.. first problem solved … now got to learn more

    • WPBeginner Support says

      It can mean the site can take longer to notice issues if some arise but shouldn’t cause a major issue in general.

      Yönetici

  17. Mujahid Siyal says

    I added the code problem is gone but a text “WP_MEMORY_LIMIT” has appeared in the top corner of logo. So what should I do about that?

    • WPBeginner Support says

      You would want to ensure you added the code snippet correctly as it is likely showing that code thinking it is text.

      Yönetici

  18. David says

    “First you need to edit the wp-config.php file on your WordPress site. It 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.”

    Simple! What does that mean? It is gobbledegook to me.

  19. Katerina says

    I’m new in WordPress and I’m trying to figure out, for a couple of days, why suddenly I get an error 500 and can’t save my edits. This helped solve my problem. Thank you so much!

  20. Arpita Hunka says

    This solution is not working for me, my website is hosted at AWS server and I have all the access, I have tried to set memory_limit in php.ini, wp-config and .htaccess. but still getting issue when accessing backend pages.

    • WPBeginner Support says

      You would want to reach out to the support for your hosting for what other options you have available with AWS

      Yönetici

    • WPBeginner Support says

      If our recommendations are not working, you would want to reach out to your hosting provider and they should be able to assist

      Yönetici

  21. Ivan says

    Hi, I had the memory exhausted message and I increased the wp memory limit to 12mb and it worked. Then a few days later I had the same error, so I had to increase the wp memory limit to 256mb and the message kept showing. I am currently on 1024mb, which seems excessive for a small website of 4 pages and a blog post of 15,000 words. Any suggestions how to resolve the issue or what might be causing it?

    • WPBeginner Support says

      You would want to reach out to your hosting provider and they can normally assist in finding the root of the issue for your specific site.

      Yönetici

Bir Cevap Bırakın

Yorum bırakmayı seçtiğiniz için teşekkür ederiz. Lütfen tüm yorumların yorum poli̇ti̇kasi uyarınca denetlendiğini ve e-posta adresinizin yayımlanmayacağını unutmayın. Ad alanında anahtar kelime KULLANMAYIN. Kişisel ve anlamlı bir sohbet edelim.