15 ms·
WordPress Playground: A WordPress that runs entirely in the browser
- leoradovey1993 3y ago[dead]
- apesnape 3y agoI have checked out the approach. As well as the guidelines. I agree to all. More sites should use this.
- edoardo-schnell 3y agoNext up: a WordPress plugin to host WordPress playgrounds
- em3rgent0rdr 3y agoIts WordPress all the way down.
- fredley 3y agoWordPress 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.
- whyage 3y agoWhat no-code alternative would you recommend for pro web designers?
- kidfiji 3y agoAlthough 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 3y agoWebflow
- frankzander 3y agoLern to code (at least a little bit) and if not ... Contao. CSS isn't considered "coding"
- lolinder 3y agoMost 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 3y ago> 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.
- bamfly 3y agoWordpress is one of those things I've plenty of experience with, but leave off my résumé 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 3y agoSimilarly, I do not mention to anyone that I have touched Drupal in the past.
- ceejayoz 3y agoI'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 3y agoOh 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 3y agoI 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 3y agoI 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.
- RobotToaster 3y ago>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".
- photomatt 3y agoWe do need to figure out as a community how to deal with that upsell / aggressive plugin problem. I hope we can come up with some norms and standards for what's allowed in our plugin directory that is most customer-centric.
- RadixDLT 3y agoyep, only allow high quality plugins that adhere to coding standards also, WordPress should be behind a framework( symfony, laravel)
- momojo 3y agoGenuine 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 3y agoThere 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 3y agoIt could be pretty handy for WP training...fresh environment with whatever setup you want, separate for each trainee.
- dawnerd 3y agoSeems 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 3y agoIf it's call client side couldn't someone just take the theme and not actually pay for it?
- bamfly 3y agoThen 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 3y agoSure and you’d be open to liabilities but this is also relevant https://developer.wordpress.org/themes/getting-started/wordpress-licensing-the-gpl/ https://developer.wordpress.org/themes/getting-started/wordp...
- sourcecodeplz 3y agoI think this is great! Congrats to the Automattic team for building it.
- hbcondo714 3y agoVery 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 3y agoNeat, and here's more info on how they did it: WebAssembly PHP: https://wordpress.github.io/wordpress-playground/architecture/wasm-php-overview/ https://wordpress.github.io/wordpress-playground/architectur... Service Workers: https://wordpress.github.io/wordpress-playground/architecture/browser-service-workers/ https://wordpress.github.io/wordpress-playground/architectur...
- radium3d 3y agoInteresting, seems the dedicated worker in chrome task manager is utilizing 1,135,948k of memory
- DaiPlusPlus 3y ago> 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?
- dmsnell 3y agoI'm not entirely sure on this, but I believe that what we're seeing is the WASM runtime allocating memory for its potential needs, but not totally using it all. The entire filesystem, all the executables, all uploaded files, and all database data lives in memory in the virtual filesystem. I think we could trim down the default allocation but it might actually be meaningless anyway; that GB won't steal real RAM unless it fills up inside the environment. Someone can probably check me on this, but if my memory serves me right this is what's going on.
- revskill 3y agoWhen will i have useState in PHP ?
- capableweb 3y agoYou have it already :) $_POST
- revskill 3y ago_POST is enough ? Why $ here ?
- bamfly 3y agoAre you... asking when you'll get a feature in PHP while not knowing it employs sigils on variable names?
- revskill 3y agoMaybe, it's redundant to waste my seconds of life. One second to write. Some seconds to read and parse those $$$.
- imilk 3y agoWhat 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.
- calibas 3y agoYes, it's outrageous that it's taken so long to implement React-specific functions in PHP!
- slig 3y agoJust use `$_SESSION`.
- toddmorey 3y ago"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 3y agoIt 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 3y agoExcept 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 3y ago[deleted]
- WorldMaker 3y agoThere 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.)
- gnz11 3y agoThe part that doesn’t make sense is using Wordpress as an application framework.
- bunga-bunga 3y agoFinally some RAM competition to Electron apps!
- nickserv 3y agoThe elegant architecture of WordPress and its plugins coupled with the low resource use of client side rendering, what's not to love?
- orkj 3y agoGenuinely curious: does this mean you can run WordPress as a cloudflare worker (ignoring database for now)? https://developers.cloudflare.com/workers/runtime-apis/webassembly/ https://developers.cloudflare.com/workers/runtime-apis/webas...
- miahwilde 3y agoNote sure, but I like how you think. there is this: https://ma.rkusa.st/store-sqlite-in-cloudflare-durable-objects https://ma.rkusa.st/store-sqlite-in-cloudflare-durable-objec... and this: https://developers.cloudflare.com/d1/ https://developers.cloudflare.com/d1/ So I'm thinking it could (be made to) work.
- orkj 3y agoI 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 3y agoReplying 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
- modernerd 3y agoThe team behind this tried to deploy to Cloudflare but hit memory constraints with Workers due to the 128MB limit there: https://github.com/WordPress/wordpress-playground/issues/69 https://github.com/WordPress/wordpress-playground/issues/69 There’s likely more work that could be done to make this viable, though (or Cloudflare could raise limits).
- _vOv_ 3y ago
- handzhiev 3y agoWordPress 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 3y agoThe 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 3y agoWhen 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.
- graiz 3y agoNo 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 3y agoThere 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 3y agoWhat are some of the best alternatives you know of? I know Statamic and Ghost both have their strong points.
- timeon 3y agoGhost can't be used on random shared hosting. Maybe Statamic can but it is probably not straightforward. VPS is I think better solution anyway. However for many people it is overkill to have VPS just to run some simple website.
- mateomorris 3y agoPrimo is another
- bamfly 3y agoAny 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.
- Reptur 3y agoIts 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.
- desas 3y agoCould you expand? I don't follow. WordPress is open source, you can already download it and do whatever you want.
- Reptur 3y agoMy point was no one would ever run a web app's backend in the browser. Not speaking specifically to Wordpress.
- wzy 3y ago> ...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?
- Reptur 3y agoMy point was no one would ever run a web app's backend in the browser. Not speaking specifically to Wordpress.
- dboreham 3y agoAlmost like a real computer.
- wouldbecouldbe 3y agoPhp & 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 3y agoLaravel 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 3y ago> 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.
- wouldbecouldbe 3y agoNah you don't yet it. Nowadays there is so much build config you need 4gb just to run wepback. Php is just a save of a file. That's it's. So for instance we would use remote file save. Edit & save via ftp. Most editors have such a plugin. Then you could work remote easily. But also hosting php is 10 times easier and stable then node. Php servers don't run stale or crash. Because there is no server.
- gamblor956 3y agoWordPress 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 3y agoThis 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.
- ravenstine 3y agoThis playground, which is running PHP in WASM, is much snappier than 95% of garden variety websites.
- deleted 3y ago[deleted]
- noahtallen 3y agoI 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.
- wg0 3y agoReporting 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 3y agoI've always found WordPress performance doesn't change much on lower vs higher end hardware. It seems to be limited by itself.
- WhackyIdeas 3y agoAbsolutely. The other day, I took my slow Wordpress server hosted at Vultr on bare metal (£200/pm) and put it on a server at £500 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 £80 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 £80 server instead of a £500 server I guess.
- sublinear 3y agoCan 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 3y agoThat must explain why WordPress' market share has been trending downwards for the last 20 years, right?
- sublinear 3y agoYes! Ignorance absolutely explains its "market share". There's no reason for anyone to be running this trash in 2023. I'm surprised Shopify hasn't completely wiped out Wordpress for ecommerce yet. For all other kinds of websites, they don't even need a CMS. Blogs are dead so it's all niche sites that demand custom web dev by now.
- geocrasher 3y agoI'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 3y agothe 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 3y ago> 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 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 3y agoOk, 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 3y agoAs a side note, I wonder if WP will still be in demand after all these chatbots come into daily usage
- butz 3y agoI 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?
- jacooper 3y agoThis 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.
- synergy20 3y agoGosh this is truly snappy, does that mean we shall run all the stuff on WASM now? very impressive.
- ComputerGuru 3y agoReally 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/ 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)!
- adamsss 3y ago[dead]
- EGreg 3y agoThe 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.
- sylvinus 3y agoI think this is the part done with the Service Worker, which intercepts network requests: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API https://developer.mozilla.org/en-US/docs/Web/API/Service_Wor...
- EGreg 3y agoBut how can anyone other than the user actually access this server? Like if I serve wordpress off a phone?
- inportb 3y agoOoops! I suppose it does not work in private browsing mode.
- adamziel 3y agoOoops! Would you file an issue on GitHub? This would really help us track it and fix it.
- nilslindemann 3y agoApply 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; }
- adamziel 3y agoOr add `?mode=seamless` to the URL: https://playground.wordpress.net/?mode=seamless https://playground.wordpress.net/?mode=seamless See https://wordpress.github.io/wordpress-playground/query-api/ https://wordpress.github.io/wordpress-playground/query-api/ for more cool options!
- web3-is-a-scam 3y agoJust because you can doesn’t mean you should.
- photomatt 3y agoI tried to make a big deal about this in my State of the Word keynote in December 2022: https://wordpress.tv/2023/01/04/matt-mullenweg-state-of-the-word-2022/ https://wordpress.tv/2023/01/04/matt-mullenweg-state-of-the-... It kind of blew my mind as an engineer to see it work, and know all the layers that had to interact for that to happen. It's fun to see it blowing up on HN 6 months later! :) Thank you to everyone for checking it out.
- quickthrower2 3y agoNice talk! For anyone curious, 48:33 is the timestamp where Wordpress Playground is introduced
- dboreham 3y agoIt's very interesting to me since I have an interest in porting various hitherto "server-side" applications to run in-browser. Doubly interesting because it's the first real product I've seen running SQLite -- so far I've only seen toy demos. But, wondering about something -- poking around in the code a bit, and realizing I know next to nothing about present-day php, I realized this may be not using the "traditional" SQLite-over-OPFS approach to get persistence? Actually, after a bit more reading it's not clear to me that persistent storage is available yet via Emscripten. And after yet more poking around I found: https://github.com/WordPress/wordpress-playground/issues/19 https://github.com/WordPress/wordpress-playground/issues/19 which I guess means that persistence isn't yet possible for WP in the browser :(
- lioeters 3y agoThere is partial support for persistence, for browsers that have origin private file system (OPFS) implemented. > OPFS is only supported in Chrome-based browsers at the moment like Edge, Android browser. Safari and Firefox users won't be able to benefit from this feature yet Persistent Playground: Sync between MEMFS and OPFS - https://github.com/WordPress/wordpress-playground/pull/546 https://github.com/WordPress/wordpress-playground/pull/546
- 3y ago
- quickthrower2 3y agoRIP static site generators. Just run this in your browser and export a static site. No more complicated setups. No more running ruby in docker or fighting hugo templates. Install the themes and plugins and go nuts! /hottake
- Tijdreiziger 3y agoTools for that purpose already existed, e.g. WP2Static.
- quickthrower2 3y agoSure but you had to install wordpress on your PC: hard or server: easier but cost $ on top of the static hosting bill
- desas 3y agoWordPress is both free and open source, what are the extra dollars for?
- quickthrower2 3y agoIf you don’t run it locally, then server rental.
- pacifika 3y agoSame with this
- snickmy 3y agohow would you export a static site if you are running on the browser? you can do some cache management with local storage, or just leverage the browser built in system, but as every rendering session is on the edge, you would not have the benefit of a static site. Or are you talking about, developing it on the browser, export it and upload it somewhere as static files for internet access (eg a cheap host with no server side languages)?
- neets 3y agoWhat a time to be alive
- pier25 3y agoI don't have a very good opinion of Wordpress but this is super cool
- astatine 3y agoI use WP all the time for a variety of nearly static sites that I can let someone else non-technical continue to add content. It works great for this purpose. There is nothing close to WP for this purpose. It does need careful curating of plugins that one uses, set up suitable cloudflare frontends and preventing users from doing something seemingly simple but dangerous. I get the feeling that a good chunk of the hate comes from people who tried it many years ago; or had needs which don't get met by WP; or received it as a legacy.
- lvncelot 3y agoA combination of the second, third and a client who insisted on using it for a project where a headless CMS + custom code would have worked a lot better did the trick for me. Still not really WP's fault, but it doesn't change the fact that I recoil a bit in horror when it's mentioned.
- snickmy 3y agoHijacking the spirit of this link to just saying that I'm very sad about what Wordpress has become. In my mind it was a very good website / blogging platform, with a clear and functional markup / raw code editor. Building themes was easy, and so was the plugging ecosystem. I installed the latest version ~6 months ago, and I found myself overly confused by the million of options, the poor functionality of the block system, and the overall bloating of the software. It just run slower than 10 years ago. The templates and plugin available out there are extremely complex and a lot harder to read, code wise. I assume is a 'dead by 1000 papercuts, or customer demands, in this case' but from a product standpoint, I'd really love to know who are the personas that this new interpretation of wordpress cater to.
- globalise83 3y agoJust tried installing woocommerce and adding a product, but got a bug: Warning: require(/wordpress/wp-includes/post.php): Failed to open stream: No such file or directory in /wordpress/wp-settings.php on line 2 Fatal error: Uncaught Error: Failed opening required '/wordpress/wp-includes/post.php' (include_path='.:') in /wordpress/wp-settings.php:2 Stack trace: #0 /wordpress/wp-config.php(11): require_once() #1 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...') #2 /wordpress/wp-admin/admin.php(2): require_once('/wordpress/wp-l...') #3 /wordpress/wp-admin/post.php(2): require_once('/wordpress/wp-a...') #4 {main} thrown in /wordpress/wp-settings.php on line 2 There has been a critical error on this website.
- lioeters 3y agoIt would be helpful if you could report this to the issue tracker. https://github.com/WordPress/wordpress-playground/issues https://github.com/WordPress/wordpress-playground/issues
- flaxton 3y agoThis looks interesting, but a better option in my opinion is to use the Local app (on Mac) to install a lightweight VM running WordPress in seconds. Then you have all the tools, for example phpmyadmin and MySQL database management, all running locally on your Mac, and with Internet access. Open Source and free to use. https://localwp.com https://localwp.com