One of the contributing factors to the database error I had yesterday was an error that stated “Fatal error: Allowed memory size of xxx bytes exhausted.” This error is very fixable and I wanted to provide the steps to fix it. Note – the steps below apply to WordPress platform with Bluehost as the hosting site, but the steps should be similar if you use a different hosting site.
How 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.
- Log into the Cpanel,
- Go to the “software / services” section
- Click on the “PHP config” icon
- Select the “PHP 5 (Single php.ini) setting and then click save.
- Access your “file manager” within your Cpanel
- Within your file manager, select “public_html/www” and click “go”
- Scroll down the public_html directory until you find “php.ini”
- 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 should also change the WordPress Built in Memory. Within your “public_html” directory, scroll down to find “wp-settings.php.” The memory limit is set to 32M by default. I changed mine to 64M.
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 the BlueHost technical support as they walked me through the database error and provided the steps above.




