How to increase WordPress memory
The first thing to do is open the wp-config.php file (maybe make a backup if you don’t feel safe).
It’s a .php file so you can open it with any text editor:
- Block notes
- Kompozer
- Dreamweaver
- PhpStorm
- etc.
To this file we add in an empty point any, maybe at the end of the file this line of code:
define(
'WP_MEMORY_LIMIT'
,
'64M'
);
What you need to know:
By default, WordPress will attempt to increase the memory allocated to PHP to 40MB (the code is at the beginning of /wp-includes/default-constants.php) for single installation and 64MB for WordPress Multisite, then setting in the wp-config.php should reflect something over 40 MB or 64 MB depending on your system configuration.
So as you can understand if you have a performing server or a VPS you can bring the memory of your WordPress also to 128 MegaBytes or 256 MegaBytes to avoid finding this error.