0

I am having trouble with file permissions on my WordPress site and I found a blog post that suggests to reset them with the following commands:

find /path/to/site/ -type f -exec chmod 664 {} \;
find /path/to/site/ -type d -exec chmod 775 {} \;

However, I am not sure with what I should replace "/path/to/site/". Can someone help?

2
  • Do you have shell access to your server? You would need that to run those commands. If you only have ftp access the command is different. Commented May 5, 2017 at 14:43
  • I have shell access. I just don't know what is meant by "path/to/site".
    – zgall1
    Commented May 5, 2017 at 14:53

1 Answer 1

2

In this context /path/to/site means the absolute path to the root of the content directory of the website. You can find this by navigating to the directory where you installed wordpress and running the command pwd (assuming you are on linux). That will output the path you are looking for. By default in many linux/apache installations, this path is /var/www/html.

If you do not know where wordpress was installed, the process is slightly more involved.

Still assuming your server is an Linux server running Apache, to find the "/path/to/site/" you can run the command apachetl -S (on Debian/Ubuntu) or the command httpd -S (on Redhat/Centos).

That will output a block that will include a path to a config file. Open the config file and find the line that starts

 <Directory...

The path in the quotes after the word Directory is the path you are looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.