Updated: 28 September 2026 · Applies to: WordPress 7.1
WordPress has its own memory setting in addition to PHP's memory_limit. Set it in wp-config.php (never in WordPress core files such as wp-settings.php, which updates overwrite).
Steps
- Open
wp-config.phpin the WordPress folder with cPanel's File Manager or FTP. - Above the line
/* That's all, stop editing! */, add:define( 'WP_MEMORY_LIMIT', '256M' );
- Save the file.
WordPress cannot use more than PHP allows, so also raise PHP's memory_limit if needed (see "How to fix the problem with PHP WordPress memory?"). Check the result under Tools › Site Health › Info.