php - What can I do about exhausted memory on Wordpress while developing via a local Ubuntu server?

121

Some short facts first:

  • Ubuntu 16.04 LTS on VirtualBox with 4096M ram.
  • PHP 7.0.22
  • Wordpress 4.9.2.
  • macOS 10.13.2
  • Using a shared folder to access my websites via localaddress.vm/[websitename]

I have set up a local Ubuntu server via VirtualBox to not having to use MAMP anymore. I develop Wordpress websites. Frontend of the Wordpress website is all good. /wp-admin is also playing nice but after successfully logging in, I am not getting redirected to the Dashboard. Instead I get the following error:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to 
allocate 262144 bytes) in /media/sf_sharedwww/thermoshield/wp-
includes/functions.php on line 1872

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to 
allocate 262144 bytes) in Unknown on line 0

Tried solutions:

  • Upping the RAM on my VirtualBox
  • Upping the memory_limit for WP viawp-config.php
  • Upping the memory_limit via thephp.ini file.
  • Basically the first page of Google results

Please help, I cannot continue development if I can't access the back-end of Wordpress.

People are also looking for solutions to the problem: php - convert array to object in laravel

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.