0

I'm in the process of moving WordPress site from shared hosting to my new VPS. I've set everything up but when I try to open page all I get is a blank screen. Apache log says:

[Mon Apr 25 20:49:42.545498 2016] [:error] [pid 12379] [client 91.218.65.62:58115] PHP Fatal error: require_once(): Failed opening required '/var/www/site/public_html/blog/wp-config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/site/public_html/blog/wp-load.php on line 37

but all files and dirs have correct permissions (640 and 750 respectively):

-rw-r----- 1 bazyli www-data 3602 Apr 25 20:43 wp-config.php

What's the cause of this problem?

EDIT:

In the log example I've originally posted there isn't anything about permissions but there are other like:

[Mon Apr 25 20:49:42.545437 2016] [:error] [pid 12379] [client 91.218.61.62:58115] PHP Warning: require_once(/var/www/site/public_html/blog/wp-config.php): failed to open stream: Permission denied in /var/www/site/public_html/blog/wp-load.php on line 37

sajran
  • 317
  • 4
  • 15
  • Possible duplicate of [Failed to open stream : No such file or directory](http://stackoverflow.com/questions/36577020/failed-to-open-stream-no-such-file-or-directory) – Vic Seedoubleyew Apr 26 '16 at 12:20

1 Answers1

1

The GROUP needs write/read permissions (www-data), not just the user (bazyli)

circusdei
  • 1,967
  • 12
  • 28
  • Actually, it looks like Wordpress is looking in the wrong location (/var/www/site/public_html/blog/wp-config.php). Can you confirm this is where the file is located? – circusdei Apr 25 '16 at 19:28
  • Path is correct and you're right, everything works fine when files are set to 660. It's weird because I've looked it up on the internet before setting and many sites said it should be 640. Anyway, thank you! – sajran Apr 25 '16 at 19:36