Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To reduce memory use across several WordPress sites, measure which requests peak, remove or replace the extensions causing the peaks, move heavy jobs out of visitor traffic, and only then raise WordPress limits within the PHP limit enforced by your host. WordPress cannot grant itself more memory than the server allows.

There is no reliable “RAM per site” rule. A small brochure site with a light theme can use less than one busy store, page builder, or import job. Capacity depends on concurrent PHP workers, database load, scheduled tasks, and caching, so size and tune from measurements rather than a universal number.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the WordPress memory limits actually control

WordPress has two constants that request PHP memory for different kinds of work. WP_MEMORY_LIMIT covers normal front-end requests, while WP_MAX_MEMORY_LIMIT covers administration and other backend operations. They are requests made by WordPress; the server’s PHP memory_limit remains the upper boundary.

Scope WordPress default What it covers Important qualification
Single-site front end 40 MB Public page and logged-out visitor requests Default documented by WordPress.org (2022); a host-level PHP limit can still be lower.
Multisite front end 64 MB Public requests in a network installation Default documented by WordPress.org (2022); it is not a per-site RAM allocation.
Backend 256 MB wp-admin screens and operations that use the maximum limit Current WordPress Hosting Handbook default; the server decides whether the request succeeds.

The Hosting Handbook also describes 128 MB as a minimum starting tier, 256 MB as a recommended default, and 512 MB or more for resource-intensive sites. Those are starting points, not guarantees. A limit is not memory reserved for every site: PHP allocates memory as code runs, and several workers can allocate it at the same time.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Why changing wp-config.php may do nothing

Adding or changing a line such as define( 'WP_MEMORY_LIMIT', '256M' ); can raise WordPress’s request only when PHP permits that amount. If memory_limit in the active PHP configuration is 128M, WordPress cannot turn it into 256M. Some managed and shared hosts also disable runtime changes in wp-config.php. In that case, ask the host to change the PHP setting or move to a plan that permits it.

Do not confuse the two constants. Raising the front-end limit does not automatically give an import or plugin-update process the backend limit. Conversely, raising the maximum backend limit does not reduce the memory consumed by public requests.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Measure the failing workload before changing limits

An “Allowed memory size exhausted” fatal error identifies the symptom, not the component that caused the peak. Record the exact site, URL or job, timestamp, PHP version, current PHP memory_limit, and whether the failure occurred on the front end, in wp-admin, during cron, or in an image or import task.

Check limits in WordPress

  1. Open Dashboard → Tools → Site Health → Info.
  2. Expand the Server section and record the PHP memory limit and PHP version shown there.
  3. Review WordPress Constants or the relevant WordPress information in the same report for the effective WordPress memory values.
  4. Compare those values with the fatal-error log supplied by your host. A log entry that names a script or hook is more useful than a generic browser error.

For several installations, make one inventory rather than treating the network as a single average. Mark which sites run page builders, commerce, multilingual plugins, visual editors, backup tools, security scanners, image optimizers, or large custom plugins. Also list themes and must-use plugins, because code loaded on every request can be a larger baseline than an occasional feature.

Separate request classes

  • Front end: Load an affected page while watching PHP error logs and worker memory. A page that fails only for logged-in users may load additional toolbar, personalization, or editor code.
  • wp-admin: Test the exact screen or action, such as a plugin update, bulk edit, media list, or page-builder save. Backend defaults are higher because these operations often assemble large datasets.
  • Cron and scheduled actions: Identify the hook and its schedule. A backup, feed import, search-index rebuild, or cleanup task can overlap with normal traffic.
  • Image and import jobs: Test the same file size and batch size that failed. Image decoding and transformation can create short-lived peaks that do not appear in ordinary page tests.

Where your host exposes per-request peak memory, record it for successful and failed runs. If it does not, use the PHP-FPM, Apache, or hosting dashboard metrics and correlate timestamps with the WordPress and PHP logs. The goal is to find the smallest reproducible workload before changing configuration.

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Reduce the baseline on every installation

Remove code that is not used

Deactivate and delete plugins that are no longer required, and remove unused themes after confirming a fallback theme is available. Deactivation may leave scheduled tasks, options, database tables, or cache entries behind, so use each plugin’s documented uninstall process when you are certain its data is not needed. A plugin that is inactive on one site may still be active on another; audit each site separately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Replace unusually heavy components

Compare the memory profile of a failing request with the same request after disabling one suspect component in a staging copy. Test one change at a time. Page builders, visual editors, security scanners, backup compressors, catalog imports, and image processors are common peak producers, but the actual result depends on their configuration and data volume. Do not infer that a plugin is inefficient merely because it has many features; use the failing request and logs to establish a connection.

Keep admin-only code off public requests

Custom plugins should load administrative classes, reports, and migration tools only when the request is in wp-admin, a WP-CLI process, or a specific scheduled action. Register front-end hooks separately from admin hooks instead of constructing every service on every request. This lowers the baseline available to each PHP worker without changing the memory limit.

Control data returned by queries

Large option arrays, unbounded post queries, and reports that load every row at once create avoidable peaks. Paginate administrative lists, request only the fields a task needs, and process imports in batches. If you maintain custom code, avoid retaining an entire result set when each row can be handled and released before the next batch.

Move heavy work away from visitor traffic

Visitors and maintenance jobs compete for the same PHP workers and database connections. Run migrations, image regeneration, bulk updates, and imports from the command line or a scheduled worker during a controlled window. WP-CLI can target a specific site in a multisite network and provides cache-related commands, which makes repeatable maintenance easier than clicking through every dashboard.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Use WP-CLI for multisite targeting

From the WordPress installation directory, list network sites before running a command:

wp site list --network --fields=blog_id,url

Target one site explicitly when a task supports it:

wp --url=https://example.test plugin update --all

Replace the URL with the site you intend to operate on, and test on staging first. For a large network, divide the work into small batches and pause between batches so PHP workers and the database can recover. Do not run several memory-intensive commands in parallel unless your host has enough worker and database headroom.

Schedule and batch imports

  1. Determine the largest file, image, or record count that reproduces the failure.
  2. Split it into smaller batches and record which batch size completes reliably.
  3. Run the task through WP-CLI or a queue during a low-traffic period.
  4. Keep a log of completed batches so a retry starts at the first unprocessed item instead of rebuilding everything.
  5. Watch PHP fatal errors, worker usage, database load, and disk space while the job runs.

Lowering batch size often solves a peak without increasing the permanent memory allowance. It also limits the amount of work that must be repeated after a timeout.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set WordPress limits only after confirming the host limit

Once the workload is known and unnecessary memory use has been removed, set values appropriate to the request class. Place constants in wp-config.php before the line that says WordPress should stop editing the file:

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

These example values are not a universal prescription. Use the lowest values that let the measured workload complete, leave room for simultaneous PHP workers and the database, and verify the effective value afterward. If the host’s PHP memory_limit is lower, the constants cannot override it.

When the host blocks runtime changes

  • Ask support to confirm the active PHP memory_limit for the domain or pool, not merely the value shown in a generic plan description.
  • Request a server-side increase if your measured workload justifies it.
  • If the plan cannot provide the required limit, move the heavy job to a permitted worker or choose hosting with adjustable PHP settings and adequate worker memory.

After every change, repeat the exact request that failed and inspect the logs. Increasing a limit is successful only when the job completes without pushing the host into worker exhaustion or swap pressure.

Use object caching for repeated database work

A persistent object cache keeps reusable WordPress query results between requests. Memcached or a compatible Redis service can reduce repeated database queries when the same options, terms, or other objects are requested by many requests. This can lower database work and sometimes shorten request duration, but it does not make PHP code itself consume less memory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Size and monitor the cache

  • Reserve cache memory separately from PHP worker and database memory. A larger cache allocation can starve those processes.
  • Watch hit rate, evictions, connection failures, and latency. Frequent evictions mean the configured cache is too small for the working set or is being filled with unsuitable data.
  • Confirm that each site uses an appropriate key prefix in a shared service so one installation cannot overwrite another site’s objects.
  • Keep a fallback plan: if the cache service is unavailable, WordPress should still be able to query the database rather than fail every request.

Object caching is most useful when profiling shows repeated database queries are a bottleneck. It will not fix a plugin that builds a massive in-memory array, an image operation that needs a large temporary buffer, or a PHP worker that remains active while a long import runs.

Flush deliberately

Flush a persistent object cache after a deployment only when stale objects are causing a confirmed problem. WP-CLI supports cache commands; for example:

Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
wp cache flush

On a multisite network, run the command with the intended site context and follow the cache service’s isolation rules. A flush can create a temporary database surge because many requests miss the cache at once, so avoid flushing during peak traffic.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Enable opcode caching without hiding the real problem

PHP opcode caching stores compiled PHP instructions so workers do not repeatedly compile the same files. Where the host supports it, opcode caching reduces CPU work and can improve consistency under repeated requests. It is another consumer of shared memory, however, and its configured pool must be monitored for exhaustion and restarts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Opcode caching does not reduce the memory required by a single request that constructs a large object graph. It also does not replace object caching: one avoids repeated compilation, while the other retains reusable application data. Enable both only when the host can size their pools alongside PHP-FPM workers, the database, and the operating system.

Separate installations or Multisite: the memory trade-off

Choosing separate WordPress installations versus one Multisite network changes isolation and operations, not the fundamental need to measure peaks. The official guidance documents different defaults for single-site and Multisite, but it does not publish a universal RAM-per-site benchmark.

Decision axis Separate installations WordPress Multisite
Failure isolation A fatal plugin or runaway job is more likely to be confined to one installation, subject to shared server limits. Sites share the network’s WordPress core and process environment; a bad plugin or exhausted pool can affect multiple sites.
Code and cache sharing Each installation has its own code and cache, which can duplicate memory and maintenance work. Core code and network-level components are shared, and a persistent cache can be managed for the network with correct key separation.
Per-site customization Independent PHP settings, plugins, themes, and upgrade timing are straightforward. Network rules and compatibility constraints can limit what individual sites activate or configure.
Operations More updates, backups, and monitoring targets. Centralized administration, but migrations, network-wide plugins, and site-specific exceptions require careful targeting.
Resource pooling PHP-FPM workers and database connections may be split by pool or host configuration. Workers and database resources are commonly shared, so one busy site can consume capacity needed by others.

Choose the arrangement that matches your isolation and governance requirements, then measure the resulting worker and database usage. Consolidation can improve code and cache efficiency, while separation can make a high-risk or unusually busy site easier to contain.

Plan capacity from concurrency, not a RAM-per-site slogan

Estimate capacity from observed peak memory per request, the number of PHP workers that can run concurrently, database overhead, cache allocations, web-server processes, and operating-system headroom. A site that needs little memory per request can still exhaust a server when many workers run at once. A site with an occasional large import may need a controlled worker or command-line environment rather than permanently raising every visitor request.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use staged increases

  1. Baseline each site during ordinary traffic and during its known heavy jobs.
  2. Remove unused code and reduce batch sizes where possible.
  3. Enable and size object and opcode caches if profiling shows they address the bottleneck.
  4. Raise the relevant WordPress constant modestly, never beyond the host’s PHP limit.
  5. Repeat the workload and compare peak memory, completion time, error logs, and concurrent worker usage.
  6. Stop increasing when the workload is reliable with operational headroom; an arbitrarily high limit can let one request consume resources needed by every site.

Troubleshoot an “allowed memory size exhausted” error

The error appears on one public page

  • Record the URL, user state, and timestamp.
  • Temporarily test the theme and recently changed plugins in staging, one at a time.
  • Inspect the PHP log for the script and allocation point.
  • Reduce the query or page payload, then retest before raising WP_MEMORY_LIMIT.

Only wp-admin or an import fails

  • Check the effective WP_MAX_MEMORY_LIMIT and host PHP limit.
  • Reduce pagination size, import batch size, image dimensions, or the number of records processed per run.
  • Run the operation with WP-CLI or a scheduled worker during low traffic.
  • Raise the backend limit incrementally only if the host has worker and database headroom.

Several sites fail together

  • Look for a shared PHP-FPM pool, database saturation, cache outage, or network-wide plugin.
  • Check whether a cron task or backup started at the failure time.
  • Throttle or reschedule the shared job, and verify cache evictions and service connectivity.
  • If all workers are exhausted despite reasonable per-request peaks, the host’s plan or pool size is the constraint, not a WordPress constant.

A practical maintenance checklist

  • Keep a per-site list of plugins, themes, scheduled jobs, and known heavy URLs.
  • Review PHP fatal logs and peak-memory metrics after updates and major content imports.
  • Run image regeneration, imports, and bulk updates in batches outside peak visitor periods.
  • Verify the host-level PHP memory_limit before editing WordPress constants.
  • Monitor persistent-cache hit rate, evictions, failures, and allocated memory.
  • Monitor opcode-cache capacity and restarts where available.
  • Leave headroom for simultaneous workers, database connections, cache services, and the operating system.
  • Document every limit change and the workload that justified it so a later administrator can roll it back safely.

For readers implementing custom themes, plugins, and deployment workflows, Professional WordPress: Design and Development, 3rd edition, is a technical reference that covers the underlying platform in greater depth.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.