Need help? Chat now!
Search results for:
Table of Contents
Out-of-memory errors in WordPress are one of the most common errors that can occur with sites running on WordPress. WordPress themes and plugins are notorious for hogging up site resources and bogging down your site, especially if you have many of them. Un-optimized code can also be too demanding and easily start to eat up what memory you have available.
You may be able to increase the memory available for your site by simply adding a single line of code to your wp-config.php file. To do this, follow these steps:
Step One: Go to the File Manager in your cPanel Interface.
Step Two: Find the wp-config.php file located with your WordPress installation and choose edit.
Step Three: Add the following line at the end just before the "Happy Blogging" line:
If this line already exists, increase the number to a higher value than what it was previously.
If on a Shared or Business hosting plan, this value will have a cap. The Shared hosting maximum PHP memory limit can be found here, and the Business hosting maximum PHP memory limit can be found here. If on a VPS, there would be no Hostwinds set limit.
This may or may not help, depending on what memory is available according to your php.ini file and the memory allowed per the hosting plan. It has the final say and can overwrite the above change. However, if your wp-config.php file didn't have that line or had a lower amount than what the php.ini has, this will have a good probability of fixing it.
If it doesn't fix it, then you can change the amount of memory allocated to the site in the php.ini file if you're on a Cloud or dedicated server (below). If you're on one of our shared hosting plans, you don't have access to the php.ini file. Try the other fixes below, and if nothing works, it may be time to upgrade your hosting plan.
Step One: Download or create the php.ini file in Notepad or your preferred text editor
Step Two: Add this line:
Step Three: Upload it to the root directory of your site.
Step Four: Check to see if the problem is fixed
If this doesn't correct the problem, you can increase the memory limit referenced above by replacing the memory limit in the above example with a value of your choosing.
Cleaning up your WordPress installation
This should be done now and then regardless of whether you're getting errors or not. Doing these can improve the overall performance of your WordPress installation and reduce resource consumption.
If you should have any questions or would like assistance, please contact us through Live Chat or by submitting a ticket with our Technical Support team.
Written by Michael Brower / December 12, 2016