Live data from Hacker News

Whitehouse.gov Chooses WordPress, Again

pagely.com

121–130 of 371 posts

Re: Whitehouse.gov Chooses WordPress, Again

#121
WordPress is definitely the Jenkins of the CMS world. Easy for a desktop user to set up, absolutely trash for literally every best practice, but nobody's made anything better [for free] yet.

If you are trying to deploy WordPress today with DevOps best practices (version control/12 factor app/etc): set it up with Bedrock (https://roots.io/bedrock/), manage dependencies with Composer, and use environment variables for the runtime configuration. Then use Phinx (https://phinx.org/) to do database migrations. A custom db migration script will be needed to change database settings based on the environment you're deploying to.

Containerization is pretty annoying, because apparently php-fpm will not serve non-PHP content (without creating security concerns). So you need a web server to serve all the static content that comes with Wordpress/Plugins/etc, and php-fpm to serve the PHP. This means you have to either 1) duplicate the static content between two different containers, 2) duplicate the static content into some other storage medium (S3?) and serve it using some web server, or 3) create a frankenstein's monster container of both php-fpm and a web server, and pick your poison on how to make that suck as little as possible.

I have opted for #3 as operationally it's the simplest. You build one container with all the dependencies, static content, and sql migrations, and deployments therefore become just a single container with a single port (http/https) and passing in the env vars. I'll probably upload it somewhere if somebody wants it. It's a docker-compose configuration, plus the Frankentainer, and some scripts, and it all fits into a Bedrock install. I haven't hooked migrations up to it yet, but once that's done, it will actually not suck very much to maintain a WordPress install.

Re: Whitehouse.gov Chooses WordPress, Again

#122

Earlier quoted context omitted.

You touch on a really good point here about the default cron setting (yes, it still uses the lazy cron on page load by default.) From a developer point of view this is questionable at best, but from a business point of view I reckon decisions like these are the core of why WordPress is popular. You don't have to know what cron is to install a WordPress site. You don't have to know anything about git or setting up var…

I realize that it's really written for end users instead of developers, but that means scares me every time I see something as high profile as the White House using it. For the exact reason as you say here: "it's easy to shoot yourself in the foot and get your site hacked". WP is absolutely NOT secure by design; it's a hot mess that has helped normalize ignoring security in our web applications. That we encourage its…

Hopefully the White House has access to someone who knows how to set up WordPress without shooting themselves in the foot.

The fact that WordPress.com doens't get hacked all the time means that there are definitely people who know how to do it.

Re: Whitehouse.gov Chooses WordPress, Again

#123
post #115

> Political affiliations aside, I think we can all breathe a bit easier today knowing they didn’t choose Drupal. Strongly disagree. Drupal is a great CMS and there's a reason the government uses it so extensively.

I was a Drupal dev for ~10 years. Once upon a time, I built many sites with it, and I recommended it to many folks. Despite its flaws (and it always had flaws), it was a great piece of software in its heyday, and it had (and still has?) an amazing community. I'd still choose it over WordPress any day. But the days when I'd recommend either of them (or indeed anything in PHP) are long gone. Your best bet now is probab…

There is nothing wrong with Wordpress and the LAMP stack. It’s fine for many great use cases. It powers, and will continue to power many of the biggest sites in the world.

Static sites are a tradeoff, and you’re often dealing with other messes especially with non-technical users.

Re: Whitehouse.gov Chooses WordPress, Again

#124
post #101

Earlier quoted context omitted.

> You don't have to do this, you can set up sane permissions and use the wp cli[0] tool to install updates manually. I prefer to version sites with git and install updates locally, then git pull down on to the live server. Curious as to how you manage WP with git, particularly around when new files are added by core/plugin updates, which I've always found a bit of a hassle to deal with?

I keep things really simple to be honest, normally I exclude wp-content/uploads and wp-config.php in .gitignore. And set the perms so WP can't write to the filesystem on production, except for the uploads directory. We install and test updates on a dev environment first then commit everything and pull it in on production.

If you don't let production write to the filesystem, doesn't that get rid of one of the main advantages of WP, that users can configure the site by adding plug-ins and such? Or on the 100s of sites, you are responsible for all the plug-ins?

Re: Whitehouse.gov Chooses WordPress, Again

#125

Earlier quoted context omitted.

Wordpress also has a really rich ecosystem of mature and widely used plugins that are quite easy to install. The podcast ones for instance, they'll allow you to schedule the publishing of a new episode, then upload the episode to all the major platforms, format the images, titles and descriptions automatically for the different platforms, cross post to the social media accounts announcing the new episode, allow you t…

I excluded plugins because additive functionality and ecosystem are independent of the core product, but yes Wordpress (and server-side apps) can be extended to do much more than a plugin in a static build process.

Evaluating WordPress without its plugin ecosystem is like evaluating Linux or github or node.js without its developer ecosystem. Of course the bare platform will be worth a lot less without the social networking effect and the diverse applications it supports.

Re: Whitehouse.gov Chooses WordPress, Again

#127

In this age where the trend is JAM stack, it is refreshing to see that something battle-tested like WordPress was chosen. There's a reason WP has withstood the test of time. (WordPress developers being a dime a dozen also help make the case)

I think if WP ever finds a way to do two things:

- continuously serialize WP to static files

- Make it easier to work with Wordpress as a CRM (No Code or at the very least don't force developers to touch PHP)

JAM stack would near instantly cease to make any business sense (though developers would still love using it of course).

A lot of the issues with Wordpress are sort of long-tail -- combinations of plugins exposing leaks in the abstractions, etc.

BTW, if anyone is working on solving this, I'd love to know about it.

Re: Whitehouse.gov Chooses WordPress, Again

#128

I predict they'll move to Jamstack soon. I've really been impressed by the things I've seen moved to Next.js in the last couple of years.

I am not sure. A major problem with Jamstack is that article writers need to learn git and markdown, to do the job.

While wordpress gives you a GUI editor, and you are good to go

Re: Whitehouse.gov Chooses WordPress, Again

#129
post #4

I hope we again see the value of using systems like Wordpress for it’s simplicity in getting a blog/website setup and easily modify content. Lately most of the modern marketing websites I see is built using gatsby and next.js. Having been talking to different content/marketing teams, they hate it so much because of the complexity it brings. Editing content? Sign in to this headless CRM app, want a form? Go sign in to…

Simplicity? Perhaps in its use, but not the code. The code and hosting requirements are, frankly, Frankenstein's monster levels of frightening. ~~You have to~~ WP expect you to install it such that it can modify its install folders - all of them. Security-fucking-nightmare. It will use incoming requests to trigger "cron" jobs (which can include self-upgrades), via a non-loopback HTTP request. It falls apart under any…

So much this. It's been a bit over five years since I had to run it, but this is what I remember.

If you run multiple webservers, upgrading is extra fun, because when you upgrade, it assumes it can update the mysql schema (which is pretty much totally insane; a www-user writable php script shouldn't be able to create/remove/alter tables). The best way I found was to make a copy of the database, install the new version of Wordpress pointing at the new DB, thoroughly test, and then deploy new version pointing to new DB; then kill the old DB.

And woe is you if your webservers are geographically distant, because there's no way to send reads to a nearby DB mirror; and there's no way to run in read-only, because pingbacks still write to the DB even when they're disabled.

One of the best weeks of my last job was when I was able to finally convince my boss to replace Wordpress for our static company blog with a series of Makefiles and simple PHP to smoosh in all the translations.

Re: Whitehouse.gov Chooses WordPress, Again

#130
post #45

Earlier quoted context omitted.

From an operations perspective, gatsby and next.js are much simpler though. You are just deploying static content behind a webserver or even something like s3. Horizontal scaling is almost trivial. With wordpress though, you have to worry about a database as well, scaling is more complicated, you need to run php on your webservers (which has security implications), updates that include schema updates frequently requi…

Wait, what non-trivial site doesn’t require a database?

Most corporate blogs with comments disabled would be fine as a filesystem, rather than a database.
Post reply on HN