During move the site on server, you face the permission related issue on your website. Due to wrong permission you can get "An Internal Server Error", "404 error" or website content loading issue.
In this post I am here explaining a way to fix the permission issue within seconds only. Always set the folders permission to 755 and files permission to 644 and these permission will always protect your site from hacker.
Follow given below steps to set all files and folders permission in cPanel at once
- Login into your cPanel
- Find terminal menu
- Open terminal
- Run given below command to find the list of files and folder of server root
ls
- Run given below command to change directory path to root of the website i.e public_html folder
cd public_html
- Run given below command to find absolute path of your current directory
pwd
- Run given below command to set all folders permission to 755 recursively
find paste_absolute_path_here -type d -exec chmod 755 {} \;
- Run given below command to set all files permission to 644 recursively
find paste_absolute_path_here -type f -exec chmod 644 {} \;
- You did it.