After installing a fresh copy of WordPress, I was finding that when I created a new page, and tried viewing it, I received an error message: 403 Forbidden. Research suggested a permissions error, mine was different.
Three coincidences caused the 403 Forbidden error on my system:
- In Settings>Permalinks, I had selected “Post name”, so that if I created a page called “Test”, then its URL would be www.example.com/test
- I then created a page called Test
- I had a legacy directory called /test in my WordPress root, the clashed with the file name.
If any of these options changed, I did not get the error message. ie.
- In Settings>Permalinks, if I left the setting as “Plain”
- I created a page called Test2
- I removed the legacy directory with the same name as my page name.
Consequently, nothing to do with permissions for files or directories, and nothing to do with a corrupted .htaccess file.