Unable to install on 5.2.3. Get a 404 right awat

Your software
My Mautic version is: 5.2.3
My PHP version is: 8.2.27
My Database type and version is: MySQL 8.0.41-0ubuntu0.24.04.1

Your problem
My problem is: I’ve unzipped the files in my main directory. When I visit my site, the URL updates to /installation but I get a 404 error.

These errors are showing in the log:
[Sat Mar 08 18:42:08.665603 2025] [php:notice] [pid 33089] [client 109.236.61.115:52270] PHP Warning - mkdir(): Permission denied - in file /var/www/crm.mywebsitename.com/public_html/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php - at line 57
[Sat Mar 08 18:42:08.665658 2025] [php:warn] [pid 33089] [client 109.236.61.115:52270] PHP Warning: mkdir(): Permission denied in /var/www/crm.mywebsitename.com/public_html/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php on line 57
[Sat Mar 08 18:42:08.665695 2025] [php:notice] [pid 33089] [client 109.236.61.115:52270] PHP Warning - file_put_contents(/var/www/crm.mywebsitename.com/public_html/var/cache/prod/middlewares.cache.php): Failed to open stream: No such file or directory - in file /var/www/crm.mywebsitename.com/public_html/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php - at line 70
[Sat Mar 08 18:42:08.665700 2025] [php:warn] [pid 33089] [client 109.236.61.115:52270] PHP Warning: file_put_contents(/var/www/crm.mywebsitename.com/public_html/var/cache/prod/middlewares.cache.php): Failed to open stream: No such file or directory in /var/www/crm.mywebsitename.com/public_html/app/bundles/CoreBundle/Cache/MiddlewareCacheWarmer.php on line 70
[Sat Mar 08 18:42:08.665717 2025] [php:notice] [pid 33089] [client 109.236.61.115:52270] PHP Warning - include(/var/www/crm.mywebsitename.com/public_html/var/cache/prod/middlewares.cache.php): Failed to open stream: No such file or directory - in file /var/www/crm.mywebsitename.com/public_html/app/middlewares/MiddlewareBuilder.php - at line 66
[Sat Mar 08 18:42:08.665746 2025] [php:warn] [pid 33089] [client 109.236.61.115:52270] PHP Warning: include(/var/www/crm.mywebsitename.com/public_html/var/cache/prod/middlewares.cache.php): Failed to open stream: No such file or directory in /var/www/crm.mywebsitename.com/public_html/app/middlewares/MiddlewareBuilder.php on line 66
[Sat Mar 08 18:42:08.665755 2025] [php:notice] [pid 33089] [client 109.236.61.115:52270] PHP Warning - include(): Failed opening ‘/var/www/crm.mywebsitename.com/public_html/var/cache/prod/middlewares.cache.php’ for inclusion (include_path=‘.:/usr/share/php’) - in file /var/www/crm.mywebsitename.com/public_html/app/middlewares/MiddlewareBuilder.php - at line 66
[Sat Mar 08 18:42:08.665759 2025] [php:warn] [pid 33089] [client 109.236.61.115:52270] PHP Warning: include(): Failed opening ‘/var/www/crm.mywebsitename.com/public_html/var/cache/prod/middlewares.cache.php’ for inclusion (include_path=‘.:/usr/share/php’) in /var/www/crm.mywebsitename.com/public_html/app/middlewares/MiddlewareBuilder.php on line 66
[Sat Mar 08 18:42:08.665764 2025] [php:notice] [pid 33089] [client 109.236.61.115:52270] PHP Warning - foreach() argument must be of type array|object, bool given - in file /var/www/crm.mywebsitename.com/public_html/app/middlewares/MiddlewareBuilder.php - at line 68
[Sat Mar 08 18:42:08.665768 2025] [php:warn] [pid 33089] [client 109.236.61.115:52270] PHP Warning: foreach() argument must be of type array|object, bool given in /var/www/crm.mywebsitename.com/public_html/app/middlewares/MiddlewareBuilder.php on line 68

Steps I have tried to fix the problem:
I’ve taken a look at line 68 and used ChatGPT to help my try and troubleshoot this error. It says: indicates that foreach() is trying to iterate over a variable that is false, which likely means the variable was expected to be an array or object but instead received a bool (probably false). The troubleshooting from there never got us to a place where we found bool being marked as false and I was hesitant to modify any PHP without knowing for sure what changes I was making and getting in deeper.

Any help would be greatly appreciated.

did you chown -R www-data:www-data on your entire directory ?

You can also check out our tutorial here using composer.