Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Speed & performance · Guide

How to Check WordPress Memory Limit (Step by Step)

How to Check WordPress Memory Limit (Step by Step)

Short answer

Go to Tools > Site Health > Info in your dashboard. The Server section shows the PHP memory limit, and the WordPress Constants section shows WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT. You can also check WooCommerce > Status, your hosting panel's PHP settings, a temporary phpinfo file or WP-CLI.

Key takeaways

  • Tools > Site Health > Info shows the memory limit without any plugin.
  • The PHP memory_limit is the server ceiling; WordPress constants work inside it.
  • WP_MEMORY_LIMIT defaults to 40M on single sites and WP_MAX_MEMORY_LIMIT to 256M for admin.
  • phpinfo shows server values before WordPress loads, so delete the file after use.
  • Raise the limit in wp-config.php or your hosting panel if it is too low.

How do you check the WordPress memory limit?

Go to Tools > Site Health > Info, open the Server section to see the PHP memory limit, then open WordPress Constants to see WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT.

That is the fastest method and needs no plugin. Site Health has been part of WordPress core since version 5.2, so almost every site has it.

There are two numbers to understand. The PHP memory limit is the ceiling set by your server. The WordPress constants are what WordPress asks PHP to use, within that ceiling.

If you are checking because of an error, our guide on fixing the allowed memory size exhausted error covers what to do next.

The PHP manual describes the memory_limit directive in full, including how values such as 256M are written.

The WordPress hosting team's server environment notes list the PHP settings hosts are expected to provide.

What is the WordPress memory limit?

The WordPress memory limit is the maximum amount of server memory a single PHP request can use while WordPress builds a page, runs a plugin or processes an admin task.

PHP sets this through its memory_limit directive. The PHP manual entry for memory_limit describes it as the maximum memory a script may allocate.

WordPress adds two constants on top. WP_MEMORY_LIMIT applies to the front end and defaults to 40M on single sites and 64M on multisite. WP_MAX_MEMORY_LIMIT applies to admin screens and defaults to 256M.

WordPress only raises the PHP limit if it is lower than these values, and only if the host allows it. It never lowers a higher server limit. The wp-config.php documentation explains both constants.

How do you check the memory limit with Site Health?

Open Tools > Site Health, click the Info tab, expand Server for the PHP memory limit, and expand WordPress Constants for WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT.

  1. Log in as an administrator
  2. Go to Tools > Site Health
  3. Click the Info tab
  4. Expand Server and find PHP memory limit
  5. Expand WordPress Constants and find WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT
  6. Click Copy site info to clipboard if you need to share the details with support

The Server section may show more than one memory line, such as a value that applies only to admin screens. That reflects WordPress raising the limit for the dashboard.

Our guide on using Site Health in WordPress explains the other sections of this screen.

How do you check the memory limit in WooCommerce?

If you run WooCommerce, go to WooCommerce > Status, and the WordPress environment section lists the WordPress memory limit alongside other server details.

WooCommerce flags low values in red, because stores need more memory than simple blogs. Product imports, reports and checkout extensions all use memory.

The status report is also what WooCommerce support asks for. Our guide on the WooCommerce status report explains each field.

For resource planning, see what hosting resources WooCommerce needs.

How do you check the memory limit in your hosting panel?

Most hosting panels show the PHP memory_limit in their PHP settings screen, such as cPanel's MultiPHP INI Editor or Select PHP Version, or a custom panel's PHP configuration page.

This tells you the server value before WordPress changes anything. It is also where you raise it on many shared hosts.

  • cPanel: look in MultiPHP INI Editor or Select PHP Version > Options
  • Plesk: open PHP Settings for the domain
  • Custom panels: look for PHP settings, PHP configuration or PHP options

cPanel's own documentation for the MultiPHP INI Editor shows where memory_limit sits and how to edit it in basic mode.

Hosting plans also have an account-level RAM limit, which is different from the per-request PHP limit. Our guide on reading a hosting plan's CPU and RAM limits explains the difference.

How do you check the memory limit with phpinfo?

Create a temporary PHP file that calls phpinfo(), open it in your browser, search for memory_limit, then delete the file straight away because it exposes server details.

  1. Create a file named something hard to guess, such as info-check-83.php
  2. Add this single line and upload it to your site root:
<?php phpinfo();
  1. Visit the file in your browser
  2. Search the page for memory_limit
  3. Delete the file as soon as you are done

The Local Value column shows the value for your site, and Master Value shows the server default. The phpinfo() reference lists everything this function shows.

Note that phpinfo shows the PHP value before WordPress loads. It does not reflect any change made by WP_MEMORY_LIMIT.

How do you check the memory limit with WP-CLI or code?

With WP-CLI, run wp eval with ini_get('memory_limit') to see the limit inside WordPress, or echo the WP_MEMORY_LIMIT constant to see what WordPress requested.

wp eval "echo ini_get('memory_limit');"
wp eval "echo WP_MEMORY_LIMIT;"

WP-CLI runs PHP from the command line, which can use a different php.ini than the web server. If the numbers differ from Site Health, trust Site Health for website requests.

The WP-CLI eval command documentation shows other options. Developers can also log memory_get_peak_usage() to see how much a request actually used.

Which method should you use?

Use Site Health for a quick answer, WooCommerce Status for stores, your hosting panel to see the server ceiling, and phpinfo or WP-CLI when you need to debug conflicting values.

MethodShowsNeedsBest for
Site Health > InfoPHP limit and WordPress constantsAdmin loginEveryone
WooCommerce > StatusWordPress memory limitWooCommerceStore owners
Hosting panelServer PHP memory_limitPanel loginSeeing or raising the ceiling
phpinfo()Local and master PHP valuesFile accessDebugging server config
WP-CLIRuntime and constant valuesSSH accessDevelopers

Memory plugins from the plugin directory can also show usage in the dashboard. They add little that Site Health does not, so remove them once you have your answer.

What memory limit does WordPress need?

WordPress core runs on modest memory, but most real sites with a page builder, WooCommerce or many plugins are more comfortable with 256M, and some hosts set 512M or higher.

The WordPress hosting requirements focus on PHP and database versions rather than an exact memory figure. Plugin vendors often list their own recommendations, so check them.

A higher limit is a ceiling, not a reservation. Raising it does not make every page use more memory. It only stops heavy requests from failing.

Our guide on WordPress hosting requirements covers the rest of the server checklist.

How do you see how much memory your site actually uses?

Install a developer plugin such as Query Monitor, load the page you want to measure, and check the peak memory usage it reports in the admin toolbar.

Knowing the limit is only half the picture. The other half is how close your pages get to it.

Query Monitor is a free debugging plugin that shows peak memory, database queries and PHP errors for every page you view while logged in. It shows the figure as a percentage of the limit too.

Check a few different pages, because memory use varies:

  • The homepage and a typical blog post
  • A heavy page built with a page builder
  • Admin screens such as the editor, the plugins list and WooCommerce orders
  • Imports, exports and backup runs, which often use the most

If a page uses most of the available memory, one plugin is often the cause. Deactivate plugins one at a time on a staging site and measure again to find it.

When you have your answer, deactivate Query Monitor on production sites. It is safe to keep installed, but there is no need to run debugging tools all the time.

Our guide on profiling WordPress performance with Xdebug goes deeper if you need function-level detail.

What should you do if the memory limit is too low?

Raise WP_MEMORY_LIMIT in wp-config.php, ask your host to raise the PHP memory_limit if WordPress cannot go higher, and look for plugins that use far more memory than they should.

  1. Add a line such as define( 'WP_MEMORY_LIMIT', '256M' ); above the line that says to stop editing in wp-config.php
  2. Recheck Site Health to see if the value changed
  3. If it did not, raise memory_limit in your hosting panel or ask support
  4. If errors continue, find the plugin or theme causing them with a staging site

Full steps are in our guide on increasing the PHP memory limit in WordPress.

If you cannot find the configuration file, see where to find wp-config.php.

Frequently asked questions

What is the default WordPress memory limit?

WordPress sets WP_MEMORY_LIMIT to 40M on single sites and 64M on multisite, and WP_MAX_MEMORY_LIMIT to 256M for admin screens. If your server's PHP limit is already higher, WordPress keeps the higher server value.

Why does Site Health show a different number than wp-config.php?

Your host's PHP limit may be capped below what you set, or the host's value may already be higher than your constant. WordPress can only raise memory up to what the server allows.

Is 128M enough for WordPress?

It is often enough for a simple blog with few plugins. Sites using page builders, WooCommerce or large imports usually run more smoothly with 256M, and some plugin vendors recommend that as a minimum.

Can I check the memory limit without logging in?

Yes, if you have file or hosting access. Check the PHP settings in your hosting panel, or upload a temporary phpinfo file and search for memory_limit. Delete that file immediately afterwards.

Does a higher memory limit make WordPress faster?

Not directly. The limit is a ceiling that prevents heavy requests from failing. It does not speed up normal pages, which only use the memory they need.

Sources

  1. Editing wp-config.php WordPress Developer Resources
  2. memory_limit (Core php.ini directives) PHP Manual
  3. phpinfo() PHP Manual
  4. wp eval WP-CLI Command Reference
  5. Requirements WordPress.org

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.