So what are some of the main reasons to use PHP? Well, PHP is still widely used mainly for databases. If your site is going to require saved data such as: usernames, passwords, emails, messages, forum threads and posts, then PHP (along with SQL) will be needed. PHP is a perfect language when it comes to database storage.
Along with the database however you are going to require a server. A server is needed to get your database and other technical things online so that your users can access their accounts or whatever. You may notice when a site is down it says “the server is offline” but yet the site is still running, this is because the front-end which is purely HTML and CSS is working so they can tell you the back-end, which is the database, is offline.