diff --git a/.htaccess b/.htaccess
index a0d1710a8aa55721fbdae884b0018c1a9d254c95..1636ce4bc50cb2467a042043dea042ce99ad1e4f 100644
--- a/.htaccess
+++ b/.htaccess
@@ -58,6 +58,32 @@
 
 </IfModule>
 
+<IfModule mod_php7.c>
+
+############################################
+## adjust memory limit
+
+    php_value memory_limit 768M
+    php_value max_execution_time 18000
+
+############################################
+## disable automatic session start
+## before autoload was initialized
+
+    php_flag session.auto_start off
+
+############################################
+## enable resulting html compression
+
+    #php_flag zlib.output_compression on
+
+###########################################
+## disable user agent verification to not break multiple image upload
+
+    php_flag suhosin.session.cryptua off
+
+</IfModule>
+
 <IfModule mod_security.c>
 ###########################################
 ## disable POST processing to not break multiple image upload
diff --git a/dev/tests/functional/.htaccess b/dev/tests/functional/.htaccess
index 0fe8af43b87597383c5904481c15b751e52630d2..b20b4dc2e4e676277b93ef8b28e67f594332dfea 100644
--- a/dev/tests/functional/.htaccess
+++ b/dev/tests/functional/.htaccess
@@ -63,6 +63,43 @@
 
 </IfModule>
 
+<IfModule mod_php7.c>
+
+############################################
+## adjust memory limit
+
+#    php_value memory_limit 64M
+    php_value memory_limit 256M
+    php_value max_execution_time 18000
+
+############################################
+## disable magic quotes for php request vars
+
+    php_flag magic_quotes_gpc off
+
+############################################
+## disable automatic session start
+## before autoload was initialized
+
+    php_flag session.auto_start off
+
+############################################
+## enable resulting html compression
+
+    #php_flag zlib.output_compression on
+
+###########################################
+# disable user agent verification to not break multiple image upload
+
+    php_flag suhosin.session.cryptua off
+
+###########################################
+# turn off compatibility with PHP4 when dealing with objects
+
+    php_flag zend.ze1_compatibility_mode Off
+
+</IfModule>
+
 <IfModule mod_security.c>
 ###########################################
 # disable POST processing to not break multiple image upload
diff --git a/pub/.htaccess b/pub/.htaccess
index 6e6f63c43581f2cb307f894376f92f02a0574fcc..120d7eb5a08d9adb1d6cb9bb3ecce485b4763892 100644
--- a/pub/.htaccess
+++ b/pub/.htaccess
@@ -57,6 +57,32 @@
 
 </IfModule>
 
+<IfModule mod_php7.c>
+
+############################################
+## adjust memory limit
+
+    php_value memory_limit 256M
+    php_value max_execution_time 18000
+
+############################################
+## disable automatic session start
+## before autoload was initialized
+
+    php_flag session.auto_start off
+
+############################################
+## enable resulting html compression
+
+    #php_flag zlib.output_compression on
+
+###########################################
+# disable user agent verification to not break multiple image upload
+
+    php_flag suhosin.session.cryptua off
+
+</IfModule>
+
 <IfModule mod_security.c>
 ###########################################
 # disable POST processing to not break multiple image upload
diff --git a/pub/media/.htaccess b/pub/media/.htaccess
index f2751570906a53719d522d910be118f77ffcedaf..865ebd31b528b8183593ee5e55894dedc53a46fd 100644
--- a/pub/media/.htaccess
+++ b/pub/media/.htaccess
@@ -1,8 +1,13 @@
 Options All -Indexes
+
 <IfModule mod_php5.c>
 php_flag engine 0
 </IfModule>
 
+<IfModule mod_php7.c>
+php_flag engine 0
+</IfModule>
+
 AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
 Options -ExecCGI
 
diff --git a/pub/static/.htaccess b/pub/static/.htaccess
index c96881a49c63ff713f87d9148f6f8c5816ecfeb8..56ceaf0570999e24dbab3f0c380c79505e6c69c5 100644
--- a/pub/static/.htaccess
+++ b/pub/static/.htaccess
@@ -2,6 +2,10 @@
 php_flag engine 0
 </IfModule>
 
+<IfModule mod_php7.c>
+php_flag engine 0
+</IfModule>
+
 # To avoid situation when web server automatically adds extension to path
 Options -MultiViews