188 posts Amazing WordPress Themes
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
+7 more
Code125
says

Hello Guys i have a under-development theme is producing that error on localhost only

Warning: include(PATH_TO_THEME/functions.php): failed to open stream: Permission denied in PATH_TO_WORDPRESS/wp-settings.php on line 316

and nothing is loaded, and this happens only in localhost and nothing where else.

and any other theme is working.

Any idea where can the problem be ?

313 posts
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
crossroad
says

Because server does not have permission to read that file?

What’s the PATH_TO_THEME ? Relative path?

188 posts Amazing WordPress Themes
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
+7 more
Code125
says

its permission is 640 functions.php “like any other theme”

PATH_TO_THEME is Applications/XAMPP/xamppfiles/htdocs/wp/wp-content/themes/kalemat/functions.php

1885 posts The Last Man Standing
  • Had an item that became a weekly top seller
  • Has sold $125,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Helps us moderate the forums
+11 more
ImanGM
Moderator
says

Hey,

Try 644, if didn’t work, try even 777 and see if this issue is related to your file system permission or not.

If it helped try to fix the webserver configs to run by 644 but if it didn’t help, you can proceed with the next steps…

Cheers,
Iman

188 posts Amazing WordPress Themes
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
+7 more
Code125
says

I changed all the php permissions to 644 and it worked

here is the command line i used for anyone who may face such a problem

cd the_theme_path
sudo find . -type f -name '*.php' -exec chmod 644 {} \;

Thanks so much guys for your help :)

by
by
by
by
by
by