Hey there! Shahzad Ahmad Mirza here. Today, I will show you how to increase the memory limit on WPEngine. If you’re a WordPress user, you know how frustrating it can be when your site runs out of memory. Let’s dive into this step-by-step guide to resolve that issue once and for all.
Why Increase Memory Limit?
First off, you might wonder, “Why would I need to increase my site’s memory limit?” Well, the answer is simple. Running out of memory can lead to performance issues, slow loading times, and even the dreaded white screen of death. By increasing the memory limit, you can ensure that your site runs smoothly and efficiently.
Understanding Memory Limits
WordPress sites come with a default memory limit, but as your site grows, so do its demands. Heavy plugins, large themes, and high traffic can all contribute to exceeding this limit. On WPEngine, the default memory limit is often set to 40MB, which might not be sufficient for larger sites.
Step-by-Step Guide to Increase Memory Limit
Step 1: Backup Your Site
Before making any changes, it’s crucial to backup your WordPress site. This way, you can restore your site if something goes wrong. WPEngine provides automated backups, but having an additional manual backup doesn’t hurt.
Step 2: Access Your Site’s Files
To increase the memory limit, you need to edit the wp-config.php File. You can access this file through your WPEngine User Portal or via an FTP client like FileZilla.
- Login to WPEngine User Portal
- Navigate to the ‘Sites’ tab.
- Select your site and click on ‘SFTP Users’.
- Create a new SFTP user if you haven’t already.
- Use the provided credentials to log in via an FTP client.
- Locate the wp-config.php File.
- Once connected, navigate to the root directory of your WordPress installation.
- Look for the
wp-config.phpFile.
Step 3: Edit the wp-config.php File
Now comes the fun part! Open the wp-config.php File in a text editor.
- Add the Memory Limit Code
- Scroll down to find the line that says
/* That's all, stop editing! Happy blogging. */. - Just before this line, add the following code:
define('WP_MEMORY_LIMIT', '256M');
- Scroll down to find the line that says
- Save the Changes
- Save the file and re-upload it to your server via the FTP client.
Step 4: Verify the Changes
After editing the file, you need to ensure the changes have taken effect.
- Check WordPress Dashboard
- Log in to your WordPress dashboard.
- Navigate to ‘Tools’ > ‘Site Health’.
- Under the ‘Info’ tab, click on ‘Server’ to check the ‘PHP memory limit’.
You should see the new memory limit reflected there.
Common Issues and Solutions
Even with the best instructions, things can sometimes go wrong. Here are a few common issues and their solutions:
- White Screen of Death
- If you encounter a white screen, your changes might have caused an error. Double-check the
wp-config.phpfile for any syntax errors.
- If you encounter a white screen, your changes might have caused an error. Double-check the
- Changes Not Reflecting
- If the new memory limit isn’t showing, increase the value incrementally. Sometimes, hosting environments have hard limits that cannot be exceeded.
Optimizing Memory Usage
Increasing the memory limit is a good short-term solution, but optimizing your site’s memory usage is even better. Here are some tips:
- Deactivate Unnecessary Plugins: Only keep the plugins you need. Deactivate and delete any that are not in use.
- Optimize Images: Large images can consume a lot of memory. Use plugins like Smush to compress and optimize your images.
- Enable Caching: Use caching plugins like W3 Total Cache or WP Super Cache to reduce the load on your server.
Conclusion
Increasing the memory limit on WPEngine is straightforward, but it’s essential to proceed with caution. By following the steps outlined above, you can ensure that your WordPress site runs smoothly and efficiently. Remember to always backup your site before making any changes and keep an eye on its performance to identify any potential issues early.
I hope this guide helps you confidently tackle your memory limit issues. For more tips and tricks, follow my blog.




