Why do you even want to host your PHP site on Github when you have proper servers like DigitalOcean, AWS and others. If it is the server hassles that you want to avoid, then there are services that provides managed PHP site hosting on these servers. As for github pages, I don't think it supports non-static sites.
You can add php file in github repo, but it won't execute or compile your php code this is the same with google drive
How to do this, this is what I'm looking for. Any links or something..
I badly want the github.io to be my main portal as it sounds cool and professional. lol. All I need is for my website to be maintainable and dynamic.
Hi @designdust ,
However, if you have any ideas about what kind of technologies/frameworks you'd like to use, we may be able to offer a few tutorials that better fit your needs.
Presenting the project in GitHub Pages using php is not - as mentioned in the previous response regarding ToS.
As also mentioned:
Deploying php source to GitHub for project management, and even posting to the destination hosted server is possiible. Nothing in GitHub prevents this.
For me, this was the solution to the conundrum:
Alternate Solution: Don't use GitHub Pages for working with php projects.
- Develop php locally using an OracleVM Virtual Machine configured to match your hosting server resources.
For me it was what to me seems alterately referenced as a LAMP or LEMP stack.
(Google "how to create an Oracle VM LAMP stack" for examples using your favorite Linux flavor).
- Use Git to manage the project files to be pushed to your registered domain on demand.
- When you need to make changes to the live site - create a pull request and merge.
Hope this helps!
Hi, Github pages only provides static page hosting. You need to buy a web hosting or Vps server for this. PHP needs a server to run the php pages. On localhost you have the option of internal servers in frameworks.