5.0.2: Local Installation -> Transfer to production

Your software
My Mautic version is: 5.0.2
My PHP version is: 8.1.27
My Database type and version is:

Your problem
My problem is: ERROR 500

These errors are showing in the log:

Steps I have tried to fix the problem:

Hello

I have a composer version installed locally. Now I want to transfer the installation to the production server.
Which files are required?
I transferred following directories:
bin
config
docroot
node_modules
var
vendor

and of course the db. After the DB import and setting the ownership and user rights of the files and directories and deleting the cache, I’m getting an error 500.

I’m still digging into this matter.
On the prod. server I unzipped the 5.0.2.zip and installed Mautic via web installer tool.

Voila, it works.

Then I dropped all DB tables and populated the DB with my backup with all my data.

Voila, I’m seeing all my contacts, emails, campaigns etc.

The conventional installation has no docroot compared to the composer installation, which hast part of the installation files in the docroot directory.
So I made a docroot directory and placed the files and directories into it:
drwxr-xr-x 8 web49 client1 4096 Jan 25 14:20 app
-rw-r–r-- 1 web49 client1 54 Jan 25 14:20 autoload.php
-rw-r–r-- 1 web49 client1 12862 Jan 25 14:20 favicon.ico
-rw-r–r-- 1 web49 client1 711 Jan 25 14:20 index.php
drwxr-xr-x 8 web49 client1 4096 Jan 25 14:20 media
drwxr-xr-x 14 web49 client1 4096 Jan 25 14:20 plugins
-rw-r–r-- 1 web49 client1 224 Jan 25 14:20 robots.txt
drwxr-xr-x 20 web49 client1 4096 Jan 25 14:20 themes
drwxr-xr-x 2 web49 client1 4096 Jan 25 14:20 translations
drwxr-xr-x 6 web49 client1 4096 Jan 25 14:20 var

Then I changed the paths in config/local.php accordingly.
Deleted the cache, restarted apache…

Unfortunately I’m getting the Rose-Error: The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.

So, what’s the problem here?

Why is cloning an installation to another server such a pain in the ass?