One of my friend just uploaded his WordPress website from localhost on which he was developing it to the online cpanel server.
Once the website was on the server, all files in place, and tried to open the website by going to its url, boom, a 403 forbidden error!
What is 403 forbidden error
403 forbidden error is when a directory or a file on the server is forbidden to be opened by public. This could be due to several reasons. Let me explain them:
1. if the directory in which the websites files reside are not having the appropriate permissions to be visible and accessible by the public. This might prevent any file in the directory to be shown.
2. The index.php (or any other main files) of the directory to be shown by the url are forbidden by incorrect permission settings.
3. The file is missing (and the server don’t allow directory listing)
What was the error in our case
In our case, due to some complication, the index.php of the root directory for wordpress got deleted by the uploaded. It was due to some complex misunderstanding, hard to explain here like this.
So the issue was, the file was missing, well right then why didn’t it say 404 not found? first of all because its a cms, wordpress, it won’t list the file info directly.
Secondly, the file was missing from the directory which don’t allow directory listing probably (citation needed) so that’s why the missing file wasn’t able to be reported that way. (update:)checked by changing permission to show, but still didn’t work, what’s your opinion about it ?)
So by simply uploading the index.php to the root folder for the website, it worked perfectly!
Good one…