This problem is mostly happend when there is some mis configuration and no any .PHP handler is being set on the Apache Server.
As all request are process via .htaccess file configuration setup. We have to do manually setup of code in .htaccess file.
To solve this error just Login into your hosting panel or FTP and navigate to > Public_Html folder
if there is some file already exist with name ".htaccess" just click edit and if there is no
any file create a new ".htaccess" file, and add the following line to it:
AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php .php .htm .html
After add this line click save and try again after refreshing your website link.