# Magento reports the wrong memory limit
Source: https://docs.webgee.com/en/development/magento-showing-incorrect-memory-limit



Magento's readiness check reports a lower `memory_limit` than you have set, and
raising it makes no difference. Applies to shared, reseller and Premium hosting.

The error looks like this:

> Your current PHP memory limit is 512M. Magento 2 requires it to be set to 756M
> or more.

Meanwhile `phpinfo()` shows the value you set — say `memory_limit 1024M`.

## Why it happens [#why-it-happens]

Both readings are correct. They are reading **different PHP configurations**.

PHP on your account has two separate configurations: one for pages served over
the web, and one for the &#x2A;*command line (CLI)**. Magento's readiness check runs
through the CLI, so it reads the CLI limit — not the web limit you raised in
`.user.ini` or the PHP Selector.

## Fix it [#fix-it]

Set the version and limits for the CLI as well:

1. In cPanel, open **Select PHP Version**.
2. Make sure the **CLI** version matches the version your site runs on.
3. Open **Options** and set `memory_limit` to `756M` or higher.

Then clear Magento's cache, since it caches the readiness result:

```bash
php /home/cpaneluser/public_html/bin/magento cache:flush
```

Run the readiness check again.

## Confirm which limit you are reading [#confirm-which-limit-you-are-reading]

To see the CLI value directly:

```bash
php -i | grep memory_limit
```

Compare it with what `phpinfo()` reports in a browser. If they differ, the CLI
is the one Magento is reading.

## Related [#related]

* [Change your PHP version and settings](/en/development/change-php-version)
* [Understanding PHP memory limits](/en/development/understanding-php-memory-limits-in-shared-hosting-environments)
* [Can I run Magento on shared hosting?](/en/hosting/can-i-run-magento-on-shared-reseller-hosting)
