Error: “Scan stopped due to memory limit”

This message appears when your server’s PHP memory limit has been reached during the scan. It can occur at any point in the scan, depending on how much data your website has.

When this happens, the plugin detects that your server ran out of memory and temporarily pauses the process. It notifies you of the issue and lets you decide how to proceed.

You can either increase your PHP memory limit and click the Retry button to continue, or lower the scan intensity in your plugin settings, stop the current scan, and start a new one using the updated settings.

Option 1 — Increase your PHP memory limit

The memory_limit    setting controls how much memory your server allows PHP (and plugins like ours) to use at once.

If it’s too low, large operations can run out of memory — just like a computer trying to open too many large files at the same time.

Here are a few easy ways to increase it:

  • From WordPress (recommended for most users):

    You can raise the memory limit directly inside your WordPress installation.

    Edit the wp-config.php    file located in your site’s root folder (you can access it via FTP or your hosting File Manager).

    Find the line that says “That’s all, stop editing! Happy blogging.” and paste the following code just before it:

define( 'WP_MEMORY_LIMIT', '256M' );
  • Save the file, then return to your WordPress dashboard. This often solves memory-related issues immediately.
  • From your hosting control panel or php.ini file:

    If you have access to your hosting’s PHP configuration (like cPanel or Plesk), look for the option to modify memory_limit   .

    You can also edit it manually by opening your php.ini    file and setting a higher value, for example:

memory_limit = 128M
  • A value starting from 64M is usually sufficient, but you can increase it to 128M or 256M if your site has a large database or many plugins.
  • Ask your hosting provider:

    If you’re not comfortable editing files, simply contact your hosting support and ask them to increase your PHP memory limit to at least 128M. Most hosts will handle this quickly for you.

After saving your changes, go back to the plugin and click Retry to continue the scan.

Option 2 — Decrease the scan settings values

If increasing your server memory isn’t possible, you can make the scan lighter by reducing how much data it processes at once.

Go to Settings → Scan settings, as shown below:

Here’s what each setting controls:

  • File line batches – Defines how many lines are processed per batch when reading files. Lower this number to reduce memory usage.
  • File content chunks (in KB) – Determines how many kilobytes are read from a file per step. Decreasing it prevents memory spikes when scanning large files.
  • Database rows batches – Specifies how many database rows are processed at once. Smaller values make scans lighter and safer on limited servers.

Decreasing these settings helps avoid memory errors, while increasing them can speed up the scan by processing larger batches at once.

You should find a balance between performance and memory usage that fits your server capacity.

After saving your new settings, stop the current scan and start a new one.

The new scan will use your updated settings and should run smoothly without hitting memory limits.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.