TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

I tried to use WordPress with GitHub Pages

69 pointsby mdu96almost 5 years ago

29 comments

frereubualmost 5 years ago
&quot;running WordPress locally is a nightmare... I should also caveat that I know almost nothing about Apache, MySQL, FTP, and PHP.&quot;<p>Without wishing to be too snarky, this could be rewritten as &quot;Running this software is a nightmare if you know nothing about the technologies it is built on.&quot; And being slightly more snarky, my response would be: well, duh.
评论 #24181725 未加载
评论 #24181581 未加载
评论 #24183858 未加载
评论 #24181629 未加载
评论 #24181551 未加载
评论 #24181566 未加载
评论 #24182747 未加载
评论 #24181879 未加载
评论 #24181769 未加载
pembrookalmost 5 years ago
So, yes, Wordpress is a nightmare.<p>But no, static site generator plus headless CMS is not the answer, regardless of how many comments here enthusiastically say so.<p>I’ve been down the static site generator rabbit hole for the past 7 years...and realized they aren’t really well suited for anything other than tiny developer blogs that don’t ever get updated (dev writes his occasional post in VScode)—-or, giant company marketing sites that get hooked up to enterprise-y headless CMS products like contentful.<p>If you’re somewhere in between, I’m starting to think Webflow is the answer. In fact, I’ve started moving all my side project marketing sites&#x2F;blogs over to them and couldn’t be happier.<p>The problem with [insert static site generator] + [insert headless CMS] is that getting off the ground is a massive pain in the ass.<p>If you’re trying to set up a static site for your side project, let me give you a preview of what your next couple of weeks will look like:<p>First you have to pick a SSG. There goes a day of research. Then pick the next hot CSS framework (of course, you shouldn’t waste your time on this, but you will). Tailwind! Sick! Then setup a build process. Then troubleshoot the inevitable issues. Fixed. Then setup a git repo. Then hook the repo up to Netlify. Then hook up continuous deployment. Then get the domain. Then configure the domain to talk to Netlify. Then realize your hot new SSG doesn’t do any SEO stuff for you. Setup xml sitemaps. Generate proper tags &amp; structured data. Then you have to create the actual site. Realize your CSS framework is overkill. You’re already a week in. Optimize for breakpoints. Cool. Almost ready. Now let’s write some content. Shit, I’m never going to write if I have to fire up my code editor each time. Look into headless CMS options. There goes a day of research. Pick one. Now Setup models in the CMS. Try to figure out how to hook it into your git repo and trigger deployments to Netlify. Realize the UI of the headless CMS you picked is clunky. Never actually write any content. Forget how you even set everything up. Get frustrated. You haven’t even hooked up any analytics or email signup capability yet. Give up.<p>On Webflow I’ve managed to cut the previous paragraph down by about 80%.
评论 #24184701 未加载
评论 #24195249 未加载
评论 #24188360 未加载
评论 #24183665 未加载
评论 #24183453 未加载
评论 #24185409 未加载
reaperduceralmost 5 years ago
Use the right tool for the work you&#x27;re trying to do. WordPress is probably the right tool for the author&#x27;s problem. GitHub Pages is probably not the best tool to use with WordPress.<p>A carpenter doesn&#x27;t try to build a chair without understanding how both a saw and a measuring tape work. People who want to build a chair with a saw and a surveying rig are probably better off going to a chair store.<p>It seems that the author overestimated his technical abilities, and blames the tools he chose, rather than himself for choosing those tools.
MichaelStubbsalmost 5 years ago
I find the first mistake here to be trying to use WordPress. Maybe it&#x27;s just because I use it so much (or rather, as a developer, I&#x27;m often hired to fix other people&#x27;s mess and broken code) but it is genuinely my most hated piece of software.
评论 #24181830 未加载
评论 #24181948 未加载
评论 #24181585 未加载
godotalmost 5 years ago
I think part of the problem is because you were previously used to GitHub Pages with Jekyll, you were trying to use a new (but old) tool (Wordpress) with GitHub Pages and it&#x27;s not a great fit for it. I&#x27;m sure it&#x27;s possible somehow, but it wouldn&#x27;t be straightforward. Just conceptually I&#x27;m not sure how it would even work: GH Pages is for hosting static sites (AFAIK) and WordPress uses a DB and dynamically writes posts. So I&#x27;m guessing you&#x27;re trying to do a setup where you locally run WP, write from the WP interface, saves posts in your local Mysql DB, and then generate a static site (html files output) and pushing those files into a GitHub repo?<p>It&#x27;s a roundabout way to publish to a web site to say the least. If Jekyll has enough issues where you need to tweak its config in Ruby every time you want to write, you could try a different static site generator (e.g. Hugo for golang, or Miner [1] for Svelte. Disclaimer: I worked on Miner.).<p>I think the product you&#x27;re looking for is a static site generator + the use of a client-only WYSIWYG markdown editor that connects to your git repo via OAuth and lets you write on a good UI instead of plain text markdown files. The SSG is one of above; unfortunately I don&#x27;t have a recommendation or know of a client-only WYSIWYG MD editor with git OAuth integration.<p>1: <a href="https:&#x2F;&#x2F;github.com&#x2F;bigicoin&#x2F;miner" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bigicoin&#x2F;miner</a>
评论 #24183709 未加载
hombre_fatalalmost 5 years ago
&gt; I started to procrastinate writing because there was always some small thing I wanted to fix with Jekyll first.<p>This is what happened to me when I thought it would be a good idea to build my own blog software.<p>These days I&#x27;m a believer in using whatever setup minimizes the daylight between wanting to write, and writing.
评论 #24181559 未加载
评论 #24183704 未加载
评论 #24181522 未加载
barbegalalmost 5 years ago
If anyone does want to convert Wordpress pages to static pages then WP2Static seems to be the best option <a href="https:&#x2F;&#x2F;wp2static.com" rel="nofollow">https:&#x2F;&#x2F;wp2static.com</a> They even list alternative tools that are better in certain use cases <a href="https:&#x2F;&#x2F;wp2static.com&#x2F;alternatives&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wp2static.com&#x2F;alternatives&#x2F;</a><p>You might not be able to find it as a plugin, the author made a deliberate decision to delist the plugin from wordpress.org <a href="https:&#x2F;&#x2F;staticword.press&#x2F;t&#x2F;removal-of-wp2static-from-wordpress-org&#x2F;159" rel="nofollow">https:&#x2F;&#x2F;staticword.press&#x2F;t&#x2F;removal-of-wp2static-from-wordpre...</a>
评论 #24181914 未加载
ReverseColdalmost 5 years ago
&gt; For example, I tried and failed multiple times to add a &lt;meta&gt; tag to the head of my index.html file. This theoretically should have been a very simple change.<p>The thing “they don’t tell you” about static site generators is that you should vendor your site theme. Don’t expect to both get upstream updates <i>and</i> make HTML level changes.
评论 #24181733 未加载
phreackalmost 5 years ago
WordPress is an incredible blog editing software, which is why it&#x27;s so popular, so I get the author&#x27;s intention.<p>It&#x27;d be amazing to have something that let&#x27;s you open a desktop app, have WordPress with all (or most of) its themes and ease and plug-ins for blogging, deploy changes to a git repo, and from there to a host -- in a way where you don&#x27;t need to know more than how to make an account on say Github and Netlify.<p>Maybe there already is something like that, I&#x27;d love to know if so!
评论 #24186174 未加载
proxalmost 5 years ago
Wordpress is part of the LAMP stack, and there are easy tools like XAMP to get you up and running locally. With a tutorial it should be doable. It’s probably better if you get hosting with auto-install if you’re really averse to tinkering.<p>That said I wonder why you’d need Github Pages if you’re already set up with Wordpress...
评论 #24183683 未加载
评论 #24181688 未加载
评论 #24181525 未加载
评论 #24181492 未加载
AnonHPalmost 5 years ago
My background: I’m a technical person who can get around Unix&#x2F;Linux, work with file permissions, shell, databases, etc., comfortably. Yet, I have to agree with the author and her observations, especially after my trials on macOS.<p>&gt; Here’s what I know now: running WordPress locally is a nightmare. Successfully figuring it out was way harder than it should have been.<p>I tried XAMPP recently after a long, long time (this is on Mac). After the initial steps of creating a database (not a problem for me), the database users and modifying wp-config.php, I faced all the errors the author writes about and more, and had to search online for solutions. Updating WordPress core fails due to permission issues. Cannot install plugins or themes from the dashboard because of permission issues. Heck, even uploading media files, like photos for example, for a WordPress post requires permissions to be handled. Even the location where the site is stored has to be mounted first if you’d like to explore, modify files, etc. Don’t even get me started on the black box that is ProFTPD to configure FTP access to the site (neither the ProFTPD site nor the StackExchange Q&amp;A sites were very helpful)!<p>All this would be forgivable if the documentation was adequate. But I found the XAMPP site’s documentation to be really thin and sparse. One would think that the most popular blogging engine (WordPress) would be included in the documentation. But no, they just wash their hands of by pointing to Bitnami for installing apps, and that didn’t work for me either.<p>I can understand the XAMPP team focusing only on the basics, but the project has been around for a very long time and should cater to what most users may be using it for.<p>I recall that XAMPP (and the Bitnami stack) used to be easier to work with. Or maybe my memory of it isn’t good enough.<p>I also tried MAMP and gave up within minutes (forget about the free trial of MAMP Pro and upgrading to it).<p>All in all, XAMPP was a total disappointment and a very frustrating experience. I can only deeply empathize with the author who doesn’t seem to have as much exposure to dealing with systems at a lower level as I’ve had.<p>Right now, I would discourage anyone from trying XAMPP and MAMP (both on Mac; I don’t know if they’re vastly better on Windows or Linux). Just go with an online host with a good control panel and stop wasting your time.
评论 #24184258 未加载
评论 #24183661 未加载
mintonealmost 5 years ago
This is not a wordpress issue and I think it’s unfair to put your problems at its door. The issues you encountered would affect you with any PHP&#x2F;MySQL application if you chose to run the setup as you have. The optimum solution that I’ve found is Laravel Valet and SequelPro (Both free); valet is your server and SequelPro is your GUI for MySQL. Everything should “just work”.<p>The problem most likely stems from the fact that Wordpress tutorials are a very competitive space (ads) due to the widespread adoption of the platform, but many are either (a) not very good or (b) out of date. If you follow one that says to use xampp or similar then you will have an experience similar to your own. If you find one that says “use docker” you will have a needlessly complex experience. Tutorials like this should focus on the simplest way to execute something, but are too often written by inexperienced devs or worse, rehashed from other tutorials by marketeers looking to produce SEO friendly content (efficacy of advice be damned).
sevencolorsalmost 5 years ago
Laravel has a great tool called Valet. Makes running multiple instances of WordPress locally a breeze. You just point it to a folder and it creates a local [directory_name].test. Works great for static html too<p>Confused why the poster wanted to use GitHub pages. Sounds like a hassle considering hosting with Wordpress.com you point your domain too. ️
评论 #24181533 未加载
评论 #24181504 未加载
hirako2000almost 5 years ago
It takes a while to understand the wp modular system, that&#x27;s why people get paid to set it up and customise it for specific needs.<p>That being said, deploying WordPress takes minutes. And running it locally as well. Docker images are available if installing hundreds of libraries isn&#x27;t your thing.
aheckleralmost 5 years ago
As someone who works with WordPress every day, I can see both sides of the issue here.<p>Could it be easier to set up and run locally? Sure. Could it be easier to customize without knowing any code? Sure. But also, getting a dynamic CMS like WordPress to produce static output for use on GitHub Pages is a sort of &quot;square peg, round hole&quot; situation, and it&#x27;s not surprising that the author ran into some issues.<p>For running WordPress locally without mucking around with PHP, MySQL, and such, what you probably want is Local [1], which installs everything you need all in one go, and is quite user-friendly. You can spin up local sites in minutes, install whatever plugins you want, and go to town. (If you host with the company that makes Local, you can even deploy to live from inside the app.)<p>I haven&#x27;t used any of the plugins designed to make static pages from WordPress, but my gut read is that they probably aren&#x27;t going to work quite right unless you A) really know what you&#x27;re doing with WP, and B) you understand the limitations of your chosen static code generation tool. After all, WordPress is meant to be run in a dynamic environment with PHP, MySQL, and a web server. Shoehorning it into some other way of working might not end well, especially if you are new to WordPress.<p>Anyway, it looks like the author wound up on SiteGround, which as basic shared hosts go is one of the better ones. :) It&#x27;ll certainly be easier than running WP locally, generating static files, and deploying those to GitHub Pages.<p>[1] <a href="https:&#x2F;&#x2F;localwp.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;localwp.com&#x2F;</a>
withinboredomalmost 5 years ago
Just to point out a caveat with the original idea: all the posts would be stored in a local database. If something where to happen to it, it’s quite miserable to recreate posts from scratch, even if you have the source material. Don’t ask how I know.<p>PS, author, if you see this, make sure to use a child theme or custom plugin to make code changes. Otherwise a security update (which are usually automatic these days) will wipe out your custom changes.
loteckalmost 5 years ago
Publii is a local CMS application that generates static sites and pushes them to various platforms, including GH Pages.<p>Theme options leave something to be desired, though.
shiburizualmost 5 years ago
I recently started working on my own portfolio site, and I wanted to include a blog. I considered Wordpress to be way too overkill for what I needed, plus I wanted to write my own theme. Plenty of flat-file CMS software options exist, which would probably be more like what the writer needs.<p>Many here mention Publii which perplexed me when I saw it (a desktop app posing as a CMS which is just an SSG) but I guess the writer would actually be the perfect target audience for that.<p>I recently settled on Bludit since the web admin is very quick to get writing and still takes care of all the extra meta tags and fields without getting in the way of the writing, which is easy enough that I&#x27;ve installed it for some websites where non-tech people are using it just fine. Totally lamenting the lack of templating language but I&#x27;ve been managing.<p>It&#x27;s very odd that blog software for the layman tends to require so much setup and flat file CMS software are approximating but not quite achieving a dead simple setup and usage.
qzwalmost 5 years ago
Her blog requirements sound simple enough that I wonder if she couldn’t have just coded up a few HTML pages by hand. Or is that too 2001?
评论 #24181574 未加载
pacifikaalmost 5 years ago
I think the author has been unlucky really.<p>The installation documentation has good instructions on how to setup Wordpress. We use chassis (<a href="https:&#x2F;&#x2F;beta.chassis.io" rel="nofollow">https:&#x2F;&#x2F;beta.chassis.io</a>) to run And develop it locally. If you’re looking to develop your own theme or plug-in it’s worth checking out.<p>That said creating static sites is not a common use case so the author is finding out its not super easy. Prior to installation warnings are shown for out of date plugins, so she is unfortunate to have skipped them.<p>Setup an author user then you don’t have to worry about the administrative screens that might be confusing.<p>I’d suggest to give it another go as it’s worth being self hosted and being in control of your own setup, if you’re interested in learning about PHP and WordPress.
mozak1111almost 5 years ago
What we really need is a good static output generation built-in wordpress that actually works and downgrades successfully. Instead, the team decided to work on a page builder (Gutenberg) which was&#x2F;is far behind Elementor and the rest. Static generation is an absolutely essential feature in my opinion for having the peace of mind regarding security. I tried EVERY SINGLE one of the static generation plugins out there for a client project (avada theme&#x2F;elementor&#x2F;wpml) and none of them worked. (But apparently they do work if you use the SaaS version, not tried it myself)<p>So I guess Automattic will not solve it as it would hurt their wordpress.com business and if somebody comes up with a good static generation option will just turn into another SaaS offering.
评论 #24183700 未加载
johnchristopheralmost 5 years ago
I don&#x27;t understand how the author was able to set up a Jekyll&#x2F;github&#x2F;DNS&#x2F;markdown website and later hitting a roadblock with the whole Apache&#x2F;PHP&#x2F;FTP&#x2F;MySQL stack.<p>Is the root of all this the fact that github offers free hosting through github pages ?
jonwinstanleyalmost 5 years ago
Wow this article makes me feel old. Running wordpress locally is something I have done so many times in the past, but yes, I would not imagine it being a good fit for then turning it into a static site.<p>These days there are a lot of better CMS options for JS single page applications.
评论 #24181594 未加载
bookofjoealmost 5 years ago
FWIW I&#x27;ve used Typepad for my blog since 2004. I may be the only person in the world still using it, since it&#x27;s never ever mentioned as a WordPress alternative.
coldteaalmost 5 years ago
&gt;<i>Here’s what I know now: running WordPress locally is a nightmare. Successfully figuring it out was way harder than it should have been. If you’re trying to do this yourself, don’t. You most likely don’t need to, and there’s probably another solution you can use to get to what you want. (I should also caveat that I know almost nothing about Apache, MySQL, FTP, and PHP.</i><p>Running &quot;ls&quot; can be a nighmare too if you know nothing about filesystems, files, file types, flags, manpages, and so on.
pmlnralmost 5 years ago
The built in php -S can run WP just fine, albeit without url rewrites, aka nice permalinks. One still needs a mysql server though.
david_dracoalmost 5 years ago
Perhaps a wordpress.org instance can be wget&#x2F;httrack mirrored and uploaded as github pages.
richsu-caalmost 5 years ago
The TLDR is right at the end when I have already read the whole thing! :)<p>By the way, I recently migrated a weblog from Wordpress to Hugo on Netlifly. It was easy! Just add a post in GitHub and it automatically triggers a build in Netlifly and the post is live in seconds! You can also have your own custom domain for free.<p>Don’t have recent experience with Jekyll but can’t imagine it being that painful with the build&#x2F;customization.
plucalmost 5 years ago
&gt; &quot;However, I really don’t think I should have needed to learn about all of those technologies just to set up WordPress locally&quot;<p>Then you have no business being a developer
评论 #24181829 未加载
评论 #24182414 未加载