InMotion Hosting Support Center

Navigation:

WordPress can encounter a blank page sometimes, and the most common issue is a PHP Fatal error regarding the Allowed memory size of xxxxxxx bytes exhausted and in this guide I'll show you how to easily fix this problem.

Find PHP error behind blank WordPress page

If WordPress is displaying a blank page this typically means that you've encountered a PHP error and your account isn't setup to display errors. You can use the steps below to ensure you're seeing the error that's causing your blank page.

If you'd like more in-depth information you can also review our guide on displaying and logging errors in PHP.

  1. wordpress dashboard blank

    Navigate to the WordPress page that is coming up blank, in this case it is our WordPress dashboard at /wp-admin causing issues.

  2. You'll want to modify your php.ini file and also ensure that you make your php.ini file recursive.

    Your php.ini file should be located in your /public_html directory, if it is not you can create one.

    To make your php.ini settings recursive and take place across your entire account you'll want to modify or create a .htaccess file in your /public_html directory with the following code:

    SuPHP_ConfigPath /home/userna5/public_html

    In this case userna5 is our cPanel username and with the SuPHP_ConfigPath command we are telling the server where to load the php.ini file for our account.

  3. Now you'll want to edit your php.ini file with the following settings:

    display_errors = On
    wordpress dashboard showing memory error

    Save the php.ini file and then refresh your blank WordPress page again, and this time you should see an error.

    Fatal error: Allowed memory size of 1048576 bytes exhausted (tried to allocate 122880 bytes) in /home/example/public_html/wordpress/wp-admin/includes/dashboard.php on line 546

Fix WordPress Fatal error: Allowed memory size exhausted

Once you've determined the actual PHP error that you're getting, the most common one you'll run across is exhausting the memory allowed for a PHP script to run.

The steps below will walk you through making sure you have a large enough memory_limit for PHP set in your php.ini file, and how to use the WP_MEMORY_LIMIT variable in your wp-config.php file if that isn't working.

  1. Take note of the error you're getting, and how much memory is trying to be allowed:

    Fatal error: Allowed memory size of 1048576 bytes exhausted (tried to allocate 122880 bytes) in /home/example/public_html/wordpress/wp-admin/includes/dashboard.php on line 546
    Allowed memory size Tried to allocate Filename causing memory problems
    1048576 bytes 122880 bytes /home/example/public_html/wordpress/wp-admin/includes/dashboard.php
    1 MB 120 KB

    Here we can see PHP is allowed to use up to 1 MB of memory, and it's exhausting this limit by the time it gets to our dashboard.php script on line 546 which is trying to allocate an additional 120 KB

  2. Now you'll want to take a look at your php.ini file and raise your memory_limit setting:

    ;;;;;;;;;;;;;;;;;;;
    ; Resource Limits ;
    ;;;;;;;;;;;;;;;;;;;
    
    max_execution_time = 30
    max_input_time = 60
    memory_limit = 1M
    

    You see that I've only got it set to 1 M which is causing our PHP error, and I can simply raise it some:

    memory_limit = 32M
  3. wordpress dashboard fixed

    Now you'll want to verify your php.ini settings are recursive and then try to access your WordPress website again. You should get your admin normal dashboard disaplying now.

  4. If you're still getting a memory exhausted error verify your php.ini setting is being read by setting up a phpinfo() page that can simply be named info.php inside your WordPress directory and look like:

    <?php
    phpinfo();
    ?>
    phpinfo page showing memory limit

    Access the info.php script you created in your web-browser, then hit Ctrl-F and do a search and look for memory_limit and make sure it matches what you set for this varible.

  5. If this still isn't working for you, as a last resort you can add define('WP_MEMORY_LIMIT', '32M'); towards the top of your wp-config.php file:

     * @package WordPress
    */
    define('WP_MEMORY_LIMIT', '32M');
    
    // ** MySQL settings - You can get this info from your web host ** //

    This is also covered in the offical WordPress documentation for increasing memory allocated to PHP.

You should hopefully now not be encountering any further WordPress memory related errors. If these steps didn't help resolve your particular issue, please leave a comment so that we can keep adding different errors to it to help others.

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Social Media Login

   
Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-04-09 1:22 am

It is a very useful article. It helped me find out how to fix the error.

Just in addition to what the article says: there is a php.ini file in the public_html which has a lot of words that apparently don't make sense. But, there is a 'section' that says "Resource Limits". If you change this from xxM (16M for example) to 256M you will fix the issue and havo no more problems:

Maximum amount of time each script may spend parsing request data memory_limit = 256M      ; Maximum amount of memory a script may consume (256MB)

Have a great day! Blessing to you all!

Regards,

Jonathan (www.parlox.net)

Staff
9,968 Points
2014-04-09 2:10 am
Hello Jonathan, and thank you for your comment.

Yes as mentioned in step #2 in this guide, the php.ini file is where you'll want to modify your memory_limit setting at, to be higher than how much memory WordPress is trying to consume.

- Jacob
n/a Points
2014-04-27 2:55 pm

Thanks... It worked for me well. 

n/a Points
2014-09-07 5:00 pm
It helped me a lot, many thanks!
n/a Points
2014-10-14 3:34 am

Thanks for the great info guys. Was getting blank dashboard but no error or notice was being reported in the log. tried ur solution and boom, it worked.

n/a Points
2015-02-08 8:41 pm

My problem is that I do not have access to the php.ini file. What do I do then?

Staff
30,025 Points
2015-02-09 10:48 am
Hello Chris,

Thank you for your question. If you do not see a file named php.ini in your public_html, please contact our Support Department and request that we create one for you.

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2016-08-31 5:22 am

Hello, Thanks for sharing this guide. I have done everything as mentioned above but still facing problems.

Any recommendations?

Thanks,

M Imran

Staff
39,957 Points
2016-08-31 8:01 am
Hello Muhammad Imran Nazish,

We would need more information in order to properly assess the error(s). However, you should also go through the steps of evaluating your plugins or themes to make sure that they are not the cause of the issue. Remove your plugins one-by-one to see if you can isolate the issue. Do the same thing with your themes, try reverting to a default theme to see if it makes any difference. You should also turn on WordPress debuggin if you have not already done so. This will allow you to get better detail on possible errors occurring within WordPress.

If you have any further questions or comments, please let us know.

Regards,
Arnel C.
n/a Points
2017-06-07 12:14 pm

I keep getting this error. I am hosting with Go Daddy using cpanel. I need help to fix this.

 

 

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 196608 bytes) in /home/hannah4545/public_html/wp-content/plugins/google-analytics-dashboard-for-wp/admin/settings.php on line 957

Staff
39,957 Points
2017-06-07 1:59 pm
Hello Stephen,

Did you try to use the information provided in the article above? If you made the suggested changes and you're still getting the problem, then you should contact your host's technical support for help with the issue. It may require a change within the server that you do not have access to.

If you have any further questions, please let us know.

Kindest regards,
Arnel C.
n/a Points
2017-07-28 4:03 am

We purchased a plugin and the vendor needed to make some changes to it to get it to work on our blog. Now, it appears as though he has broken some other things. We were going back and forth for a while in emails and he tried to make corrections, but, it is clear that our posts are not displaying properly and the vendor has now become unresponsive to our emails. What method would you suggest to move forward with our website? SHould we forget about the plugin and make a complaint to the credit card company we used to prchase it or is there a WordPress customer service department that maintains things like this that could get the vendor to either fix the problem or say that he can’t and give us our money back? <a href="/support/https://www.thewarofdestiny.com/">the war of destiny</a>

Staff
13,707 Points
2017-07-28 7:33 am
There is no governing body for WordPress development. I'd suggest you hire a developer to correct the issues with your website. Typically, it's not the plugin developers responsibility to make sure the plugin functions with your website. That falls on the website owner. Also, whether he should refund you your money comes down to the terms of service you entered in when purchasing the plugin . I typically, message the plugin developer up front and ask to "Test" the plugin in my website prior to purchasing. If it doesn't work, I move on, no harm no foul. If it works I gladly pay for the plugin. Sometimes, the plugin developers often attempt to get it to work if it doesn't. This is usually them going above and beyond of what's expected of them. It's really up to you how you approach it. I'd think about if there's another plugin that does the same thing. Can you try that one? How important is the functionality of the plugin? Would it be cheaper to hire a developer to fix the issue so you can keep the plugin you already paid for?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

15 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!