Fatal Error When I Try To Edit Home Page

Hi, I keep getting a fatal error message (see attached) when I try to edit the home page on the frontend with my Divi theme editor. If I attempt to ‘edit page’ in the backend I get a white screen. I can view the home page which loads fine I just can’t edit it.

All the other pages seem to work fine. It’s only the home page.

Please let me know if anyone has an idea how to fix this. I would like to fix or remove whatever is creating a problem once I gain access.

Thank you!

I installed a Query plugin and receive an Ajax warning…see the attachment: php issues.

Hey @Bizolly

The

Allowed memory size of ... bytes exhausted

error basically is PHP telling you that it ran out of memory when trying to generate the page. Since that number is in bytes, you can get a more human readable value by dividing it by 1,000,000 (1mb = 1000kb = 1000000b). So it looks like the site took over 268mb to generate the page before it gave up. This might be pointing to a memory leak, or a particularly expensive query that is happening only on the homepage.

Common things may be numerous collections of posts or products, maybe a slider that has many slides that are being loaded into memory.

In this case, I would recommend trying to increase the memory limit, along with following up figuring out what is using so much memory and trying to find an alternative way of doing it. The main reason for finding an alternative is that using that much memory (or rather, using more than what the error says) ultimately will cost more to host the site since servers with more resources will need to be purchased.

Increasing the memory limit for PHP is a little more challenging on Preferred environments, so I would recommend doing the following:

  • Clone the site to a custom environment
  • Open the php.ini file of the site that is located in conf/php/<version>/php.ini
  • Find the memory_limit line and increase the value. I’d start with 512M but you might need more. The limit is 1024M which is how much memory is allocated to the virtual machine
  • After changing the limit, restart the Local site and try to make the changes you need

Here’s a screenshot to help visualize:

Hi Ben, Thank you for getting back to me. I just gave up and figured my situation had been overlooked here on Local.

This did the trick. I can now get to the page to edit and try to figure out what is wrong.

Much appreciated.

Carol

1 Like