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.


I am answering this old question because I had to solve the same problem. In my case, working under linux, the solution has been to change the owner of the grav installation files to dameon. From the Apache htdocs directory: sudo chown -R daemon:dameon grav (for the grav folder).

I have also had problems copying files only from the /page and themes/theme folders when they had the language extension in the filename but did not have this in the configuration file.

Human failures! :sweat_smile:

Have you visited this link?

I remember to have had the same problem in the past.