Fixing Cpanel internal server error

Default featured post

In Cpanel hosted sites, Internal Server Error is a common issue. This can be due to multiple reasons which is highly depends on the Cpanel configurations.

As a website owner, encountering this error is very unpleasant. In particular when there is a high pressure to fix the problem. Based on my limited experience the error can have various causes. In this post just one of them is explained.

The most common cause Internal Server Error is due to file/folder permissions. Either giving higher unnecessary permission than what required or lower permission. As an example, giving permission 777 for granted triggers Internal Server Error. The same error occurs if lower permission given.

In Cpanel the standard permission for files is 644 and for folders is 755. Keep in mind to solve the problem the permission should be set for all the files and folders.

The easiest way is using shell and run chmod command. Those that have no ssh access, writing a bash script and executing it via a cron is a viable option. Another approach is to compress the files in .tar.gz format in a Linux or Unix machine and then transfer via ftp. This should retain the original permission. Alternatively, some Cpanels set permission automatically when anything copied to the file system.