2

I am trying to host my WordPress site on GitHub from Linux machine using Apache2 and MySQL.

On GitHub :

created repo > username/username.github.io

On WordPress :

'using simply static plugin' simply static plugin settings > general Destination URLs > username.github.io Dir methon : local dir local dir : /var/www/html/static/ (full permission chmod 777)

simply static pluginsettings > include/excule Additional Files and Directories : /var/www/html/wordpress/wp-content/themes/zerif-lite/ /var/www/html/wordpress/wp-content/uploads/ theme name : zerif-lite

Linux terminal :

git init git add -a 
git commit -m "first commit"
git remote add origin https://github.com/username/username.io.git 
git push -u origin master : creds

but on GitHub page it display:

404 site not found

There isn't a GitHub Pages site here.

halfer
  • 19,824
  • 17
  • 99
  • 186
john wick
  • 21
  • 3

1 Answers1

0

git push -u origin master : creds seems suspicious

Try simply git push -u origin master, and make sure to configure your publication branch for your GitHub pages repository.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for reply, I have used git push -u origin master later i added my username and password. Thats I mentioned creds – john wick Aug 02 '19 at 04:52
  • @johnwick Dod you check https://stackoverflow.com/a/45561033/6309 and setup a /doc folder as in https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages? – VonC Aug 03 '19 at 04:12
  • @johnwick Can you double-check possible causes in https://stackoverflow.com/q/11577147/6309? – VonC Aug 03 '19 at 04:13
  • @johnwick Here is an example of a static Wordpress website: https://github.com/sashakyunghwa/blog seen at https://sashakyunghwa.github.io/blog/ as a GitHub page: you can compare it with yours. – VonC Aug 03 '19 at 04:18
  • I have only one branch master and
    1. I worked on /docs(folder)/CNAME(empty file with no extension) but no luck. 2. I tried username.github.com/index.html > it works ( but some sort of gibberish, I think simply static export didn't work correct). motive is : username.github.io should work as home.
    – john wick Aug 08 '19 at 01:48
  • @johnwick What did you set as publication source? https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages – VonC Aug 08 '19 at 04:31
  • I just realize it is not about the link issue, I think it is from export side _ I am using simply static and somehow it doesn't work properly and exporting some gibberish words in index.html --- > ‹í;ýSÛº²?—™÷?3’ÛØNB[(Äép€ž – john wick Aug 15 '19 at 00:22
  • @johnwick That looks like a file encoding issue. Are your files in UTF-8? – VonC Aug 15 '19 at 06:43
  • Hello @Vonc, I have tried this in terms of UTF-8 but no help : just comment DB_CHARSET and DB_COLLATE in wp-config.php //define('DB_CHARSET', 'utf8'); //define('DB_COLLATE', ''); Mine was : define('DB_CHARSET', 'utf8mb4'); – john wick Aug 17 '19 at 02:44