Blank page apache2 localhost

I copied all files to my localhost folder.
When I call localhost on my browser I get an empty page.
So I commented the whole index.php and wrote only phpinfo. I got the info page.
Any suggestions why the index.php doesn’t load with the grav code?

Have also copied the hidden .htaccess file ?

I copied all hidden files.

Then the next step is to examine your Apache and PHP logs.

Do you have any more info on where you are copying from and to? It may be worth giving some more details about the environments (e.g. copying from a hosting provider to a local Linux system).

Let’s assume you are copying the files from a working system, over to another computer running Linux (localhost). Most likely a blank page would be caused by missing php modules on your localhost. The getgrav requirements page should give you a steer on what modules you need.

You might also have different versions of PHP installed. On your localhost type:
php --version

You’ll need at least version 7.1.3 with the latest version of Grav.