Live data from Hacker News

WordPress Playground: A WordPress that runs entirely in the browser

developer.wordpress.org

71–80 of 221 posts

Re: WordPress Playground: A WordPress that runs entirely in the browser

#71
post #24

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...

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.

Re: WordPress Playground: A WordPress that runs entirely in the browser

#72
post #12

Earlier quoted context omitted.

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.

If it's call client side couldn't someone just take the theme and not actually pay for it?

Sure and you’d be open to liabilities but this is also relevant

https://developer.wordpress.org/themes/getting-started/wordp...

Re: WordPress Playground: A WordPress that runs entirely in the browser

#74
post #24

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...

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.

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)

Re: WordPress Playground: A WordPress that runs entirely in the browser

#76
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)!

Re: WordPress Playground: A WordPress that runs entirely in the browser

#77
post #29

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.

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.

Re: WordPress Playground: A WordPress that runs entirely in the browser

#78
post #51

Earlier quoted context omitted.

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…

> 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. T…

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.

Re: WordPress Playground: A WordPress that runs entirely in the browser

#79
post #74

Earlier quoted context omitted.

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.

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)

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

Re: WordPress Playground: A WordPress that runs entirely in the browser

#80

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 migratio…

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.
Post reply on HN