diff --git a/dockerfiles/services/wordpress/run-wordpress.sh b/dockerfiles/services/wordpress/run-wordpress.sh
index 0e6006589c7c1358109ad203de85b7101118e976..962883bab8753839c8a64c65356f4fb7132b762d 100644
--- a/dockerfiles/services/wordpress/run-wordpress.sh
+++ b/dockerfiles/services/wordpress/run-wordpress.sh
@@ -4,11 +4,6 @@ if [ ! "$(ls -A /app/wp-content)" ]; then
   cp -av /wp-content/* /app/wp-content/
 fi
 
-chown -R root:www-data /app
-chmod -R 650 /app
-chmod -R 770 /app/wp-content/
-chmod -R 660 /app/.htaccess
-
 DB_HOST=${DB_PORT_3306_TCP_ADDR:-${DB_HOST}}
 DB_HOST=${DB_1_PORT_3306_TCP_ADDR:-${DB_HOST}}
 DB_PORT=${DB_PORT_3306_TCP_PORT:-${DB_PORT}}
@@ -63,5 +58,10 @@ else
     exit $DB_CONNECTABLE
 fi
 
+chown -R root:www-data /app
+chmod -R 650 /app
+chmod -R 770 /app/wp-content/
+chmod -R 660 /app/.htaccess
+
 exec /run.sh