News for hackers. Stuff that matters.
Re:I tried to use WordPress with GitHub Pages by oneeyedpigeon on Sunday August 16, 2020 @05:59PM (#24181725)
I think your response would be unfair. If you think about the statement "running this software is a nightmare if you know nothing about the technologies it is built on" outside of this context, it clearly doesn't typically apply. You wouldn't apply that to using a web browser or a word processor, right? Should 'blog writing' software really have such a greater barrier of entry?
Re:I tried to use WordPress with GitHub Pages by macspoofing on Sunday August 16, 2020 @06:11PM (#24181798)
>I think your response would be unfair.

I don't think so. The author actually gave themselves a weird goal - to use Wordpress as the text editor, and export/copy the static content to github. I'm not sure why they would do that, but OK! In the end, their problem wasn't with the workflow but with setting up local version of Wordpress (why? why not use a hosted version of Wordpress????), PHP, Apache, MySQL and FTP(!!).

WordPress isn't actually that hard to setup. It's a little harder on Windows, because setting up PHP on Windows just isn't as natural as on Linux but XAMPP makes it as easy as possible.

>Should 'blog writing' software really have such a greater barrier of entry?

But it doesn't. You have a plethora of (free) hosted blogging solutions. You could also get private hosting with the LAMP stack already pre-installed and configured.

Re:I tried to use WordPress with GitHub Pages by manigandham on Sunday August 16, 2020 @06:17PM (#24181839)
Why someone would do this: Wordpress has a solid editor, lots of plugins, and is used by millions so the workflow is well tested. The resulting pages are a perfect fit as static content.

You can accomplish this by using a CDN that caches everything, or use plugins that export static files like WP2Static, or use integrations with static site frameworks like Gatsby that treat WP as a CMS.

But yes, doing it all from scratch yourself is probably not worth it, especially if you're unfamiliar with the tech.

Re:I tried to use WordPress with GitHub Pages by macspoofing on Sunday August 16, 2020 @07:49PM (#24182400)
>Why someone would do this: Wordpress has a solid editor, lots of plugins, and is used by millions so the workflow is well tested.

Sure - why not. The question, why do you need to host it locally? You can just create a free account on wordpress.com, or get a private hosted solution for peanuts and with the LAMP stack already configured.

Re:I tried to use WordPress with GitHub Pages by disgruntledphd2 on Monday August 17, 2020 @06:56AM (#24185993)
But to be fair, the authors core point is correct - running Wordpress locally and then deploying to the internet is an absolute tire-fire.

For context my wife uses wordpress to build various sites. I got lumped with the task of moving this online. It was super painful, as WP encodes the URL name (i.e. localhost) flipping everywhere.

I eventually resolved this by editing the tables which stored the URLS (fortunately, as a DS I know SQL) and doing some sed on various files that cached the URL.

I now refuse to do this, and set her up online with a website before she does any work, because moving it is so painful.

Re:I tried to use WordPress with GitHub Pages by hunter2_ on Monday August 17, 2020 @07:37AM (#24186229)
Re:I tried to use WordPress with GitHub Pages by disgruntledphd2 on Monday August 17, 2020 @08:13AM (#24186458)
Many packages store the raw URLs in the DB, and don't respect the change of that setting. At least that was my experience.

I did try the obvious things first, to be fair.

Re:I tried to use WordPress with GitHub Pages by tacone on Tuesday August 18, 2020 @10:37AM (#24199083)
You need to use wp-cli to carefully find and replace urls and filesystem paths inside the db. Many professionals don't even know about it.

Another way is to perform the find and replace with PhpMyAdmin.

Re:I tried to use WordPress with GitHub Pages by tacone on Tuesday August 18, 2020 @10:40AM (#24199117)
Forget what I said about PhpMyAdmin, you can't edit serialized blobs easily. Wp-cli is the way to do it.
Re:I tried to use WordPress with GitHub Pages by disgruntledphd2 on Tuesday August 18, 2020 @11:04AM (#24199510)
Or you could just use SQL (which is what I did).
Re:I tried to use WordPress with GitHub Pages by tacone on Thursday August 20, 2020 @11:29AM (#24224253)
No, you would invalidate all PHP serialized blobs. Things may keep working, but you would lose some config/data.
Re:I tried to use WordPress with GitHub Pages by disgruntledphd2 on Friday August 21, 2020 @04:55AM (#24233265)
Apologies, SQL for almost everything, and sed for the text files that didn't get updated.

It appeared to work a few times (or at least my wife/her customers didn't complain).

Re:I tried to use WordPress with GitHub Pages by manigandham on Sunday August 16, 2020 @08:19PM (#24182546)
Yes, that's what the last sentence is about.
Re:I tried to use WordPress with GitHub Pages by forgotmypw17 on Monday August 17, 2020 @09:44AM (#24187131)
>why do you need to host it locally?

offline editing?

Re:I tried to use WordPress with GitHub Pages by coldtea on Sunday August 16, 2020 @07:05PM (#24182150)
>Should 'blog writing' software really have such a greater barrier of entry?

It doesn't.

You can open an account on Wordpress.org and be writing your blog in 1 minute.

You can use your virtual hosting's manager to install Wordpress and be running in 10 minutes.

You can download MAMP or WAMP (packaged Wordpress + MySQL + Apache + PHP) and be running locally in 15 minutes.

This guy wanted to do an install locally manually, patch it to produce static pages (which is not what it was made for0, hook it up with GitHub pages, and so on. And all that without bothering to know how.

Re:I tried to use WordPress with GitHub Pages by frereubu on Sunday August 16, 2020 @08:00PM (#24182457)
Small nit just for clarity: you mean "open an account on wordpress.com" - wordpress.org is the self-hosted version.
Re:I tried to use WordPress with GitHub Pages by coldtea on Sunday August 16, 2020 @10:25PM (#24183284)
Yeah, .com
Re:I tried to use WordPress with GitHub Pages by todotask on Sunday August 16, 2020 @09:44PM (#24183045)
Open an account on WordPress.com, you need to account for unforeseen downtime which is probably hosted on GoDaddy.
Re:I tried to use WordPress with GitHub Pages by todotask on Friday August 21, 2020 @08:47PM (#24240575)
Don't understand the downvote, it's a fact that downtime does happen.
Re:I tried to use WordPress with GitHub Pages by jay_kyburz on Sunday August 16, 2020 @06:04PM (#24181750)