How to Fix WordPress Memory Limit Errors

If you're seeing an error like Allowed memory size exhausted or your site is crashing unexpectedly, WordPress may be running out of PHP memory. Here's how to diagnose and fix memory limit errors on your dotCanada hosting account.

What Causes Memory Limit Errors?

WordPress itself requires memory to run, and each plugin or theme you add requires more. Complex operations like image processing, running WooCommerce, or importing large amounts of data can push memory usage past the current limit.

Step 1: Increase Memory in wp-config.php

Open your wp-config.php file via FTP and add the following line before /* That's all, stop editing! */:

  • define('WP_MEMORY_LIMIT', '256M');

This tells WordPress to request up to 256MB of memory from PHP. Note that WordPress can't exceed the server's PHP memory limit - it can only request up to it.

Step 2: Increase the PHP Memory Limit

If the WordPress memory limit is already set but you're still hitting errors, the server's PHP memory limit may be too low. You can try adjusting it through MultiPHP INI Editor in cPanel by setting memory_limit to 256M or higher.

Step 3: Ask dotCanada to Increase Your Limit

If you need a higher memory allocation than your current plan allows, contact our support team. We're happy to review your account and adjust your PHP memory limit where possible.

Step 4: Optimize Plugin and Theme Usage

Deactivate plugins you don't actively use, and consider replacing heavy plugins with lighter alternatives to reduce overall memory consumption.

100% Satisfaction Guarantee

We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.

Ready to Get Started?

Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.

Get Started Today