This is how you can increase the WordPress memory limit.

Marc Wag­ner

March 10, 2022

2 min read|

To increase the Word­Press memo­ry limit on your web­site, you just need to modi­fy the wp-config.php con­fi­gu­ra­ti­on file. To do this, add the fol­lo­wing line of code:

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

The 256M then stands for 256 MB. Of cour­se, you can also enter ano­ther num­ber, such as 64M, 128M or 512M.

The maxi­mum amount of memo­ry you can set depends on your hos­ting pro­vi­der. For a web hos­ting, the available RAM is usual­ly bet­ween 64 and 512 MB. With a vSer­ver, Mana­ged Ser­ver or Dedi­ca­ted Ser­ver, the value is typi­cal­ly much hig­her or can be set indi­vi­du­al­ly.

This is how you can increase the memory additionally for the WP Dashboard (backend) on WordPress #

In addi­ti­on to the default set­ting, you can also increase the memo­ry only for the admin set­tings of your Word­Press web­site. For this pur­po­se, the­re is the fol­lo­wing code line, which you store in the wp-config.php:

define('WP_MAX_MEMORY_LIMIT', '256M')

Again, you can adjust the memo­ry as you wish, as long as your hos­ter sup­ports it. The set­ting only affects the backend of Word­Press.

How to find out how much memory is available for your WordPress website #

To find out how much memo­ry you have available, you can eit­her check your hos­ting con­tract or view the PHP info file.

To dis­play the PHP info file, crea­te a new PHP file in the root direc­to­ry of your Word­Press instal­la­ti­on, e.g. you can name it info.php. In the file, you add the fol­lo­wing con­tent:

<?php
phpinfo();
?>

Then save your file and access it from your brow­ser. If you have saved the file in the root direc­to­ry of your Word­Press instal­la­ti­on, the URL is: https://[your-domain]/info.php.

In the brow­ser, you can now see all PHP set­tings. That means also the “memory_limit”. The best is to use the search CTRL+F to search for the term. You will now see how much memo­ry you have available.

WordPress Memory Limit zuvor in der PHP-Info prüfen.
Memo­ry Limit in der PHP-Info. (-1 bedeu­tet unli­mi­tiert)

88e86fcb816eff22bc917094df2862d8dd5c0e978b333e6dd5f36f808990c261 96

Arti­kel von:

Marc Wag­ner

Hi Marc here. I’m the foun­der of Forge12 Inter­ac­ti­ve and have been pas­sio­na­te about buil­ding web­sites, online stores, appli­ca­ti­ons and SaaS solu­ti­ons for busi­nesses for over 20 years. Befo­re foun­ding the com­pa­ny, I alre­a­dy work­ed in publicly lis­ted com­pa­nies and acqui­red all kinds of know­ledge. Now I want to pass this know­ledge on to my cus­to­mers.

Hast du eine Fra­ge? Hin­ter­lass bit­te einen Kom­men­tar