NOTE: I recommend bookmarking this post. Each time you upgrade to a new WordPress version, you’ll need to change the WordPress Built-in Memory file to avoid this error.
It’s simple… if you have the steps.
Several months ago, I experienced an error I’d never seen before within my WordPress Dashboard. Not all content was displaying I noticed. Rather than the information that typically displays, I noticed the following error message;
“Fatal error: Allowed memory size of xxx bytes exhausted.”
I published steps to fix that frustrating WordPress Error message, but wanted to improve upon the steps a bit. Hopefully the steps below will make the process even easier for you.
After troubleshooting a bit and contacting my hosting company’s technical support, I found a fix. The error is very fixable and I thought I’d help save you some time.
Please Note – the steps below apply to the WordPress platform with Bluehost as the hosting site. The steps should be very similar for the hosting site you use.
Steps to Fix Memory Errors
Modifying the “php.ini” file in the “public_html” folder will fix the memory problem. First, you’ll need to log into your Bluehost (or other hosting company) account and set your PHP Config to the PHP 5 (Single php.ini) setting.
1. Log into the Cpanel,
2. Go to the “software / services” section
3. Click on the “PHP config” icon
4. Select the “PHP 5 (Single php.ini) setting and then click save.
5. Access your “file manager” within your Cpanel
6. Within your file manager, select “public_html/www” and click “go”
7. Scroll down the public_html directory until you find “php.ini”
8. Click on the file and choose “edit” in your options settings to modify the php.ini file for your upload sizes to increase. Once you change the settings below, be sure to “save changes”Settings to Modify within Php.ini:
max_execution_time = 30 ; Maximum execution time of each script, in seconds (set this to something high like 3000)
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data (set this to something high like 6000)
memory_limit = 32M ; Maximum amount of memory a script may consume (set this to something like 500M)
; Maximum size of POST data that PHP will accept.
post_max_size = 2M (set this to the largest file size you want uploaded. I changed mine to 4M)
; Whether to allow HTTP file uploads.
file_uploads = On (make sure this is set to “On”)
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M (set this to the largest file size you want uploaded. I changed mine to 4M
How to Change WordPress’ Built in Memory
After modifying your php.ini settings, you will also need to change the WordPress Built in Memory. Follow the steps below.
- Within you CPanel, access your File Manager
- Within your file manager, click on “wp-settings.php.”
- Choose “Edit” and after seeing the message, click OK
- Scroll down until you see the WP_MEMORY_LIMIT section. It should look something like this.
if ( !defined(‘WP_MEMORY_LIMIT’) )
define(‘WP_MEMORY_LIMIT’, ’32M’);The default is set to 32M. I recommend changing this to 64M.
Please Note – Each time you upgrade to a new WordPress version, it will default back to 32M, so you’ll want to keep these steps handy.
That’s it! These are the steps I took to resolve my memory issues. I no longer have any of the previous errors I received before and things are running smoothly. I have to credit BlueHost technical support as they walked me through the database error and provided the steps above.




