From a7fe224b1acc9a6fc7bbf2f5fddf49ba73792ab0 Mon Sep 17 00:00:00 2001
From: Arnaud Lier <arnaud@lier.link>
Date: Tue, 18 Feb 2025 18:00:53 +0100
Subject: [PATCH] fix wordpress install script max php memory

---
 srcs/requirements/wordpress/conf/php.ini             | 2 +-
 srcs/requirements/wordpress/tools/setup_wordpress.sh | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcs/requirements/wordpress/conf/php.ini b/srcs/requirements/wordpress/conf/php.ini
index 987e459..0da9807 100644
--- a/srcs/requirements/wordpress/conf/php.ini
+++ b/srcs/requirements/wordpress/conf/php.ini
@@ -432,7 +432,7 @@ max_input_time = 60
 
 ; Maximum amount of memory a script may consume
 ; https://php.net/memory-limit
-memory_limit = 128M
+memory_limit = 2G
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Error handling and logging ;
diff --git a/srcs/requirements/wordpress/tools/setup_wordpress.sh b/srcs/requirements/wordpress/tools/setup_wordpress.sh
index 2f221b7..be25317 100644
--- a/srcs/requirements/wordpress/tools/setup_wordpress.sh
+++ b/srcs/requirements/wordpress/tools/setup_wordpress.sh
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -e
+
 if [ ! -e '/var/www/wordpress/wp-config.php' ]; then
     wp core download --path=/var/www/wordpress
 
@@ -18,4 +20,4 @@ if [ ! -e '/var/www/wordpress/wp-config.php' ]; then
     wp user create bob bob@example.org
 fi
 
-exec php-fpm84 --nodaemonize
\ No newline at end of file
+exec php-fpm84 --nodaemonize