Wordpress installation manualy fails

I uploaded wordpress to mydomain.com/wordpresss/ and with my browser I beginn to install.
But I got this error:
Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 30720 bytes) in /var/www/html/wordpresss/wp-admin/includes/template.php on line 1592

I think one of these two methods should work:

a) To globally increase the php memory limit:

config setprop php MemoryLimit 256
signal-event nethserver-php-save
apachectl restart

Replacing 256 with the amount of memory to be allocated.

b) You can also try a different approach just for wordpress, by editing the wp-config.php file and adding the following line(s) before the wp-settings.php inclusion:

define('WP_MEMORY_LIMIT', '128M');  // increase memory for wordpress
define( 'WP_MAX_MEMORY_LIMIT', '256M' );  // increase memory for wordpress administration area
1 Like

Sorry a) I did increase the value, but it did not work!

And b) it is no wp-config.php file get. wp-config.php is created by Wordpress after an instal.

Hi, sorry it didn’t work.

Did you try the first option but setting much memory (e.g. 256 instead of 64)?

About the second method, see the wordpress installation guide:

3.(Optional) Find and rename wp-config-sample.php to wp-config.php, then edit the file (see Editing wp-config.php) and add your database information.

Note you can change the memory limit values provided in the examples:

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

supposing the server has enough free RAM.

If neither of this works:

  • check php memory setting: php -i |grep memory_limit
  • see if there is a debug file (in wp-content/debug.log) that can give more information on the error.

Thanks for the hints You give me.
Yes I changed the value to 500

I will try to use an wp-config.php I have for an other installation of wordpress that works fine. And alter the database information and what You have suggested.

I forgot about it… you may need to restart apache afterwards:

apachectl restart

I did not after I changed to 500, perhaps that was the problem that it did not work.

That made the problem go away!
Now I got the screen I was looking for in the installation.
Thanks so much my friend!

1 Like

Good! And sorry for the inconvenience. :sweat_smile:
For future reference, will update the previous post to reflect that change.

1 Like

@Foa welcome here, I marked your topic as solved for you.