How to Fix the WordPress Memory Exhausted Error – Increase PHP Memory

How to Fix the WordPress Memory Exhausted Error – Increase PHP Memory

This can be caused by:

  • Too many plugins or themes taking up too much memory.
  • High website traffic or lots of content.
  • Poorly coded plugins or themes that use more memory than they should.
  • Large images or media files being processed.
computer displaying PHP code
How to Fix It:

Here are some easy ways to increase the PHP memory limit and fix the error:

1. Increase PHP Memory Limit in wp-config.php

  • Go to your WordPress root folder (using FTP or your file manager).
  • Open the wp-config.php file.
  • Add this line just before “That’s all, stop editing! Happy blogging”:
    define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
    • You can change 256M to 128M, 512M, or depending on your hosting provider’s limits.

2. Increase Memory in .htaccess (for Apache users)

  • Access your WordPress root folder.
  • Find and open the .htaccess file (it might be hidden, so show hidden files if needed).
  • Add this line at the top:
    bash
    php_value memory_limit 256M

3. Increase Memory in php.ini

  • If your host allows access to php.ini, find or create this file in your WordPress root directory.
  • Add this line:
    bash
     
    memory_limit = 256M
  • Some hosts might not let you change this, so contact their support if needed.

4. Contact Your Hosting Provider

If none of the above works or if you’re on a shared host with strict limits, reach out to your hosting support team. They can help increase the memory limit for you.

5. Disable or Optimize Plugins and Themes

  • Turn off any plugins you’re not using. Too many active plugins can consume memory.
  • Make sure your plugins and themes are updated and well-coded. Old or inefficient plugins can cause problems.
  • Consider using a caching plugin like W3 Total Cache or WP Super Cache to lighten the load on your server.

6. Optimize Images and Media Files

  • Use tools like Smush, EWWW Image Optimizer, or ShortPixel to compress large images. This helps reduce memory usage during upload and processing.
  • Remove any unused media files from your library to save space.

Get your Package

Get In Touch

Feel free to contact us for any inquiries or support. Our team will respond to your message promptly.

Follow Us:

Start Your Project

Get In Touch

Feel free to contact us for any inquiries or support. Our team will respond to your message promptly.

E-Mail

sales@walstarmedia.com

Phone Number

+61417417857

Address:
Follow Us:

Start Your Project

Get In Touch

Feel free to contact us for any inquiries or support. Our team will respond to your message promptly.

Follow Us:

Start Your Project

slot siteleri jojobet jojobet giriş jojobet güncel giriş jojobet güncel justintv canlı maç izle maç izle jojobet jojobet giriş jojobet güncel giriş jojobet güncel betpark betpark giriş betpark 2026 betpark betpark giriş betpark 2026 jojobet jojobet giriş jojobet güncel giriş jojobet güncel tarafbet tarafbet giriş tarafbet güncel editörbet editörbet giriş dengebet dengebet giriş betgaranti betgaranti giriş betgaranti betgaranti giriş justintv canlı maç izle maç izle jojobet jojobet giriş jojobet güncel giriş jojobet güncel jojobet jojobet giriş jojobet güncel betgaranti betgaranti giriş betgaranti betgaranti giriş dizipal dizipal izle yabancı dizi izle jojobet jojobet giriş jojobet güncel giriş jojobet güncel jojobet jojobet giriş jojobet güncel jojobet jojobet giriş jojobet güncel giriş jojobet jojobet giriş jojobet güncel taraftarium24 taraftarium24 izle taraftarium24 canlı maç izle jojobet jojobet giriş jojobet güncel giriş jojobet güncel betpark betpark giriş betpark 2026 betpark betpark giriş betpark 2026 betpark betpark giriş betpark betpark giriş jojobet jojobet giriş jojobet güncel giriş jojobet güncel jojobet jojobet giriş jojobet güncel giriş onwin onwin giriş onwin onwin giriş jojobet jojobet giriş jojobet güncel giriş jojobet güncel tipobet tipobet giriş tipobet güncel tipobet tipobet giriş tipobet güncel tipobet tipobet giriş tipobet güncel tipobet tipobet giriş tipobet güncel sahabet giriş sahabet güncel giriş sahabet giriş sahabet güncel giriş betpark betpark giriş betpark betpark giriş jojobet jojobet giriş jojobet güncel giriş jojobet güncel vdcasino vdcasino giriş betpark betpark giriş betpark betpark giriş betpark betpark giriş ligobet ligobet twitter betebet betebet giriş fanatikbet fanatikbet giriş tipobet tipobet giriş fanatikbet fanatikbet giriş betixir betixir giriş betixir güncel starzbet starzbet giriş starzbet güncel starzbet güncel giriş starzbet adres starzbet güncel adres sahabet sahabet giriş sahabet güncel giriş onwin onwin giriş onwin güncel giriş tipobet tipobet giriş tipobet güncel giriş starzbet starzbet giriş starzbet starzbet giriş jojobet jojobet giriş jojobet güncel giriş jojobet güncel betpark betpark giriş betpark güncel betpark betpark giriş betpark güncel betpark betpark giriş betpark 2026 betpark betpark giriş betpark 2026 jojobet jojobet giriş jojobet güncel giriş jojobet güncel setrabet setrabet giriş setrabet güncel giriş ultrabet ultrabet giriş ultrabet güncel giriş taraftarium24 taraftarium24 izle taraftarium24 taraftarium24 canlı maç taraftarium24 izle slot siteleri güvenilir slot siteleri yatırımsız slot siteleri kazandıran slot siteleri jojobet jojobet giriş jojobet güncel giriş jojobet güncel selçuksport selçuksport izle canlı maç izle sahabet sahabet giriş jojobet jojobet giriş jojobet güncel giriş jojobet güncel betpark betpark giriş ligobet ligobet twitter betebet betebet giriş fanatikbet fanatikbet giriş tipobet tipobet giriş fanatikbet fanatikbet giriş betgaranti betgaranti giriş betgaranti betgaranti giriş