TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is moving my blog from WordPress to a static-site worth the tradeoffs?

10 点作者 loganmarchione超过 4 年前
I have a small personal blog on a self-hosted WordPress instance. I&#x27;m not a developer (more of a sysadmin), so I like the ease-of-use that WordPress offers and how everything mostly &quot;just works&quot; without having to hack together a solution.<p>However, I&#x27;d like to ditch the LEMP stack and just serve static files for all of their advantages (speed, security, git-based, etc...)<p>I&#x27;ve been looking at Hugo, Jekyll, and Pelican. However, I don&#x27;t want to lose features like search, comments, RSS, etc...<p>Does everyone who switches to a static-site generator make these sacrifices? I really like interacting with my readers in the comments and I think the search is really useful.<p>I&#x27;ve found things like Grav, which still use PHP, but ditch the database for markdown files. The PHP allows the use of search, comments, etc.., but obviously isn&#x27;t &quot;static&quot;.<p>I would appreciate any advice. Thanks!

15 条评论

dinkleberg超过 4 年前
It depends on what your goals are. If the point of your blog is to write content and interact with your readers, keep using Wordpress. If it ain’t broke, don’t fix it.<p>If you want to nerd out and build the ultimate blogging system and probably never write more than a couple posts, go the static site generator route.<p>I’ve been down this rabbit hole many times and every time I use a static site generator I end up writing a couple posts about SSG and then give up. My most consistent blogging was when I was using Wordpress or ghost.
评论 #26049097 未加载
abhinav22超过 4 年前
Why do you want to change? If what works, works, then no need to spend extra effort and just concentrate on the content of your blog.<p>Us tech people get caught up into a trap of trying to over optimize our setups. My favourite quote, applying it in a slightly different context that when it was originally written, is “Premature optimization is the root of all evil”.<p>Spend most of your time on what matters most, and only update your tech stack if it’s necessary (eg a static site could help reduce server bills - that’s a worthwhile reason).
blackcats超过 4 年前
I did this and all is well.<p>In terms of maintenance it can save you tons of time. For having to reset database server or doing migrations.<p>In terms of SEO you need to be very careful. WP does a lot of things right like canonical links, sitemaps and what not.<p>You can have comments on a static blog. I use static comments, I hacked together this solution: <a href="https:&#x2F;&#x2F;bsdnerds.org&#x2F;comments-static-site&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bsdnerds.org&#x2F;comments-static-site&#x2F;</a> But dynamic are possible with isso, disquz, and others for a few bucks.<p>Search is possible with some JS fiddling. I have no idea about RSS.<p>The magic keyword is “Jamstack”. You can do all dynamic parts with JavaScript and APIs<p>Just pick the generator wisely. I had quite a few annoyances with Hexo but I’m to lazy to convert to something else. Pelican seems quite good and Jekyll and Hugo have everything, but my Ruby and Go skills are rusty.<p>Overall it can save you many hours of time compared to wordpress. Plus you can use vim (or your favorite editor), plus less attack surface, plus can be decentralized so a lot faster. Google doesnt seem to care to much about speed, but the other benefits are worth it for me
butz超过 4 年前
If you have free time to spare, you could try building a clone of your current blog with one of static website generators and see if it works for you. Content from Wordpress can be easily migrated to markdown. As for losing features, worst one is probably comments, as it will require some sort of backend. Search could be handled by any search engine (if you don&#x27;t mind visitors leaving your site for search results), or even simple solution, that builds search index during website build. RSS is not a problem, as it will be rebuilt with website updates.
smlckz超过 4 年前
I know this is weird, but maybe have a look into Fossil ( <a href="https:&#x2F;&#x2F;fossil-scm.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fossil-scm.org&#x2F;</a> ). Not exactly a static site, but the whole repository (all posts, comments, etc.) is a single SQLite database file. And, fossil is a single binary that can be run as a standalone server, as CGI or FastCGI as well.
godot超过 4 年前
I have two sets of anecdotal experiences I can tell you about:<p>---<p>My personal blog -- a long time ago I&#x27;ve maintained a Wordpress blog, which have long been abandoned. The past 6-7 years I&#x27;ve maintained some articles on Medium (and more recently dev.to) instead, and about a year ago decided to fully move to my own, statically-generated site.<p>I love the speed and security and git-based (backed up by nature) structure. I decided to opt for utteranc.es for comments (no one ever commented anyway, heh), but there are also other options for hosted comments.<p>The thing that I did miss is a nice interface for writing. I thought I wouldn&#x27;t mind writing raw markdown files in a code editor, but I actually did. More recently I am experimenting with Netlify CMS, which works ok, but I&#x27;ll have to use it more before I decide if it&#x27;s good or not.<p>---<p>Another web site owned and maintained by a family member, which had been live for 20+ years -- I had to move it to a more modern system than just pure html files (thousands of articles pages!), and I chose something more like your latter option, but not exactly Grav. (I chose PicoCMS, which is also in PHP, and also file-based, with markdown files for content) It certainly allows the site to continue offering RSS feeds and other features with ease (a lot of plugins available with Pico). That site ended up going with hosted comments anyway so commenting wasn&#x27;t a factor.<p>There has pretty much been no drawbacks to this approach, other than using php and &quot;old tech&quot;. I do like that all the content files are now in markdown though, which allows for moving to full SSG in the future easily. To be honest, if you aren&#x27;t all about going with the trendy movement of SSG blogs, I think this option works totally fine. I can see this web site running with this same structure (and using PicoCMS) for years to come.
评论 #26056196 未加载
frompdx超过 4 年前
I also find myself wondering about this from time to time. For the last year I have written all of my posts in markdown first, and then converted them to html before publishing. So a markdown oriented workflow is really appealing to me. I don&#x27;t allow comments so that isn&#x27;t a concern. My site really could just be static at this point.<p>Some things that hold me back:<p>- The migration process. I don&#x27;t really want to invest a lot of time in migrating everything to a new tool.<p>- Automatic generation of things that are important to me like sitemaps. I would say RSS but I don&#x27;t think anyone actually subscribes to my RSS anyway.<p>- Media management. A lot of my posts include pictures. Something I really appreciate about WordPress is how easy it is to do things like adjust the size of an image for a given post as well as adjust how the text flows around the image. I know you can do all of this with CSS, but then I would have to memorize all of that. I nice compromise would be something like a modern day Front Page (in the sense of being desktop first) with in editor tools for things like linking to other pages, posts, and tags as well as adjusting image position and size.<p>- Analytics. I guess it isn&#x27;t terribly important. I don&#x27;t get a ton of traffic, but knowing how many page views I get is something that keeps me going regardless. I do hate how absurdly bloated jetpack is though.<p>What I really want:<p>- Markdown first authoring with some WYSIYG features for managing media, page links, tags, categories, and permalinks.<p>- Desktop first editor that uses git for storage and tracking changes.<p>- Automatic generation of sitemaps and rss.<p>- Some way to track page views.<p>- Easy migration from WordPress. Ideally it will be something like &quot;install this plugin and download the export of your blog&quot;.<p>- Configurable theming. It&#x27;d be nice to have a way to put together different wrappers for your site with the CSS lib of your choosing.<p>- Export everything as a nice static bundle that is easy to deploy from the desktop tool.<p>There is probably more that I can&#x27;t think of right now. I&#x27;ve often thought of building something myself, but that would take away from my writing time. In the end I always end up sticking with WordPress because it mostly does everything I want it to do.
ecesena超过 4 年前
With Jekyll hosted on Github pages you can have search and RSS. I never tried comments but a quick Google search shows several results, I&#x27;m sure you can find the best one.<p>For search, I have this example [1] (source code: [2]). This is docs instead of a blog, but it&#x27;s really just the theme... I didn&#x27;t have to do anything for search to work.<p>Hope this helps.<p>[1] <a href="https:&#x2F;&#x2F;docs.saasform.dev" rel="nofollow">https:&#x2F;&#x2F;docs.saasform.dev</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;saasform&#x2F;saasform&#x2F;tree&#x2F;main&#x2F;docs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;saasform&#x2F;saasform&#x2F;tree&#x2F;main&#x2F;docs</a>
waldekm超过 4 年前
A while back I switched from hosted Ghost blog to Jekyll. My content is stored in markdown on GitHub. I publish the site on Netlify. For comments I’m using Disqus and for search Azure search.<p>I love the simplicity of the setup and the fact that there are no updates I must run to avoid security vulnerabilities or other issues or that I must make regular backups and test if they work. I can rebuild the whole site simply by pushing a commit to the repo. For a blog or a simple site I find SSGs totally worth it.
评论 #26049023 未加载
seanwilson超过 4 年前
For search, would embedding Google search be good enough? See: <a href="https:&#x2F;&#x2F;support.google.com&#x2F;programmable-search&#x2F;answer&#x2F;4513751?hl=en&amp;ref_topic=4513742&amp;visit_id=637482354039135487-1593896293&amp;rd=1" rel="nofollow">https:&#x2F;&#x2F;support.google.com&#x2F;programmable-search&#x2F;answer&#x2F;451375...</a>
nunodonato大约 4 年前
Try kalaksi.com I have been using it daily instead of my blog now ;)
the__alchemist超过 4 年前
What you&#x27;re looking for is covered by a middle-ground: You&#x27;ve examined WordPress, and static sites - consider a non-static, non-WordPress site, where you implement the features you&#x27;re looking for using server-rendered forms, or targeted Javascript.
1123581321超过 4 年前
Consider switching to hosted comments (Disqus, etc.) and serve a static cache of your WP site.
rovr138超过 4 年前
Alternative, there are plugins to export your Wordpress site and make it static.
jes超过 4 年前
I have the same question. Thanks for asking it.