[HN Gopher] WordPress Playground: A WordPress that runs entirely...
___________________________________________________________________
WordPress Playground: A WordPress that runs entirely in the browser
Author : disadvantage
Score : 275 points
Date : 2023-07-14 16:57 UTC (6 hours ago)
(HTM) web link (developer.wordpress.org)
(TXT) w3m dump (developer.wordpress.org)
| synergy20 wrote:
| Gosh this is truly snappy, does that mean we shall run all the
| stuff on WASM now? very impressive.
| adamsss wrote:
| [dead]
| inportb wrote:
| Ooops! I suppose it does not work in private browsing mode.
| Reptur wrote:
| Its cool and I get it, but how is this useful other than good
| marketing? If an app's code is run on a device, any rooted device
| could just modify its memory and do whatever it wants. Just ask a
| game developer about the infinite anti-cheating war that they
| deal with.
| wzy wrote:
| > ...any rooted device could just modify its memory and do
| whatever it wants
|
| Like what? Change a heading? Or, create a blog post that only
| exists on this device?
| desas wrote:
| Could you expand? I don't follow.
|
| WordPress is open source, you can already download it and do
| whatever you want.
| nilslindemann wrote:
| Apply the following styles, and it will become a practical tool:
| ._wrapper_5didy_26 { padding: 0; height: 100%;
| } ._window_5didy_31 { max-width: none; }
| ._experimental-notice_5didy_9, ._toolbar_5didy_64 {
| display: none; }
| ComputerGuru wrote:
| Really cool tech behind this demo! I wish I could see the
| realtime php error/warning log (configured to log everything, of
| course); it would be interesting to see how perfect this
| simulator is, especially with the SQLite db rewrite.
|
| It's also awesome how easy it is to use this to test out a plugin
| (or a theme) - you just need to add &plugin=plugin-slug-from-dir
| where the slug matches the plugin's WordPress.org url and it'll
| be automatically downloaded and added to the sandbox!
|
| The full query api used to configure the sandbox (tech and loaded
| env) is documented here [0].
|
| [0]: https://wordpress.github.io/wordpress-playground/query-api/
|
| EDIT
|
| I'm absolutely positive there has to be a way to open or show a
| debug log (if only because I wouldn't have been able to develop
| this without that)!
| wouldbecouldbe wrote:
| Php & WordPress were fun. With that ugly php tag you could get
| pretty much everything working on the web.
|
| All you had to do was edit, save & refresh. No rebuild of code,
| server restart, compiling Just edit & save.
|
| Did it have the tendency to get ugly? Sure. But it was easy,
| quick and fast. Not every blog and needs a git flow, united, e2e,
| type-safe double encrypted dev environment.
|
| Both PHP & WordPress got shamed for their dirty nature so much
| that they are in identity crisis. PHP tries to mimmick Java as
| much as possible. WordPress plugin structure is a disaster.
| Having to run an entire npm project for every plugin, no easy
| data saving helpers, etc. Let alone the ux-disaster of the block
| Editor.
|
| Feels like the php decade is truly over. And it was php that
| killed itself.
|
| Laravel is a joy btw.
| 8n4vidtmkvmk wrote:
| Laravel is not a joy. It moved everything in the wrong
| direction by adding a ton of magic (which murders IDEs) and a
| ton of version churn.
| redox99 wrote:
| > All you had to do was edit, save & refresh. No rebuild of
| code, server restart, compiling Just edit & save.
|
| The majority of webdev is either exactly like that, or
| effectively like that with very fast rebuilds/restarts. It's
| not really something unique to PHP.
|
| In fact in your modern stack you'd probably have autosave, and
| most importantly "fast refresh", so you don't need to manually
| refresh and you don't lose state.
| sublinear wrote:
| Can we just throw wordpress in the trash instead already?
|
| It sucks at everything. It's not a good CMS, its plugins are
| awful, PHP is a dumpster fire, every web developer hates it, etc.
|
| This is also pointless as a tech demo.
| wzy wrote:
| That must explain why WordPress' market share has been trending
| downwards for the last 20 years, right?
| EGreg wrote:
| The question is -- how does your WebAssembly in the browser run a
| server that can listen for incoming requests and serve the page?
| I don't get that part at all.
| nickserv wrote:
| The elegant architecture of WordPress and its plugins coupled
| with the low resource use of client side rendering, what's not to
| love?
| ravenstine wrote:
| This playground, which is running PHP in WASM, is much snappier
| than 95% of garden variety websites.
| noahtallen wrote:
| I think the coolest thing about this is you avoid so many round
| trips to the server. Every single database call and asset
| request happens on the client! (After you accept the several
| seconds of loading time.) I think it's also hilarious, because
| WordPress is probably the most-used MPA solution out there, but
| this basically turns it into an SPA. And it performs even
| better than most SPAs, because it doesn't need to do API
| requests to a server constantly.
|
| I also think the SPA parts of this (the post/page and site
| editors are very complex React applications) feel snappier in
| this demo than they do on my local dev environment. Really
| shows how good SPAs can be when you cut out server round trips.
|
| Disclaimer: I work for Automattic, and this has been a super
| cool experiment to watch.
| [deleted]
| hbcondo714 wrote:
| Very modern how they got this to work: PHP runs
| as a WebAssembly binary MySQL is replaced for SQLite
| via a WordPress plugin Web server is implemented in
| JavaScript as a Service Worker
| calibas wrote:
| Neat, and here's more info on how they did it:
|
| WebAssembly PHP: https://wordpress.github.io/wordpress-
| playground/architectur...
|
| Service Workers: https://wordpress.github.io/wordpress-
| playground/architectur...
| radium3d wrote:
| Interesting, seems the dedicated worker in chrome task
| manager is utilizing 1,135,948k of memory
| coder543 wrote:
| The browser task manager may claim that, but actually
| watching Windows Task Manager, my total memory usage
| increases by about 300MB when I visit the playground, not
| 1GB. Maybe a lot of the memory is uncommitted.
| DaiPlusPlus wrote:
| > 1,135,948k of memory
|
| That's 1.1GB.
|
| That's horrifying because, theoretically, it should be a
| tiny, tiny fraction of that: on bare-metal we can run PHP +
| MySQL (let alone SQLite) + Apache within a few dozen MB of
| RAM.
|
| (Historical personal anecdote: my first-ever dev-server
| machine I built before high-school ran Windows Server 2003,
| IIS, SQL Server, and Adobe Photoshop 7.0 (in a Terminal
| Services session) concurrently just fine well-within 256MB
| with little-to-no paging)
|
| Let's be generous and assume that 64MB should be a
| reasonable upper-bound (though I think that getting it
| under 16MB should be possible), in which case _what
| exactly_ is the other 1.09GB of RAM being used for?
| benatkin wrote:
| > in which case what exactly is the other 1.09GB of RAM
| being used for?
|
| Wrong answers only?
| projektfu wrote:
| Caching alternate data streams
|
| Dr. Watson
|
| McAfee antivirus
| projektfu wrote:
| In like 1997 I was doing some work with a 5x86-133 with
| 24mb ram and a 2gb disk, running NT 3.51, MS SQL server,
| IIS and Visual Studio 4. IIRC, the servers usually ran in
| less than 500kb committed each.
| sangnoir wrote:
| > That's horrifying because, theoretically, it should be
| a tiny, tiny fraction of that: on bare-metal we can run
| PHP + MySQL (let alone SQLite) + Apache within a few
| dozen MB of RAM
|
| Only being half-facetious here: if the old stack was so
| great, why aren't you still using it? I know someone who
| swore by ColdFusion, but won't use BlueDragon or Lucee
| because the world has moved on from CFML; templated HTML-
| generation on the server is no longer the only game in
| town
| radium3d wrote:
| Difficult to say without proper debugging tools. Chrome
| dev tools seems to cause it to not run for me.
| revskill wrote:
| When will i have useState in PHP ?
| slig wrote:
| Just use `$_SESSION`.
| calibas wrote:
| Yes, it's outrageous that it's taken so long to implement
| React-specific functions in PHP!
| capableweb wrote:
| You have it already :) $_POST
| revskill wrote:
| _POST is enough ? Why $ here ?
| bamfly wrote:
| Are you... asking when you'll get a feature in PHP while
| not knowing it employs sigils on variable names?
| revskill wrote:
| Maybe, it's redundant to waste my seconds of life.
|
| One second to write.
|
| Some seconds to read and parse those $$$.
| imilk wrote:
| What a bizarre attitude to have. You could also save tons
| of seconds by not using indents in Python or brackets in
| JS. But then you would also not have working code.
| orkj wrote:
| Genuinely curious: does this mean you can run WordPress as a
| cloudflare worker (ignoring database for now)?
| https://developers.cloudflare.com/workers/runtime-apis/webas...
| miahwilde wrote:
| Note sure, but I like how you think.
|
| there is this: https://ma.rkusa.st/store-sqlite-in-cloudflare-
| durable-objec... and this:
| https://developers.cloudflare.com/d1/
|
| So I'm thinking it could (be made to) work.
| orkj wrote:
| I did know of those, I'm just assuming its going to cause
| some sort of problem with network calls and sockets and what
| not (they mention this specifically as part of the caveats)
| orkj wrote:
| Replying to myself. I guess I read that a bit too quickly:
|
| > In Node.js, the answer involves a WebSocket to TCP socket
| proxy, Asyncify, and patching deep PHP internals like
| php_select. It's complex, but there's a reward. The
| Node.js-targeted PHP build can request web APIs, install
| composer packages, and even connect to a MySQL server.
|
| Hm, that sounds very interesting and promising
| edoardo-schnell wrote:
| Next up: a WordPress plugin to host WordPress playgrounds
| em3rgent0rdr wrote:
| Its WordPress all the way down.
| geocrasher wrote:
| I'm curious as to how useful this will be. Tying it to SQLite
| makes it portable, but abstracting it so that it can be used with
| any db would be far more powerful. Why? Because the SQLite
| implementation is enough to get it working in the browser, but it
| does not make WordPress 100% SQLite compatible. For example, a
| WordPress site built on MySQL can't be migrated into an SQLite
| powered WordPress using a common migration plugin. I know,
| because I tried.
|
| I installed WordPress in a standard PHP environment, and use the
| db.php dropin and SQLite compatibility plugin, and actually got
| WordPress installed on the file system. It works, but when I
| tried to migrate using all-in-one-wp-migration, it failed.
|
| A neat concept with niche use, but not a panacea for agencies and
| other devs who need an extensive playground, even if it's self
| hosted on a persistent PHP server.
| dmsnell wrote:
| the Playground can connect to a MySQL instance when running in
| a Node environment. it's not supported in the browser because
| there's no existing mechanism to relay the necessary socket
| connection there.
| danielbachhuber wrote:
| > For example, a WordPress site built on MySQL can't be
| migrated into an SQLite powered WordPress using a common
| migration plugin. I know, because I tried.
|
| Out of curiosity, how recently did you try?
|
| We're using a new SQLite integration that seems to be pretty
| good at translating SQL to SQLite:
| https://github.com/WordPress/sqlite-database-integration
|
| We'd be curious to learn more about how it failed. It's
| definitely an area we'd like to improve.
| geocrasher wrote:
| Ok, didn't expect that response! I tried this today.
|
| I admit I didn't try super hard- I have a lot of other things
| to work on, was a 20 minute curiosity mission. I just
| downloaded the zip file and grabbed the files out of that.
| Don't get me wrong- it worked- but I couldn't do an import as
| mentioned.
|
| If you want lots of detail, I can spend more time on it.
| Email me at my hn user at the google mail.
| Giorgi wrote:
| As a side note, I wonder if WP will still be in demand after all
| these chatbots come into daily usage
| handzhiev wrote:
| WordPress is an utter crap in terms of DB design and code. Most
| plugins are even worse and the whole thing is a total mess.
|
| Yet, if you have a client needing this and that you can have them
| started really quick with WordPress. Need an e-commerce? There
| are plugins for that. Need an event management? There are
| plugins. Need an obscure app for truck drivers to share their CVs
| and communicate with clients? There is probably a plugin for
| this. If there isn't, you can use one and modify it - it's all
| open source.
|
| It's definitely wild and ugly and crap, and sometimes is totally
| pathetic but the ecosystem is huge and has everything for
| everyone.
| imilk wrote:
| The backend is a terrible mess. But most of the time WP sites
| are served as cached static assets to the end user so you can
| still get the load times pretty good (despite the dumpster of a
| backend/DB).
| handzhiev wrote:
| When they are content sites, yes. When there is ecommerce and
| other dynamic stuff - not so much. I'm often optimizing WP
| sites after the arsenal of the typical developer - caching,
| redis object caching, etc - has been wiped off. The db
| structure and poorly optimized queries are a real pain.
| fredley wrote:
| WordPress was where I got my start, a while ago now. From poking
| around with PHP files, to building my own things, to Django, and
| on.
|
| It would have been inconceivable back then (mid noughties) that
| the whole thing could be done client side. The Web has come on a
| long way.
|
| These days I tend to hate WordPress with a passion. Occasionally
| I will be asked to peek at some technical problem with a
| WordPress installation and it's never not like opening some awful
| Pandora's box of out of date, brittle, scary plugins, these days
| most of which seem to be trying to upsell via ads in the admin.
|
| However I will always be thankful for WordPress and what it
| enabled in its heyday, and say a silent prayer of thanks every
| time I think of the people tasked with keeping creaking old sites
| alive.
| bamfly wrote:
| Wordpress is one of those things I've plenty of experience
| with, but leave off my resume and avoid mentioning to bosses
| and colleagues, so I won't get roped into that bullshit if it
| comes up--and it _often does_ , sooner or later.
|
| "Wordpress? I can take a look if you need me to, but I don't
| really know much about that. I think Fred said something about
| Wordpress the other day, maybe ask him...."
|
| I've known others who confided they do the same thing. I think
| it's fairly common.
|
| Plus the PHP market, and _especially_ the Wordpress market,
| doesn 't tend to do great in the compensation department (short
| of making and selling a successful plugin yourself, anyway) so
| I'm not exactly eager to put more weeks/months/years of
| experience in that column when it's not worth much.
| jchw wrote:
| Similarly, I do not mention to anyone that I have touched
| Drupal in the past.
| ceejayoz wrote:
| I'd happily put "completed a major Drupal version upgrade"
| on mine, if I'd ever successfully accomplished it. I think
| it was 6 --> 7; still gives me the willies to think about
| that attempt. Seeing that on a resume would be an immediate
| "wow, this person can handle a complex migration..."
| cyrialize wrote:
| Oh man, I have tons of experience with WordPress AND Drupal
| early on in my career. Good call, I'm not going to have
| these on my resume haha.
| cyrialize wrote:
| I have thought about making a plugin.
|
| The plugin documentation/architecture is a bit gnarly (at
| least from what I remember). That being said, I feel like
| most WordPress plugins are awful.
|
| I've sometimes wondered if I could make a better version of X
| plugin, but I fear I'm missing something - like providing
| customer support or covering every version of WP.
| ravenstine wrote:
| The plugins are both awful and brilliant at the same time.
| Well, maybe not so much today. But back before I knew I
| what I was doing, back before Ruby On Rails really took
| off, it was pretty awesome to have a Wordpress blog,
| install a plugin, and suddenly you've got a fully fledged
| forum section on your site.
|
| Of course the architecture and the mode of installation for
| those plugins used to be _horrendous_ and fraught with so
| many problems.
| bamfly wrote:
| The customer support and testing are key challenges. You
| have to be ready to help people with things that aren't
| even your fault if you don't want your rating on the
| marketplace(s) to go to shit. Plus you'll need to do lots
| of sales/ads/marketing to get your zero-ratings zero-
| downloads plugin off the ground, no matter how good it is.
| Writing a decent and useful plugin is helpful (almost wrote
| "necessary", but it's actually not--at least the "decent"
| part) but isn't sufficient to have a _successful_ plugin.
| cyrialize wrote:
| > You have to be ready to help people with things that
| aren't even your fault if you don't want your rating on
| the marketplace(s) to go to shit.
|
| Ah, that makes a lot of sense. Now I /definitely/ don't
| want to make a plugin.
| devmor wrote:
| >Plus the PHP market, and especially the Wordpress market,
| doesn't tend to do great in the compensation department
|
| WordPress work certainly doesn't pay a lot, but for PHP in
| general there's a large cavern in the middle. You can get
| very, very high salaries/contract rates as someone
| experienced with PHP if you are extremely experienced with
| PHP - specifically because so few people are willing to stick
| with it to that point. There are just a lot of legacy systems
| in very large companies that run on it.
|
| So if you already have the experience, it can be worth it. If
| you don't, then trying to get mid level or even "low senior"
| PHP jobs probably isn't worth it compared to another
| skillset.
| bamfly wrote:
| Yeah, I know there _exist_ high-paying PHP jobs, it 's just
| that finding a PHP job that pays as much as Swift or C# or
| Java or Javascript or [insert almost anything else here] is
| usually relatively challenging.
|
| I don't mean that there are zero people making good money
| in PHP, just that it requires flying a rather tricker and
| less-certain course to get there, than with other options.
|
| I really _might_ put PHP top-of-page--at least, in some
| contexts--if marketing myself as a high-priced contractor,
| for the reasons you mention... but, in hunting for ordinary
| jobs, I no longer even bother looking at PHP listings. Too
| much chaff, not enough wheat, and it 's been like that for
| a decade or more. Just way easier to find an employer with
| compatible pay expectations, with other languages, if we're
| talking run-of-the-mill jobs. Shorter searches, more-
| consistent outcomes.
| whyage wrote:
| What no-code alternative would you recommend for pro web
| designers?
| kidfiji wrote:
| Although it isn't open source, Webflow seems to be the
| current most popular thing for that specific niche (low/no-
| code platform for designers)
| hakube wrote:
| Webflow
| 8n4vidtmkvmk wrote:
| Wouldn't say "pro" unless you get strictly mean design and
| not functionality. In which case I'd have recommended
| Photoshop which is what I used for design only 20 years ago,
| but I think the UX folks like Figma or something these days.
| Giorgi wrote:
| I would recommend Kirby, it is not all there, but is getting
| there.
| carlosjobim wrote:
| You can't design anything in WordPress without code. Unless
| you count installing a theme as "design".
|
| If you're a pro web designer you should know CSS. Then
| there's some good alternatives.
| mthoms wrote:
| I might have misinterpreted your comment, but there are
| plenty of site builders for WordPress (WYSIWYG-ish
| editors). Granted, you can only do so much without knowing
| CSS.
| infp_arborist wrote:
| Wordpress + Oxygen/Bricks/...?
| imilk wrote:
| Wordpress is still great for downloading a theme from
| Themeforest to get brochure style sites (restaurant, simple
| small business, etc) up and running pretty fast. It is not
| great (possibly horrendous) for revisiting a few years later
| when all the plugins/theme/core needs to be updated and a
| bunch of different people have added custom JS/CSS all over
| in random places.
|
| It's hard to reconcile "pro web designer" with no-code
| though. Having said that, my preferred stack for something
| that involves more than a simple site is Sveltekit,
| Tailwindcss, & Sanity. But everyone has their own
| preferences.
| frankzander wrote:
| Lern to code (at least a little bit) and if not ... Contao.
| CSS isn't considered "coding"
| lolinder wrote:
| Most of the gatekeeping of what is and isn't "coding" is
| done by novices who don't really know what they're talking
| about. Beginners tend to want a hard line with "coding" on
| one side and "not coding" on the other, but that's not a
| very useful way to model interactions with computers.
|
| It's more of a spectrum of complexity, with WhatsApp on one
| side and full-blown software engineering on the other. In
| the middle is a vast gray area, much of which could very
| legitimately be referred to as programming, but which
| equally someone might consider to be simply using an
| application (like Excel).
|
| Further, what tools you use is less significant for whether
| something should be considered coding than is how you're
| using them. I'm a professional web developer, and the way
| that I and my colleagues use CSS is unquestionably coding.
| On the other hand, someone who's just styling the fonts on
| their squarespace page might not consider what they're
| doing to be coding and that's also fine.
| kodah wrote:
| > Most of the gatekeeping of what is and isn't "coding"
| is done by novices who don't really know what they're
| talking about. Beginners tend to want a hard line with
| "coding" on one side and "not coding" on the other, but
| that's not a very useful way to model interactions with
| computers.
|
| I disagree. There's a meaningful distinction between what
| is code and what is formatting because the concerns are
| quite different. This distinction is more apparent on
| frontend applications where the _code_ bits are actually
| dealing with the fact that there 's a single process
| doing all these seemingly asynchronous things, the use of
| very infrastructure-like components (eg: pubsub
| implementations, stores, etc). Formatting and design
| doesn't need to deal with the _how_ , it needs to deal
| with the _why_. The powerhouse of a developer is knowing
| _both_.
|
| Trying to shoehorn peoples attitudes into discriminatory
| experience levels based on your perception of that
| rhetoric is an odd behavior unto itself. These topics
| merit talking about because ultimately they affect how we
| think, reason, and organize on different layers of
| projects.
|
| You actually somewhat proved my point with your example
| of CSS. It more recently became capable of more "code
| like" qualities, but it can definitely be used for just
| styling and formatting. Without discussion someone may
| never know the difference or why you'd use some of CSSs
| computational capabilities. Another crossover is YAML;
| YAML can be very markup language oriented but it also
| supports aliases, pointers, etc.
| lolinder wrote:
| I agree that the distinction you're drawing is valuable,
| but it's not a distinction between "code" and "not code":
| both aspects are defined with a language that the
| computer parses, interprets, and executes on. One happens
| to be a declarative language that deals with the _what_
| and _why_ , and the other an imperative one that deals
| with the _how_.
|
| > Trying to shoehorn peoples attitudes into
| discriminatory experience levels based on your perception
| of that rhetoric is an odd behavior unto itself.
|
| I think this is a bit of an overreaction to my words.
| Referring to someone as a beginner is not discriminatory,
| we all start as beginners and it's okay to not know
| things. It's also okay (and desirable!) for those of us
| who _do_ know better to help novices to learn the
| material and the culture better than they now do. And the
| fact is that "what counts as coding" is not a discussion
| that serious developers have between themselves.
|
| > These topics merit talking about because ultimately
| they affect how we think, reason, and organize on
| different layers of projects.
|
| I believe that "code" and "not code" aren't useful
| categories for dividing up CSS, HTML, YAML, JavaScript,
| Haskell, and C. We're capable of enough nuance to
| distinguish between them while still acknowledging that
| they're all languages which we use to tell a computer
| what to do. Let's talk about them in that nuanced way,
| not try to split the world into a code/everything-else
| binary.
| andrewaylett wrote:
| It's not "code" and "not code", it's "software
| engineering", "programming", and "using a computer".
|
| _So_ many more people program computers than _think_
| they 're programming. Anything that allows a computer to
| reproduce what would otherwise be a manual set of steps
| is programming. Made a bookmark in your browser? That's
| programming. Excel is _definitely_ programming. And have
| you ever tried styling a web page using only the browser
| dev tools? CSS is _hardcore_ programming, and people who
| claim otherwise are often snobs who find CSS too hard so
| they call it "not programming" in order to feel better
| about themselves.
|
| Software Engineering is a whole different ball game. It's
| not so much _what_ as _how_ and actually the
| "programming" bit is almost always the easy part. That's
| why Software Engineers run away when someone asks them to
| look at "this really useful spreadsheet than $PERSON
| made" -- chances are that person doesn't think of
| themselves as a programmer, but that's what they've been
| doing and they're actually really good at it. But only in
| isolation, while Software Engineering involves working
| with whole systems and (more importantly) both the people
| who use them and the people who work on them.
| kodah wrote:
| > both aspects are defined with a language that the
| computer parses, interprets, and executes on.
|
| Sure, but low order definitions of "code" being something
| that takes an input and produces a different output do
| not relate to the real world unless you believe modern
| word processors require programmers.
|
| > Referring to someone as a beginner is not
| discriminatory, we all start as beginners and it's okay
| to not know things.
|
| I think you're missing the point that the statement you
| made applies to a wide variety of discussion, not simply
| binary code|not_code discussions.
|
| > Most of the gatekeeping of what is and isn't "coding"
| is done by novices who don't really know what they're
| talking about
|
| This statement would also imply anyone trying to sort out
| coding from formatting, from styling as a novice. There's
| a reason we separate these activities in programming that
| has to do with how you model applications not to mention
| empowering the people who have expertise in doing them.
|
| While I agree that code|not_code is not helpful, trying
| to make the definition of code so low order that it's
| meaningless is also not helpful. There's a bar there that
| belongs in the middle and I think you both have missed
| it. I was merely calling out equally harmful wording that
| you were using to correct harmful wording.
| RobotToaster wrote:
| >these days most of which seem to be trying to upsell via ads
| in the admin.
|
| This is my biggest issue with wordpress.
|
| So much that should be in core is left to plugins, some of
| which are semi-official like jetpack, that it feels a lot more
| like "open core" than "open source".
| ravenstine wrote:
| I had a love-hate relationship with Wordpress from the
| beginning.
|
| Yes, I too basically got my true start in dynamic web
| development by downloading Wordpress, running it under a
| WAMP/LAMP stack, toying with the code, and eventually writing
| some plugins. My coding skills back then were TERRIBLE, but
| even at that time I had a sense that Wordpress was actually
| quite a mess under the hood. The database design was pretty
| bizarre in particular. Fast forward almost 20 years later and
| I'm a senior web developer, and my opinion of Wordpress has not
| changed. That doesn't mean Wordpress is bad, because on the
| surface it does its job very well, but it was (and probably
| still isn't) the pinnacle of well-written software, and it's
| not a coincidence that there were vulnerability reports being
| issues all the time for it.
|
| Wordpress was awesome in high school, the times before
| StackOverflow, MDN, YouTube, etc. It was a "framework" before
| frameworks were cool. One of the big selling points for
| Wordpress was that it was far more approachable than competing
| CMS softwares like Joomla and Drupal. I tried to figure both of
| those out back then, and I just utterly despised them. You
| could do a ton with Wordpress out of the box because, for the
| most part, you just wanted to have pages for things, a blog
| section, CSS, and a way to extend functionality. That said, I'm
| so glad I never have to use it again.
| momojo wrote:
| Genuine question, can anyone explain what the practical
| applications of this are to someone who's never developed with
| Wordpress? Is this a gimmick? A game changer? A nice-to-have?
| bdcravens wrote:
| There have been other solutions to run Wordpress locally or
| hosted without having to setup PHP and MySQL; this appears to
| be the first such first-party tool for doing so.
| tyingq wrote:
| It could be pretty handy for WP training...fresh environment
| with whatever setup you want, separate for each trainee.
| dawnerd wrote:
| Seems like a great way to test plugins and themes in a clean
| environment. Premium themes could use this as their demo too
| instead of having to keep a demo Wordpress running.
| vorticalbox wrote:
| If it's call client side couldn't someone just take the theme
| and not actually pay for it?
| bamfly wrote:
| Then you don't get updates/fixes. And may need to edit the
| code after acquiring it, to stop license checks. And you'll
| need to go to the effort of extracting the relevant files
| from the environment in the browser.
|
| Overall... yeah, sure, maybe, but anyone with any amount of
| money in their budget for this _at all_ is just gonna pay
| instead of dealing with that.
| dawnerd wrote:
| Sure and you'd be open to liabilities but this is also
| relevant
|
| https://developer.wordpress.org/themes/getting-
| started/wordp...
| bamfly wrote:
| Wordpress operates a plugin & theme marketplace. This could be
| _very_ nice as a way to demo those products without adding
| meaningful infrastructure development and operational expenses.
|
| [EDIT]: Very nice for WP/Automattic and the people who develop
| plugins to sell on that marketplace, that is.
| 8n4vidtmkvmk wrote:
| The infra cost can be very tiny tho. Digital ocean has 1
| click installers for WordPress, which you can use for a few
| hours and then shutdown and only pay a few pennies.
| bamfly wrote:
| Now you have to build or configure a system for spinning
| those up and down at the command of anonymous visitors to
| your website. Or eat the cost of running a whole bunch of
| them all the time. And test that system. And monitor it.
| And secure it (and no matter how well you do that, you're
| now exposed to a wider set of risks than you were if you
| hadn't built this thing). And do maintenance development as
| dumb crap happens under & around you ("fucking [vendor] API
| broke on us again, with what was allegedly just a bugfix
| update, that they rolled out at local midnight on a
| Saturday without warning..."). And have another thing to
| look at & talk about in budgeting discussions and spending
| audits.
|
| Yes, of course you can do it, and the cost of running it
| may be low, but the cost of bandwidth transfer to send the
| files to browsers so _they_ can run these instead is
| probably a lot lower, and saves 100%[1] of that initial and
| ongoing development & operational spending. There's a
| largish _complexity_ cost to the whole thing, that 's all
| but completely absent if you run it in the browser instead.
|
| The raw cost of running ephemeral VMs isn't the meat of the
| expenses I meant.
|
| [1, edit] OK, not 100% exactly because they did have to
| develop _this_ thing the link is about, but that 's also a
| thing that can be used for other stuff, too, not just yet
| another way to press a button and spin up a cheap VM
| running Wordpress--this is a unique _product_ ,
| potentially, with many uses, one application of which
| happens to be filling the role of providing live demos in
| Automattic's theme/plugin marketplace.
| toddmorey wrote:
| "Whether you want to build a note-taking application for mobile
| devices, an automated testing environment, or demo a live
| WooCommerce store on your site - Playground will support you."
|
| The last two make a ton of sense, but the idea of building a
| mobile app that's powered by Wordpress running PHP in webassembly
| in the browser is wrecking my brain.
| coliveira wrote:
| It makes complete sense. Php web stack is very light compared
| to Python/node, so it makes sense it can be embedded in the
| browser.
| SahAssar wrote:
| Except this is already running on a js environment in the
| browser (usually v8 if you use chrome, edge or any of their
| derivatives, the engine behind node). So you are running
| something to not run the thing you are already running.
| [deleted]
| WorldMaker wrote:
| There are plenty of Python apps now running in WebAssembly
| too. A lot of Node's stack directly runs in browsers
| (browserify is "ancient" tech at this point and influenced so
| much of modern "bundling" including Webpack and many things
| post-Webpack). (Deno's doing its own work with browser-
| compatible Node APIs, too.)
| bunga-bunga wrote:
| Finally some RAM competition to Electron apps!
| graiz wrote:
| No need to dunk on wordpress but it has a lot of history and
| issues. It would be great to have a modern alternative self-
| hosted solution that doesn't require static site generation or
| complex hosting.
| ehnto wrote:
| There are many functionally perfect substitutes, unfortunately
| the WordPress value proposition is actually it's ecosystem of
| plugins, developers and advocacy of it's users.
|
| We've all met the client who wants WP and nothing else. And
| there are countless times we've rolled a clean new solution
| out, but the client goes back to WP.
|
| I have seen value in hybrid approaches, a custom app written in
| some other framework for complex requirements, and a WP
| instance and connector for content, so the client is
| comfortable.
| zztop44 wrote:
| What are some of the best alternatives you know of? I know
| Statamic and Ghost both have their strong points.
| blowski wrote:
| There are CMSes developers want to work with, and CMSes
| companies want to use. To get into the latter bucket, you have
| to make a lot of pragmatic choices that causes you to fall out
| of the former. Also, companies like things that have been
| around a long time, and such things tend to be old-fashioned by
| definition.
| bamfly wrote:
| Any competitor has a nasty chicken/egg problem to overcome.
| Wordpress is still hard to avoid because there's a plugin--
| usually with paid support available--that can do damn near
| anything. The codebase isn't great, developing against it
| sucks, and the way it's designed and the official store curated
| does nothing to prevent some _real_ messes & risks on the
| database side--but, two days of set-up and $80/m in
| plugins/themes is just a _much_ easier sell than "OK, first
| we'll need at least two months of development time..."
|
| There's also the scale-benefit that you can hardly throw a ball
| without hitting someone who's done Wordpress development, if
| you do need development work, and Wordpress-focused agencies
| are abundant, if you'd rather not hire to get the work done.
| Not true for any up-and-coming competitor.
|
| Designing a system--even an extensible one with plugin and
| theming architecture--that is a lot better than Wordpress isn't
| a small task, but is also far from impossible and wouldn't take
| some super-genius team to accomplish; however, that's the
| _easiest step_ on the path to actually displacing Wordpress in
| the market.
| ipaddr wrote:
| There is a plugin that replaces wordpress itself
| btown wrote:
| See also Salesforce and Shopify, whose app store/plugin
| ecosystems give them a network effect in their spaces in much
| the same way - but equally tie them to antiquated API
| surfaces due to their commitment to backwards compatibility.
| EGreg wrote:
| Ok. Here it is:
|
| https://github.com/Qbix/Platform
| throw_m239339 wrote:
| Wordpress is the success it is today because over the years,
| while other CMS kept breaking API, Wordpress remained mostly
| stable, allowing the development of a large ecosystem of
| plugins.
|
| Another thing is that Wordpress PHP API uses very little OOP.
| It's mostly functions + arrays. So people who know very basic
| programming could write their own plugins, themes and co.
| jacooper wrote:
| This would be killer for static websites, make all your
| modifications on the /admin endpoint and then deploy to your
| static page host, using a plugin like staatic.
| gamblor956 wrote:
| WordPress exposes a huge divide in the HN crowd:
|
| - one group recognizes WordPress for what it is: a value-
| multiplier used by non-coders for websites so they _don 't have
| to deal with the coding_ and can focus on their core competencies
|
| - the other group hates WordPress because of the ugly codebase,
| and meanders off to work on their own perfectly formatted, ultra-
| scalable code that has no little to no value because it's never
| actually going to be used by anyone outside of their startup.
|
| WordPress powers more than half of the Web. It might not be the
| best tech, it might very well be the worst possible tech, but the
| lesson that so many programmers continuously fail to take from
| WordPress is that NOBODY CARES HOW THE SAUSAGE IS MADE.
| scarecrowbob wrote:
| This is a reasonable position and with the utility sites I
| build for, say, bands I play with I totally agree. I toss some
| shit on commodity hosting and hope the band breaks up before
| the gcal integration breaks.
|
| -=-=-=
|
| However.
|
| I will now take this opportunity to vent a bit, though it has
| little to do with your imminently reasonable post. Mostly
| because I am procrastinating on porting a 3rd-party SSO system
| from a very old and shitty WP site to a new and shitty WP site
| and it's hurting my brain to decide how much of the mess of
| jQuery and bootstrap I really need to keep.
|
| So hopefully this will be understood as venting and not a
| personal attack against your reasonable observation.
|
| -=-=-=-
|
| Consider that there are those of us who have to fix the first
| group's problems and make things keep working so they don't
| have to care how the sausage is made.
|
| That is to say, there is a very real third group of folks:
| those of us who support the first group.
|
| =-=-=-
|
| I've been doing that work for about 14 years for all kinds of
| folks. I host 300 or so WP sites for a mid-sized university, I
| built and maintain a .gov site for a three-letter-agency, and
| I've built plenty of react-based blocks (across 3 majorly
| different patterns because the GB team doesn't give a fuck
| about anything, as far as I can tell).
|
| I've worked on every element of WP from deploying servers to
| fixing CSS so it works in IE6, to scraping non-availible CMSs
| so that I can migrate thousands of pages and tens of thousands
| of images to WP. I've written plenty of WPCLI commands to do
| dumb tasks, I've written plenty of shit-tier code to make, say,
| calendar events propagate across the bad-for-most-purposes
| multisite functionality.
|
| =-=-=-
|
| Someone has to know how the sausage is made. I do.
|
| And I know the difference between the teetering pile of
| steaming crap that is WP.
|
| I've worked on actually useful codebases in my life with
| tooling that is easy and databases that are grokkable. I am
| aware that other platforms have issues, and have encountered
| them in my work.
|
| However, WP is really bad.
|
| And I have no problem bitching about it- I'm burnt the hell out
| and am about ready just quit and live in my truck and play
| music.
|
| It's a shitty platform, and people do not pay well to keep it
| working.
|
| =-=-
|
| So anyhow, yeah, you've got a fair point, but there those of us
| who, because of circumstance, keep heading back into the
| burning building that is WP and our collective hatred of the
| platform is well-founded.
| rchaud wrote:
| I think the divide is more between the new generation of full-
| stack JS developers and those that cut their teeth on PHP +
| MySQL.
| dgb23 wrote:
| WP is fantastic for the first group you mentioned. I put it up
| there with Excel, Filemaker, Visual Basic and similar software
| that democratize software and make it accessible to everyone.
|
| Naturally all of these things have limits and quality issues
| that some percentage of users eventually face. That is in of
| itself fine.
|
| The problem arises when it is expected of a professional to
| integrate or build on top of these.
|
| People come to web developers with quality expectations, unique
| problems and requirements. But the legacy that is WP puts so
| many stumbling blocks and gotchas in the way of these goals
| that it's not worth it to put a square peg into a round hole.
|
| (Similar can be said about common CRM and ecommerce platforms
| and solutions.)
| wg0 wrote:
| Reporting from a budget Android Tablet with Firefox, the response
| times aren't exactly instantaneous but aren't any different than
| running full LAMP on a reasonable cloud instance or VPS which is
| surprising to say the least.
|
| Also imagine the software layers at play here. Whole PHP
| Interpreter plus whole thousands of lines from WordPress codebase
| plus SQLite.
|
| Amazing when that's all so much totally useable.
| Saris wrote:
| I've always found WordPress performance doesn't change much on
| lower vs higher end hardware. It seems to be limited by itself.
| WhackyIdeas wrote:
| Absolutely. The other day, I took my slow Wordpress server
| hosted at Vultr on bare metal (PS200/pm) and put it on a
| server at PS500 per month and even after doing all the
| performance tuning I could with MySQL and PHP I couldn't
| notice a difference in speed when I was on the back-end where
| Cloudflare wasn't caching it.
|
| I then tested on a lower performance server which costs PS80
| per month at Vultr and again couldn't detect any difference
| when in the back-end.
|
| No matter what performance tuning I done, I couldn't make it
| work faster for us. But at least I am on an PS80 server
| instead of a PS500 server I guess.
| photomatt wrote:
| Just come to WP.com and we'll run it super-fast, auto-
| updated, and secure for $25/mo.
| ushakov wrote:
| Didn't know you owned that domain. How/when did you get
| it?
| program wrote:
| It's Matt. Automattic CEO.
| ushakov wrote:
| I know. Still curious about the 2-letter .com though
| judah wrote:
| What's the answer to making WordPress sites faster?
|
| I too have tried better hardware, CDNs, plugins like WP Super
| Cache, and others means of optimizing. Very little impact. Is
| the problem PHP?
|
| I'm thinking of trying one of those plugins that convert the
| WordPress site to static web site. I'd imagine that'd have a
| big impact, at least for sites that don't need e.g. login,
| shopping carts, etc.
| dgb23 wrote:
| > Is the problem PHP?
|
| PHP is fast for a dynamic language (compared to say
| Ruby/Python and even JS). It has the disadvantage that it
| gets slow by default the more code you have, because it has
| a static execution model.
|
| WP is extremely bloated and slow though. You can only make
| it fast by telling Apache to not execute it and hitting
| your cache (or with a caching layer in front).
|
| With heavy caching (flushed on data changes), hand written
| themes and plugins, modern build tools for frontend assets,
| image optimization etc. You can get get top metrics.
|
| However, that's just frontend. The admin panel is always
| slow.
|
| If your use-case allows it, you rather build one with
| something like hugo. Hugo and similar are very easy to use
| and net you much better results.
|
| My general tip is to not build websites with WP if you have
| web development skills.
| thomaslord wrote:
| The problem is the ecosystem. You can get response times
| for the main page down pretty low (especially with caching
| plugins) and the time to serve static assets is the same
| for Wordpress or a static site. Most likely if your site
| feels slow, the culprit is your theme and one or more
| plugins on your site. You can usually track down problem
| plugin(s) using PageSpeed Insights since their frontend
| assets are served from the plugin folders.
| butz wrote:
| I wonder if this could be useful for penetration testing,
| considering the ease of setting up different plugin combinations
| on different PHP and Wordpress versions? Or stack used to run it
| is way more different from real one?
| sourcecodeplz wrote:
| I think this is great! Congrats to the Automattic team for
| building it.
___________________________________________________________________
(page generated 2023-07-14 23:00 UTC)