[Music]
[Cough]
[Music]
Alrighty, we are live.
I had some weird audio issues earlier,
so if you can't hear me, please let me know.
I had to crank up my mic mixer for some reason on OBS Studio.
I'm not quite sure why.
So let me know if you can't hear me.
I'm finding the music to be a bit loud, so I'm going to drop it down a bit as well.
Okay.
So for today's live stream, I am going to be testing WordPress Playground a little bit.
If you don't know, WordPress Playground is a version of WordPress that runs in your browser.
It's essentially using something called... let me actually just go to the repository.
It uses something called WebAssembly, which, thanks Wikipedia,
is a portable binary code format and text format for execution of programs.
Let's see what Wikipedia has to say about that.
High performance applications on web pages.
It's been around since 2017.
And I know nothing about it other than WordPress Playground uses it.
So basically, if you go to the WordPress Playground homepage,
there is the version of WordPress running in the browser, for example.
I can view the dashboard.
I can view the front end.
This is all running, this is a standalone WordPress instance running inside a think and iframe.
Let's just check that out.
Looks like this one's not running in an iframe.
Which is kind of cool.
And you can do all kinds of fun things with it.
So you can... there's a way to... you can save it using the export button.
And it's basically the complete site that you bolt.
You can host it anyway.
You can restore a saved site.
It has the potential to be like something that hosting companies could use.
So you could spin up someone's WordPress site using this technology.
Which theoretically would mean you wouldn't need traditional hosting.
So if you missed it, I recommend checking this out.
Now, the main reason that I am here today is I'm trying to test this out
as a replacement for my local dev environment.
So there is a visual Code Studio plugin that allows you to run WordPress Playground in VS Code.
And there is also a CLI tool called WPNow, which is kind of like WPEnv
or any kind of other Docker-based WordPress local environment.
That uses WordPress Playground as the back end, if you will.
I have for the longest time... I wouldn't say for the longest time,
but I have for a while now been using a personal local environment project
that I developed about two years ago now.
It runs on something called Multipass, which is a virtualized Ubuntu server.
And what I like about it is I'm basically running an Ubuntu server on my machine.
So I have access to all those Ubuntu things.
So it is very opinionated.
It is set up very specifically to how I do things.
I'm trying to make it possible to use it across all operating systems.
But essentially I can have things like local URLs
that have locally signed certificates
and basically just run... it runs like any other website.
So what I'm going to do today is I'm going to test out...
I think I'll start with WPNow,
mainly because Visual Studio Code requires me to be inside Visual Studio Code.
So I'm going to try WPNow on a local WordPress site.
I'm going to see what's possible and what isn't.
So here's WPNow.
You can launch it inside a plugin or theme directory.
You can launch it inside a WordPress install.
WordPress mode is essentially the mode that you can run.
So it automatically detects the mode.
I like the fact that it has a WordPress develop option.
I'd like to try that out.
So I think that's what I'm going to start with today.
So to do that, I am going to...
inside my development directory I'm going to go into websites.
There's a bunch of sites there.
I'm going to just remove a bunch of these.
Make sure it's just created a new site.
It's just going to dump WPNow.
My preferred way of doing it is I want to have a fully traditional WordPress setup inside this directory.
So if I open this in PHP Store,
I should now see my WordPress files.
All good? I'll make this a little bit bigger.
WordPress hasn't been installed yet because the config file hasn't been created, which is fine.
Save all WordPress support. It's fine.
Okay. So that's my preferred way to run WordPress, to have access to all WordPress files.
So now I should be able to run WPNow start.
I think I do already have WPNow installed.
Let me just check that.
I could just install this in the project, I guess.
Okay. It doesn't have to be installed. So let's go to .prnow.stoch.
Okay. So the WordPress folder already exists.
And I mean that's up and running.
So that's pretty quick, I have to say.
So it checks the mode, it sets a WordPress.
PHP version sets PHP8. It's using the latest WordPress.
It really checks and says it's already there.
So it's keeping the download. Oh, that's cool.
I could have actually done.
Okay. I'm going to close this.
So it happens if I close the other side for X.
So I'm actually going to go back one step.
I'm going to remove everything in this directory.
And then I'm going to run WPNow start again.
Did that delete everything?
Somehow I don't think it did.
Do you want to delete all files? Yes.
Oh.
See? Okay. I can see. I can see. I can see.
Okay. So it is actually removing everything.
So if I run WPNow start, how does that work?
Oh, it doesn't actually install the files.
So that's interesting.
So where are the files?
Now I'm curious.
I tried to write this.
I didn't show the path anyway.
I'm trying to get the path.
So if this is running, what we're here?
There's no files for the files. How does that work?
It's interesting.
So the mode here is Playground. Okay. So what does that mean?
Launches are completely virtualized WordPress. I guess I have no access to the files.
Okay. So how do I specify that version?
Oh, it doesn't work again. Okay.
All right. That's fine. So now if I download the core files and then run WPNow,
the question is, is this running this file? It's created a config.
It doesn't look like it's running WordPress mode.
So does that mean that I can...
Oh, it changes here.
Can I...
Can I break the Spy?
So let's do...
So I don't know if the demo is true.
So that definitely is running that code. So let's see if we can...
So I actually was fiddling with this file today, so I know exactly what to change.
Index the PHP. And there. So I should make this change.
Okay. So I'm actually definitely working with that as well. All right. That's kind of cool.
So how does it work? Now I want to know how it works.
Because I have a database directory, a DVRPHP directory. Where is my database?
Because as far as I know, this thing is using the SQLite version of the database.
It doesn't seem to be here. It's okay. So see... SQL.
So...
I'm talking to myself. I'm not finishing my sentences now.
Okay.
I'm thinking of a database.
I need a PHP.
I wonder if that's because it's hidden files.
This is a Mac OS thing.
Mac OS.
It's like a keyboard shortcut.
Shift and P.
Now I'm using a non-Mac keyboard.
Yeah, come on, shift.
Didn't see 3D hidden files.
So where is the database?
How does that work?
Maybe it's all... maybe it's all in turn.
Hmm, interesting.
Okay.
I think you remember at one point there was a...
It's not that it requires to get log in there.
Don't be loud.
And a cryo-config.
Okay.
Don't be sensitive.
I'm trying to figure out where the database is stored.
Interesting.
WPNR directory is used to store versions.
Oh.
So it looks like it just similinks.
Oh.
That's interesting.
Okay.
That's interesting. Okay.
Hmm. Okay.
Okay. That's interesting.
Okay. Interesting.
So that's how that works.
Just so I don't present content folders.
So that means...
Interesting.
So what happens if I install a plugin?
Let's see. Have you plugin?
I'm going to stick something like fake in person.
Yeah. Just see if that installs.
So it actually installs it in my local. That's cool.
Okay. So the only things that are sitting in that directory
are the sort of required things in this case.
So the database is stored there.
Okay. That's cool.
Hmm.
I'm not going to lie. I quite like that.
So my only two...
Let's call them complaints.
Is the URL structure.
I would love to have a locally signed cert
and a cleaner URL.
But that's really the only thing that I could think of that would be a problem now with this.
Honestly, that was a good data building structure.
Okay. That seems to be working as expected.
It used to... Previously it used to have an index-like PHP in the URL,
but it seems like that's fixed.
That's actually really cool. I'm not going to lie.
So if there is a way to have a cleaner URL and a locally signed cert with us...
I suppose the locally signed cert is not that important.
It is nice to have. It isn't that important.
So now what I want to do...
Just knock my mark out the way.
So now what I want to do is I want to create a new one.
Let's say...
Let's go to the end and press the word.
"Druffy core download"
"Perpino"
Ah.
Alright.
Okay, now stopped.
I mean, it just works.
And it's quick.
Super quick.
Okay, so let's...
Let's do some... So I want to show you all something.
Okay, so that's good data.
So...
Okay, so things that...
I'm going to have to run it again.
And...
Can you...
Okay, so this is something I haven't fiddled with in a long time.
And this is things like setting up URLs and things like that.
Um...
Okay, so you can do custom URLs.
You just need to have it set up in your eyespaw.
Um...
But what that would do is that would allow you to...
[bell rings]
Sorry, I just got stuck into reading there.
So, Blueprints basically allow you to run custom...
custom commands on your install.
So let's see if we can configure this to work.
So...
Blueprints are essentially JSON format.
Um...
[music]
So let's create...
Okay.
Now one question I do have is...
[music]
I don't know what happens if I set this to port 80.
I'll tell you why, because I've got other things running on port 80.
I'm going to start port 80.
Equals...
Okay.
That's already a step forward. This is running on localize.
It's kind of cool. I had no idea that was even an option.
Okay.
So now... I should just check something.
I'm trying to make sure I don't have a Blueimpress.
I don't have a Blueimpress, so that's great.
Okay. So now I need to...
My host file...
And put in my password.
I can't read my password.
Okay. So...
I probably need to point it out to 7.
1, 2, 7, also I need to go up to 1.
What's that?
Okay.
So now...
I need to specify the blueprint.
Okay. So let's create a blueprint in this file.
Let's use this one.
It says blueprint.json.
I guess I need to close this one down.
Let's open up another one.
"Element" - "upside" - "blueimpress".
Okay. Let's just create the blueprint in here.
There. I got it done today.
Okay.
I will just call it...
What am I...
I don't know what I called it in there.
This one.
"blueimpress.test" - I just prefer to use "tet.test".
"urals".
So "blueimpress.test".
Okay.
So now...
I start it on port 80.
And pass in the blueprint.
[typing]
So now it's...
Ha! It works!
That's cool.
That's actually really cool.
It does mean I need to be able to edit my eyespout, but that's fine.
I'm capable of doing that.
If I go to permalinks...
Let's see if I can define that personally.
Yeah. That works.
I'm not going to lie. It's really cool.
I can deal with not having SSL's nonsense.
That's really cool.
So now, in the blueprints as well...
You can do things like set debugging.
So let's go back into the blueprints.
Let's set up the schema.
Okay. And then...
"steps.define.get".
So that's the config.
"entr_m_thing".
"define_const".
"steps".
Okay.
Oh! I could just do it.
Until there, go ahead.
"steps".
"last".
So this is how I prefer to run all my...
"sats". Let's see if this works.
"tech.berg".
"display".
"false".
"db.debug.mark".
True.
Okay.
And then I also want to be able to...
set up my...
my site name.
"sats".
Just "steps".
"fit_visions".
"storing things on plugins running custom code".
I want to store...
things in the "sittings".
Let me check the schema.
"sittings.config".
"fit_visions.constants.plug-in site options".
That's all I need.
"site options".
"blog_name".
"impress".
"site_girl_setup" already.
"blog_name" is "setup".
That should be it.
I'm going to have options there.
There is any "blog name".
Okay.
I mean, that's fair.
Yeah. There is any "blog_name".
Um...
It looks like you stay locked in.
So that's cool.
The one thing that this could really use is...
I don't know if...
"sats_activate_stoops" would be "step_define_satur_all_step".
But you can actually...
Interesting.
You can define it that way.
[typing sounds]
Okay. So starting page with third versions.
This probably needs to be...
dated.
Because PHP extension battles is there as well.
Features...
Alright. Okay.
So this is really just updating documentation.
Okay, cool.
And then "steps".
"steps" you've got "activate_plugin_step",
you've got "activate_theme_step",
"copy_step" defines "satur_all_step".
That sets the "home" in "satur_all_constants".
And they say, "What I've got...
I've got defined WP constants."
I mean, it's the same thing.
But what you could therefore do...
is move like this.
So you could take away the "consts" there.
You could do that.
[typing sounds]
I want to take...
"step_news_it_is_an_object".
No, not there.
No.
[typing sounds]
There.
There we go.
So now we can say...
No.
Press...
"talk_test".
Okay.
[typing sounds]
"give_up_realize_the_config".
"define_before_run" defines the concept before it does not to the file on the disk.
It comes about doing my comic system to five equals.
Yeah, I prefer this one.
[typing sounds]
I'm not doing anything.
So that should...
I'm still plugging in "thema_school".
I'm not going to use it right now.
[typing sounds]
I guess using the "define_before_run" method is not the end of the world.
Which means it doesn't actually physically make the change, which I generally prefer.
It doesn't really matter.
Okay, so that's what the blueprint looks like.
So that is a question.
If I want to reset this, does it just work if I run it now?
Create a fresh database.
Okay, so let's do that, and let's do that, and let's do that.
Ah, here.
It must not have additional properties except one.
Ah, maybe that one you can't set method.
[typing sounds]
Makes sense.
Okay, let's run that and see what happens.
[typing sounds]
Okay, so maybe that's not the way to do it.
Set options, block an angle, and press.
Yes, this one.
I don't know if I need to do this before the steps.
[typing sounds]
Yeah.
[typing sounds]
[thump]
[typing sounds]
mm.
Mm hmm.
Oh no, it's been difficult.
This experimental option will change without wanting to use steps instead.
Alright fine.
So we need to use this one.
Okay.
So let's go back a few steps.
Steps haha funny.
Alright I'm gonna need to do that.
Okay so we don't do that anymore.
It's only steps but we'll do it as the whole concept to get there.
Oh wait we're done.
Okay but how do I step to find site name?
Okay.
It says site options.
Okay.
So how does site options work?
This object.
Okay.
There must be a series of site options in our concepts.
Okay.
There we go.
Okay.
Okay so possibly the scheme is out of date.
That's fine.
It means I should be able to take these two out.
Because that defines the site URL.
That's itself the site options.
I mean this is the configs.
Let's see what happens when I write that.
Okay so documentation is a big thing.
I seem to be working with an out of date schema.
So documentation is a big thing if I want to do this.
If I could get these things to work then that would solve a lot of the issues that I'm...
Maybe site URL doesn't work.
Let's try doing that and take that.
Maybe the reset doesn't work.
Okay.
Okay those are even defined.
Okay.
[typing sounds]
So my next question would be how do I wipe this? And the only way I'm going to be able to figure that out is if I actually go into here and delete that one.
So let's close that, and then let's delete that.
Like it would be cool if there was an easier way to do that. What did I just do?
Alright, I deleted the wrong one.
[typing sounds]
I'll get some of these, I was playing around with these a while back.
Okay.
I don't want to delete the field purpose, I'm trying to get that to work.
It feels like these things I don't like, let me just cut them south.
[typing sounds]
Okay.
Let's see if I can run this without the research. Okay, that worked.
But then it gave me that for some reason. Alright, that's because, oh, it's a dark-divers first.
[typing sounds]
Okay, so that's worked. That looks good. Okay.
[typing sounds]
Okay, so it's set up to home URL, the site URL, debug display, and the debug log.
But it does it above those things. So it's not really ideal, Adam, if you're watching.
I mean, I would prefer it if it actually did it in this area.
If all of this, I don't know, easy or difficult it has to do, but this is really where custom values should be created.
Just FYI.
Also, the fact that I've said debug display is false means that I shouldn't see these.
I do have a debug log file, which is great.
That's very cool.
But if I've set up my config file there, then I should be seeing the best error.
I also don't know why I'm seeing these to be home.
I see something.
Where does that error take place?
Let's just do this.
I should have to take this out.
That's going to go away.
I don't know why I'm seeing that error.
That would have been said.
So maybe it should do a different for run option.
Let's pop that in there.
I'm going to stick this in the JSON file.
Let's go back here.
Let's kill this.
Okay, let's still expect it.
Still need the load press one.
Let's pop the code print back into the directory.
Sometimes two.
And then...
Okay.
The reason this isn't so quick is because it's running those steps.
Okay, so that's kind of to be expected because of set debug here as well.
So that's fine.
So you only want to set things that haven't been set to that.
So let's see if I stop this.
Okay, that's cool.
I wonder what happens if I change that.
I'm going to press two. Does it rerun those steps?
Yes, it does. That's cool.
Okay, that's cool. I like that.
All right, so that I mean that could be used. That's handy.
I do like that.
This is something that I can use, I'll be honest.
It gives me the clean URLs that I like.
It just works. I'm logged in.
I want to check what happens if I log out.
I'm going to assume the username is admin and password.
Yes, indeed. That's fine.
I have no problem with that. Admin password on a local environment is perfectly fine.
So I'm not going to lie, this is pretty cool.
And I could do things like install plugins like FEDC, and all those kind of things.
I could take this and I could...
I could script something that outputs the blueprint for me, replacing things with things.
And it's easy enough to edit my host file.
So I know enough about command line scripting to be able to actually create a command that might do this for me.
So that's kind of cool.
So I would do something like create a test blueprint with some placeholders.
And then run the command line. Is this still throwing error? Let me just see here.
No, it seems to be fine. So that's resolved.
So I quite like the idea of sort of setting up a blueprint version that I store somewhere locally.
And then I run a command which I could set up to download wordpress.com install, change things to other things, and then run wq now.
So that's kind of cool.
And I just need to make sure that my host file is set up.
I wonder what that would look like.
Okay, so I want to find out about this blueprint schema.
I guess what it's doing is it's using whatever the default wordpress site options are.
Just have a look at the database quickly. It's requiring you to kind of have an item.
It's kind of expecting you to have an understanding of the different site options.
But yeah, I certainly could use this for local wordpress install.
That's interesting.
Okay, what I want to do now is I want to check something.
So there is a specific endpoint.
Okay, that doesn't seem to work, which is a bit of a power.
It's not there in the world, but it would be preferable.
I would need for it to work, I would need to, which is not great.
This is really well documented.
See if you go to posts, for example.
I don't know what the URL is to find posts.
Everything is using Pemmolinks.
So you would need to know how that works.
See if I can find those posts correctly.
Okay.
Yeah, so that would work. This is obviously how the block is always the back end.
But it would be really cool if I didn't have to do that. If I could just use which is Bermelux.
That doesn't seem to work.
So that's maybe something to find out about.
But I do like how the brief loop works. I do like the fact that I can set up configs and things.
Interesting. Very, very interesting.
I think what I'm going to do going forward from here is I'm going to try and see if I can use this to develop some content next time.
So my main reason for using a local environment is for content creation, for local address.
And so I'm thinking now that I know this, I should still just sort of just somewhere quickly before I use it.
I'm going to try and get some questions as well. So I'm trying to call this WP now testing.
I'll make it public for now. I don't understand care.
OK, so first takeaway documentation, documentation, documentation.
Definitely things better documented so that all the options are available so that we know how things work.
Second question is how to enable the REST API pretty per minutes using WP now.
I'm not sure this is WP now takeaways.
WP now testing.
Other than that, I'm pretty chuffed with how far this has come, I'll be honest.
I feel like a lot of the issues listed here.
That one definitely is closed.
Of course, there was a way to do the MySQL one.
I feel like WP now leads its own page in here.
I do like the fact that you can change WordPress versions quite like that.
Let's dive into some JSON things.
What options do we have?
Just seems to be that option.
If that's the option, why not just?
Why not just have it all?
I don't understand why you need to specify it.
Maybe I'm just weird.
I like the preferred version so you can specify PHP versions.
That's cool.
I don't know what version PHP WP now runs with.
default background.
I have to admit I'm quite chuffed with WP now.
It does quite a bit nicely.
I quite like it.
I'm curious to see if I'm able to use blueprints in the VS Code extension.
Because the VS Code extension runs inside VS Code.
I'm planning on testing that out next week.
Next time I do a live stream.
I'm quite interested to know how that would work and whether it supports blueprints.
I'm going to play with that next time.
Now I'm quite chuffed with what I've discovered today.
I'm going to post a question about that in...
I wonder if this one there already?
Let's see.
I can't see anything.
I'm not pretty.
I can't see anything.
I'm not pretty.
Post name.
Let's see if that's true.
I still said to plan.
That's why.
Still doesn't work.
I lost that issue that I was looking at.
Oh dear.
I missed that.
Oh.
But I've already done that.
I've currently got way too many tabs open.
It is said to post names.
That works.
That doesn't work.
Oh, because I don't have the right URL.
It works.
Well then that's actually not even an issue.
That's actually pretty cool.
So I could just delete this now.
So documentation is definitely the big thing.
But documentation and how the blueprints works.
Some way to generate blueprints.
I know it's not that easy, but some way to...
Basically just to know what all the options are.
So my biggest takeaway would be...
Listing every single option in the blueprint.
Maybe it's already there. Maybe it's just steps.
So those are steps.
But not for example a landing page.
So being able to know.
I suppose if you're using the schema then it's fine.
But if you don't know that you can say preferred versions for example.
So having a list of all of that somewhere.
Blueprint data format.
Free versions, queue/sp
This needs to be updated to cover all of these.
And then steps.
So that's pretty fully functional.
So I think the blueprint data format just needs to be updated because you have a landing page, preferred version and steps.
So my PHP extensions features... expose.
Just in case we're getting used to them.
Copy, define, select your own.
This doesn't seem to work anymore, so maybe an update there.
Did it? I said wrong.
No that didn't seem to work.
Let's make a note of that.
There.
That definitely worked. But I haven't tried.
I haven't really tried any of the others, but I should.
Alright, I think I'm going to call it a day there. That was pretty enlightening I must say.
Everything seems to be happening in steps.
Something I was not aware of.
I'm going to call it a day there. This has been rather interesting and enlightening. I'm looking forward to playing with this a bit more.
My next livestream will probably only be in about three weeks time because I'm away next week and then sort of gathering my thoughts after that trip away.
But next time I'll probably dive into the VS Code extension and just see what's possible there.
And also maybe see if I can try and get some of all of this automated for myself.
While I'm doing that I'll do some digging around, ask some questions in various places about how things work and maybe see if we can get the documentation.
I don't know. I feel like it's very close. I feel like the information is all there. I just maybe struggle to understand how it works or how it fits together.
But yeah, I was able to get somewhere today at least so quite chuffed with that.
All right, I'm going to call it a day. Thanks for joining the stream. Hopefully you found something interesting. Bye bye.
♪ ♪