Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 11 of 17

Re: Deploying PHP to GitHub Pages - is it possible?

umm if i put a single cgi file? will work?

Commander Lvl 3
Message 12 of 17

Re: Deploying PHP to GitHub Pages - is it possible?

@mckaygerhard No, it won’t. Read the thread - hosting PHP both isn’t possible and isn’t allowed on GitHub pages.

You however can, and should, host your PHP code with GitHub.

- Mark
Highlighted
Copilot Lvl 2
Message 13 of 17

Re: Deploying PHP to GitHub Pages - is it possible?

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.

Copilot Lvl 2
Message 14 of 17

Re: Deploying PHP to GitHub Pages - is it possible?

No, you cannot do that on Github Pages as it only supports static websites, i.e. sites built on html, css, JS.

Copilot Lvl 2
Message 15 of 17

Re: Deploying PHP to GitHub Pages - is it possible?

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

 

The good thing is that you can place your php in other server then use github repo html, javascript and call the php via ajax  to load content result so you can have a dynamic page in github.

 

 

 

 

Copilot Lvl 2
Message 16 of 17

Re: Deploying PHP to GitHub Pages - is it possible?

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.

Commander Lvl 3
Message 17 of 17

Re: Deploying PHP to GitHub Pages - is it possible?

Hi @designdust ,

 

There are a million ways to accomplish that. But the idea always is that you have the static stuff on GitHub and that uses JavaScript to load dynamic data from some place else.

 

An example would be: https://medium.freecodecamp.org/from-zero-to-deploy-how-i-created-a-static-website-from-scratch-usin...

 

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.


- Mark