How to secure your PHP websites ?

We at HostingRaja, have taken best effort to secure your domain and hosting as much as possible with best of our effort.
Generally there are pattern how Wordpress / Joomla websites are hacked, We have written in detail about how to secure WordPress websites.
PHP websites are hacked ONLY due to the poor coding practice followed by the developer.  We have analysed all the problem of hacking in PHP websites, most of the time, Its hacked due to improper checking of uploaded file.
Today HostingRaja is one of the top hosting company in India who has been providing best in class web hosting solution for our customers.
Common reasons, Why PHP websites are hacked.
1. Not properly checking the uploaded files
Check for <?php tag (PHP open tag) on the uploaded file, If PHP tag is present then, this could be a hacking file. Do not allow this file, Delete it.
2. admin folder
(Change the admin folder name to something else, like myscholladmin, myofficeadmin)
3. Keep a tough password for admin user name and password
4. Disable file upload option in cPanel
5. Disable error reporting.
And finally you need to learn more on how to protect your PHP based websites.