[BLANK_AUDIO]
All righty folks, welcome to a very impromptu stream.
[LAUGH]
I need to, there it is.
I hadn't planned on streaming this week, to be honest.
I usually stream every two weeks, more or less.
But before we get going, just want to check if the audio is all okay.
Last week, there was a little bit of an issue with the audio.
So if you hear an echo or if the audio is not clear,
I'm just turning my desktop light up a little bit.
Here we go.
If the audio is not clear, let me know and we will get that sorted out.
All right, I will at least.
[LAUGH]
So as I was saying, I don't normally stream every week.
But last week after doing the, thank you John, audio good, awesome, thank you.
Last week after doing the visual code studio implementation of WordPress Playground,
the folks over at WordPress.com launched Studio.
And if you haven't been following the news around this,
this is a new way to develop WordPress locally.
It is free, it is open source.
It is honestly one of the fastest and simplest ways to spin up a site locally.
It has a core feature set that it has released with.
And then hopefully as the team gets feedback,
they will be adding new and additional features.
A few disclaimers before we get started.
So Studio is developed by the folks at WordPress.com.
WordPress.com is the hosting platform of Automatic.
Automatic is the company that I work for.
I am sponsored by Automatic to work with the training team.
But I have not been coerced or requested or advised to run this live stream.
I am doing this purely because I want to do it.
When I learned that the WordPress.com team were building this,
I was very keen to test it out.
And so I was able to get hold of a pre-release version
during development and test it out.
I'm very excited by it, I'll be honest.
And I'll share why in a little bit why it excites me.
But nobody asked me to do this.
My company hasn't requested that I do this.
I'm doing it because I want to, because this is a cool tool to check out.
It is a competitor to things like,
you've probably heard them, LocalWP,
let's hop on over there, and DevKinsta and the like.
In that it is specifically a WordPress local development tool.
You can quickly spin up a WordPress site,
develop a theme, develop a plugin, build out a demo site.
And then once you've done that,
then you can deploy it to your production environment
in whichever way you prefer.
DevKinsta and Local tend to be tied to their hosting company.
So Local is owned by WP Engine, DevKinsta is owned by Kinsta.
And so they have built-in ways to push to their hosting environments.
Studio doesn't have a specifically focused or core way
to push to WordPress.com hosting.
It has got some WordPress.com features,
which I will share with you during this live stream.
But you don't need to use these features,
you don't need to have a WordPress.com account to use Studio.
So you can build and host any WordPress.org sites you want,
host it on your own environment,
with some caveats which we'll share in a second.
But if you don't like Studio, there are other options,
Local, DevKinsta, Xampp, Wamp, Mamp, all those other options,
all those MP options.
It's a competitor or at least a different way of doing things
to all those options.
So before we dive in, just a couple of things to mention.
It is currently only available on Mac.
There is a Windows version coming soon.
And you can request early access from this blog post
if you click here.
You can also, if you're on a Linux environment,
if you're on Ubuntu or one of those Linux distros,
I'm scrolling down into the comments,
there is a way to build it for Linux as well,
which is documented here in the comments.
And the team is also working on a Linux distribution of this app.
The great thing about building for Mac first
is Linux and Mac are very similar,
so it's easier to take a Mac app and create it for Linux.
Windows obviously has a few different tweaks and things,
but they are working on a Windows version
which will be coming soon.
So if you're not using Windows, sorry,
if you are using Windows and you're interested in trying this out
for yourself, please request access from the home page.
If you're on Linux, you can check out the instructions
in the comments.
I don't have my--
I've got an Ubuntu machine sitting behind me.
I don't have it-- well, Ubuntu and Windows
are sitting behind me.
I don't have it running currently,
so I'm not going to go through that process.
But it is possible.
One of the first things I want to mention--
and this is not--
I'm not trying to throw shade at any of the other options.
But one of the things that I've never enjoyed
about local WP or DevKinsta is when you choose your platform,
you need to give them your first name, last name, and email.
DevKinsta as well, you need to go first name, last name,
email, or name and email.
There are ways around this.
You can just close it, and then it'll take you back
to the home page.
If you can-- I think you can just click download here.
No, you've got to fill in the fields.
But if you're clever, there are ways to download it.
I've actually downloaded--
I think it was DevKinsta before without giving them
my email address.
I think the link was hidden by the modal,
and then I could move the modal out the way.
Personally, that's just the personal thing.
I don't like the fact that I have to give them my information
to access their free tool.
They're basically-- they're building a subscriber email
list and then selling me products that way.
I just want to be able to get hold of it.
So if there was a way to access the GitHub or something
without having to fill in this information,
I would prefer that.
I think there is a way.
You just need to know where to find it,
whatever the case may be.
With Studio, that is not the case.
So literally, I can click here.
I can download Studio.
There it is, download for Mac.
I can select Apple or Intel.
I can click on it.
And it goes ahead and it gives me the option
to download the file.
So that's one of the things I do like about it.
I don't have to give them my email address, my username--
sorry, my name and my email.
So I really do appreciate that personally
from a personal point of view.
I do really have Studio installed on my Mac.
So I'm going to run it very quickly.
I do quite like the icon, the sort
of W with a little almost like target-y thing around it.
That's very cool.
I do like that.
And immediately, when you run Studio,
you go straight into building your first site.
That's the second thing I like about Studio.
It's a very streamlined, very quick process.
So I'm just going to create a new site and call it--
let's call it Livestream.
It automatically sets a default path.
You can see it's creating its files in a folder called
Studio in my home folder.
That for me is perfect.
I don't have to change anything.
I'm happy for it to live there.
I like the fact that I know where it's living,
so I can get there if I need to very quickly.
I can change this if I want to, so I can move it around.
I created a little Durbanful site.
I live in the suburb of Durbanful.
So that was the first test site that I created.
But that's it.
That's all the setup that I have that I need
to spin up a new site.
I hit Continue.
And literally in less time than it takes me to grab my coffee
and have a sip, the site is live.
I didn't even get my coffee and have a sip yet.
The site is ready to go.
And that is the third--
my third favorite thing about Studio.
It is blazingly fast.
To get from zero to a new site running is seconds.
Literally is 10 seconds.
I had to take a break to have coffee,
and the site was already ready.
OK.
So now that the site is up and running,
we have this lovely little dashboard.
And it gives me some options right out of the bat.
I can dive straight into the WP Admin,
or I can open up the site straight away.
I can see that the site is running.
I can stop the site if I don't want the site
to be using up memory.
I can stop it if I'm not working on it.
I see which theme is active.
So whatever the default WordPress theme is the time
will obviously be the active theme.
What I also like is I can dive straight
into WordPress-related functionality.
So if I want to start building up my site,
I can dive into the Site Editor.
I can dive straight into the styles.
I can dive straight into patterns.
I can go straight to the navigation.
I can go straight into templates,
and I can go straight into pages.
So those things I really like.
I'm sure there are some additional things
that folks might want, but I like the fact
that that exists as an option.
What I can also do is I can immediately--
and I'm going to start clicking now--
I can immediately open it up in my application
for viewing files.
So if I want to see where the files are
and what they look like, I can go straight into there.
And you'll see it is just a standard WordPress install.
Let me just do that.
So WP Admin Directory, WP Content, WP Includes,
and all the standard default WordPress-y things,
they exist.
So it's nothing out of the ordinary.
No weird configurations.
It's the default WordPress core install.
If I'm a VS Code user, I can also jump straight into VS Code
from Studio.
It will open up VS Code.
OK, it's asking me, do I want this to allow it to happen?
Yes, it's fine.
We can go ahead.
I can go straight into VS Code with the livestream site loaded
in VS Code, and now I can just start coding.
So that, to me, is really, really cool.
If you've been following my livestreams for a while,
you know I prefer to use PHP Storm.
There is an open issue for PHP Storm support.
I'll get into those in a second.
But personally, I would like something like that,
but I'll talk about that in a bit.
The other option that I really, really like,
the developer-focused option is I can immediately
open my terminal to the path for my livestream site.
So if I want to run terminal commands, I'm there.
I'm ready to rock and roll.
I can just quickly go into my WP content, for example,
WP content plugins, and I'm there,
and I can do things, whatever I might want to do.
So that's another very, very cool--
sorry, I was busy installing things earlier--
very, very cool feature of Studio.
And the fact that they thought about adding these things
and the fact that it gives us scope for adding additional
things is, in my opinion, a very, very cool thing.
I'm going to be saying very, very cool a lot today,
so please be with me.
I'll try and change it up a bit.
So that's what you see on the dashboard
as you first launch your site.
WP Admin takes you straight to WP Admin.
It uses a default username and password, which is just
admin and password.
You can obviously update that if you want to.
Personally, I don't mind.
I like keeping it simple.
We can also open the site straightaway.
So there's the front end of the site.
And that's all great.
And then we've got some additional tabs,
which we will dive into.
One thing you will notice is at the top here,
it is using the SQLite database.
So SQLite is a plugin that was developed some time ago.
I'm not sure when exactly.
It's going to have a look quickly.
So it's this SQLite database integration.
It is a WordPress team plugin.
And essentially, it allows you to run WordPress
call against an SQLite plugin.
I just want to have a look at the development quickly here.
I want to see when version 1 was released.
Oh, there are no tags.
Oh, dear.
Let's check the change lock.
It could be in the read me somewhere.
So this is something-- oh, it's not there.
Here we go.
Let's see if we can find-- so this was something
that Ari actually created.
If you don't know Ari, he is a core developer.
He works at Immediate Capital at the moment.
And this is something I'm actually
going to find the blog post.
So if we go to make WordPress call and we search for--
hi.
I'm not going to try and pronounce your nickname,
but hi, whoever joined us there in the chat.
If we go to SQLite, there was some post
that Ari was posting about this plugin a while back.
I'm just going to try and find it quickly.
I'm not going to find it now, am I?
[HUMMING]
I'm not going to spend too much time on this.
I just wanted to try and get a feel for when
this conversation started.
I'm not going to find it, but it was a while ago.
Maybe Google will help us.
WordPress, SQLite support.
Let's see what Google tells us.
Here we go.
So in the 19th of April, 2023, there was a status update.
The initial implementation was included in Performance Lab
and then released as a standalone plugin.
It was back in 2022 that Ari first
suggested that WordPress support SQLite.
So it's something that's been around for a while.
And one of the reasons was smaller sites, simpler sites.
They don't need to have MySQL installed.
It increases load on the server, decreases performance.
So the idea was to get WordPress to support SQLite.
And you can do that through this SQLite plugin.
So Studio, which is using Playground under the hood,
uses the same SQLite integration.
So that's just something to note.
We'll dive into how that all works in a second.
But it's something good to be aware of.
OK, let's take a breath because I actually
have some goals for today that I wrote down.
As you can tell, I'm very excited.
And I want to dive into things.
But I kind of want to share my goals for today
because I actually do have a list.
So my goals today are really to dive
into very developer-focused topics.
So I want to have a look at theme development.
I want to look at how that works in Studio.
I want to see if create block theme works.
So create block theme will allow us to create a new block theme
and maybe do some coding on it and see how that all works
and export files and all of that.
I want to see if that works.
Then I want to dive into plugin development.
I want to see if I can get that working.
It should work.
And I'll explain why in a second.
But we'll see how it works.
Then I want to look at debugging.
I want to see what happens if I enable the default
WP debug constants.
I want to chat briefly about whether or not
Xdebug is supported on Studio.
And then I want to look into something called Ray, which
you may or may not have heard of,
but it's an interesting little debugging tool.
Then I want to have a look at whether we can get WPCI commands
to run.
They should run.
We'll talk about why they should in a second
and see if that works.
I want to dive into database management.
And that's why I was talking about the SQLite plugin
because we're going to need to have a way to access
that database.
And then I want to kind of chat about pushing to production
and sort of the options available to you there,
see which work, which don't work.
And last but not least, I want to see
if multi-site is supported.
I have no idea if it will work.
We're going to just try it and see.
But I want to try and turn a site into a multi-site
and see what happens.
So those are kind of the high level goals.
If you have anything that you would like me to try today,
if you think about it, let me know in the chat.
I'm happy to experiment.
I can't guarantee it's all going to work.
But if there's anything you want,
anything developer focused that you want us to try today,
share it with me in the chat.
I'll try and keep an eye on the chat
and I'll add them here to the slide.
And we'll see if we have time to get to them.
All right.
Let me close down a bunch of links.
I'll close down Kinstel.
I'll close down that.
We can leave the dashboard open.
That's fine.
We can leave the SQL Lite.
No, we don't need that anymore.
We can close the read me.
We can close that down.
What I'm also going to do is I'm just
going to move some of these links over here.
They'll become important in a second.
I'm going to leave the Studio 1 open.
There's my dashboard, livestream.
OK, that one I don't need.
I'm going to move that one over here.
I'll talk about that in a sec.
But here is my site.
So the first thing that you might notice about this site
is that it's running on a domain localhost colon 8881.
So that's obviously a port number on localhost.
It's actually-- if you go into the Settings tab of your site
in Studio, you will see that local domain there.
So you can copy it out of there.
You can edit your site name if you need to.
You can open up your local path.
You'll see the WordPress version is the latest version.
Here's the admin and password.
So you can change the password--
sorry, copy the password.
I don't think you can change it, but you can copy it.
And then there's the admin URL.
Personally-- and this is the one thing
I don't like about Studio-- but personally, I
would like to be able to have a local domain, maybe something
like livestream.test configured to this.
I do understand, though, that that requires the local machine
to be able to support custom domain names and pointing them
to the Studio instance and all that.
I do understand that.
So for me personally, that is my one, almost,
I want to say bugbear about Studio,
that it doesn't support that.
It's not a huge train smash, to be honest.
But I would like to have a slightly nicer, cleaner top
level domain for my local test sites.
That's just me personally.
So that's the one thing that I thought is interesting.
Then let's go into theme development.
So what I want to do is I want to install--
I've got 2024 and 2023 installed.
I want to install a plugin.
And the plugin is called create block theme.
So I'm just going to go through the normal add plugins
process, the way we can search for plugins in the plugin
repository.
And I'm going to search for create block theme.
And that should give me create block theme.
There it is.
So let's install that.
And what create block theme does, if you haven't seen it,
it basically allows you some additional functionality
over and above the block editor for theme development.
So I've activated it now.
If I go into appearance, there is now a create block theme
page, which allows me to do various things.
It's actually been deprecated and will
be removed in the next release.
So I'm not going to use this page today.
I'm rather going to use the create block theme
menu in the editor.
So if I go into my editor, this is my site editor,
what I'm going to do is I'm going to--
let's go to templates.
And let's just go and access the index template.
Now, that's not what I want to do.
I want to edit the index template, sorry.
So there, and then edit.
So now I'm editing my site.
And what I'm going to do-- actually,
let's not do the index template.
Let's do the single post template.
So what I'm going to do now is I'm
going to make a change to my single post template.
I'm developing a new theme.
I want to make a change to the template.
I'm going to add inside of the content area.
There are the tags.
Then there are the comments.
So what I'm going to do--
I'm going to change things around a little.
I'm going to move the featured image after the title,
after the title and post meter.
So let's do that first.
So I'm going to move the featured image down.
There we go.
So title first, then the post name, then the featured image.
And then I want to move the tags group.
I want to move it above the content.
Don't ask me why.
I'm just being weird today.
So I'm going to insert before, add before.
And I'm going to add a group.
And I'm going to just create a standard group.
And then I'm going to take the tags.
And I'm going to move that into that group.
There we go.
I want to insert the group there.
But OK.
So there we go.
So our title happens first, then our dates.
Post meta, for example.
Then our featured image.
Then the tags.
And then the content.
Then the comments below that.
I'm also going to remove the spacer.
So basically, I'm just customizing my post template.
I think what I'm also going to do
is I'm going to widen the template.
So let's go to the main group.
It's not styles.
Hang on.
Settings.
There we go.
Let's say inner blocks don't use content width.
And let's make these blocks--
let's see what 960 was, what it was already.
So let's make it--
content 960.
What am I doing?
Go back here, group.
So I'm going to make this, let's say, 1080 wide,
just for the sake of being different.
So I'm just making it 1080 pixels wide.
And yeah, that's a nice set of changes.
So I'm going to save this change.
This will save it to the database for the single posts.
And then here is the Create Block Theme settings.
I'm now going to create theme.
So I want to clone this theme with a new name
and preserve the user changes.
So let's do that.
And what did we call this?
We called this--
I should remember what the site was called.
It's called Livestream.
So we'll call this the Livestream theme.
I don't really-- I'm not too worried about the theme
metadata, so I'm going to leave that as is.
And I'm now going to create this theme.
Theme successfully cloned.
The editor will now reload.
So let's reload the editor.
And theoretically now, we should have,
if we open up Visual Studio Code--
sorry, not that one, this one from over here.
If we open this in now--
notice it's updated Livestream in my studio.
That's very, very cool.
So that syncs back to the app.
It's picked up that Livestream has been cloned and activated.
So that is currently the default theme.
And if I open this in VS Code, I should
see that there is a new theme folder.
There it is, Livestream.
And it will then have my customized post,
single post template, which is there.
And with all the things we've changed around,
there's the 1080 pixels.
So that just works.
Out of the box, it all works perfectly.
The Studio app updates with the new theme,
which is very, very cool.
So I'm quite happy that that works like it does.
So that, to me, is very, very cool.
I will note, it's interesting-- and this
is unrelated to Studio--
it's interesting to me that the Create Block theme folks
are going to deprecate this page.
Because I like to be able to create a blank theme first
and then make the changes to it.
So I actually want to chat to the folks behind this
and ask them if they're definitely
going to deprecate this whole page,
or whether there's some benefit in keeping some of these
around.
Because when I develop a new theme,
I prefer to start with a brand new blank theme
and then start making changes.
That's just a personal preference.
So that's a little tangent, nothing related to Studio.
But that works and works as it should.
So I'm very, very chuffed and very happy with that.
All right, let us move on to my other things,
block plugin development.
I want to see if I can use Create Block, which
is a tool that allows you to create
a block from the command line.
Let me just see here.
It's a great block tool.
So this is the tool.
I have this installed on my local environment.
So when I say I have this installed, what I mean is,
I have Node.js and I have npm installed on my local.
So if I run Node minus v, I get a version currently
running version 20.
If I run npm minus v, I have the version.
So I have that installed on my local machine system wide.
I can run Node.js and npm commands
from wherever I want to.
If you want to know how to do that,
I can share a little video with you.
Let me just update this.
There we go.
Installing a Node.js and npm for local WordPress development.
This is a tutorial that I created some time ago,
which includes all these steps.
This is my personal preference for setting up
these things on Mac, on Windows, and on Linux.
So if you want to get that installed because you want
to do plugin development or WordPress core development,
you can use this process to do that.
But essentially, you get to-- we get down the bottom here.
You've got npm installed, and then you install Node,
and then you can check that it's running.
So with that, I should now theoretically
be able to run npx WordPress create block to-do list
from my command line inside of my LearnPress
and then be able to create a block.
It all should just work out of the box.
So let's open the terminal.
And there we are.
Let's go into the wp-content-plugins directory.
There we are in the plugins directory.
There should be four plugins.
And let's run, and let's create a new block.
So we'll call it to-do-list.
Maybe not.
Let's call it copyright-date.
Copyright block.
So we'll run that.
And it's asking me, do I want to use these things?
Yes, I want to go ahead and use these things.
So now it's going to download all the new things.
And this takes some time.
But hopefully, it doesn't take too long.
I always forget about create block having an updated version
before live streams.
And I forget to make sure I'm up to date
so that this doesn't take forever.
But it seems to be doing its thing, so all good.
If you're wondering why I'm creating a copyright-date block,
it's because in the WordPress Developer Resources,
there is a tutorial titled Build Your First Block.
And the tutorial that they create is
to build a copyright-date block.
So I don't think I'm going to build the whole block now.
I might just do some of the initial code.
I might just grab some of the code
and just make some changes and just see how it works.
Maybe I'll grab the--
I don't know.
Maybe I'll grab the custom icon.
No, I don't want the custom.
I don't need the custom icon.
Let's just grab the edit.js code.
And we'll just use this.
We'll just grab this one and get it to return something
and just see it working.
So I'll just use that code.
All right, let's see if this is installed.
WordPress Scripts is still installing.
Node.js is doing its thing.
While we're doing that, we can obviously check out
those files in the plugins directory.
So there's plugins.
There's create block theme.
There's all the files being created.
Sorry, create block theme.
That's the one I want.
I want copyright-date block.
There it is.
My node modules directory is probably
just getting bigger and bigger and bigger
as it installs all the things.
OK, here we go.
It's done.
It's bootstrapped.
Good to go.
So I'm not going to make any massive changes to this block.
All I'm going to do now is I'm going to open up the edits
component.
And I'm going to update this with the edit from the code
just so we can see it working.
So there we go.
So current year, new date, all good.
Use block props is already there.
Current year is there.
Excellent.
We don't need anything else for that.
I don't think, no, that code should work.
And then because I have these things installed,
I can just run npm run bold or npm start either way.
So let's run npm run bold.
Oh, I'm not inside the correct directory.
Let's do that.
And then let's run npm run bold again.
All right, so that's generated its code.
So that all should be good.
So now I should have that installed and ready
to activate in my WordPress install.
So let's hop back here and have a look.
There it is, copyright-date block.
There's a new version available.
There's obviously a copyright-date block in the WordPress
plugin directory.
There it is.
It looks like it's a Marcus plugin, probably one
that he created for the original documentation.
So I'm not going to update this right now.
But let's activate this one.
And there it is.
And then let's go into a post.
And let's create a new post.
Actually, no, no, no.
Let's do even something even better.
Let's go into our editor.
And let's edit our theme.
And let's go into the--
not the-- is it templates?
No, it's inside of patterns.
The header and footer are inside the patterns.
Let's go into the footer pattern, the template part footer.
There we go.
And let's add the copyright-date block in here.
Why not?
So let's edit this.
And then let's see what we can do here.
So this is a group.
So I'm going to add another block to this group.
I'm going to look for copyright-date.
There it is.
OK.
It's got the blue background and all of that.
So it is what it is.
I want to make the group stack.
There we go.
I want, let's say, justify center.
That's fine.
I don't think the block supports a background yet.
I can't change the background, but at least I've got that there.
So there we go.
So there's the block being used inside of my footer.
And now what I want to do is, using create block theme,
I want to save these changes to my theme.
So I'm going to hit the Save Changes to Theme option.
Looks like there might be some--
these are obviously just defaulted localized text images.
No, I don't need any of that.
I don't need style changes.
I don't need fonts, because I didn't make any font or style
changes.
So let's save those changes.
This should now write that to my footer template
part in my theme in the code.
So it doesn't look like it has done that.
I'm not sure.
Let's have a look and see whether it has saved it
in the theme.
I wonder if it's because--
ah, wait.
I think it's because I haven't saved it to the database.
So let's do that first.
So let's go and add in the group.
Let's add the copyright date.
Let's make them--
see what happens?
Stack.
Now let's do that one.
And let's justify center, I think it was.
There we go.
Then let's save it.
Yes.
Then let's export the Save Changes to Theme.
Let's just save those changes.
Bomb.
Let's see if that takes.
Yes.
That has worked.
Excellent.
That's because I didn't save it to the database first.
And then if we go into our Visual Studio code
and we have a look at the live stream theme,
if we look inside the patterns-- no, the parts, template
parts, the footer part, we should now
see at the bottom there somewhere,
we should see our block being used.
So there it is.
Copyright date block.
Hello from the saved content.
That's happening because I haven't implemented
the copyright date in the save.
So let's fix that.
I should have done that first.
But anyway, let's do it now quickly.
So let's grab all of this.
Actually, let's grab it from the tutorial.
Oh, they're using a render.
So let's not do it that way.
Let's just do it in the code here.
So let's do it in the code here.
So let's go into Save.
So it'll be use block prop save.
Save.
There we go.
OK, that should be good.
Let's build that quickly.
OK.
That's all worked.
So now we're going to have to make some changes.
So let's go back into our footer.
Let us remove this block.
Now, this wouldn't be a problem if I had created it
as a dynamic block.
So this is my own darkness.
But let's delete it.
And then let's add it again.
Copyright date block.
There it is.
I just want to check the code and make sure
that it's saved it correctly as well.
Oh, it looks like it hasn't updated.
Oh, I think I need to hit refresh here.
So let's reload this.
I don't know.
Thought so.
So let's go--
I think I've just broken--
I just think I've just managed to break my site.
So let's go back.
Let us go back into the footer and take out
the copyright date block.
There we go.
And then let's reload.
There we go.
And then let's reload.
Editor.
Let's go back into the patterns.
Let's go back into the footer.
There we go.
Let's edit that.
Exit the code editor.
And now we can pop it back in.
So there's the row.
There's the date block.
Let's save this.
Now I want to see--
oh, I'm getting an error.
I've clearly done something wrong,
probably in my block code.
Oh, wait. Let me just see something here quickly.
That's what I've done wrong.
So it's use block prop save like that.
It's been a while since I've done this work,
so bear with me.
How do you--
can't do that.
Never mind.
Let us grab this.
Let's try this again.
Use block prop save.
There we go.
And then let's kill all of that.
OK.
Let's try this again, folks.
No.
Go back one.
I think I've broken it again.
This is what happens when you don't prepare things
and you just randomly go in.
All right.
So let's run the bold.
That should now be good.
Let's go back into the editor.
So we had a question.
I've got a question in the chat about Playground
when I use WPNow.
I can't insert any file in my project.
Interesting.
Are you on Windows?
Are you trying to use WPNow on Windows?
Are you on a Mac or Linux?
If you can answer that, yes, you are on Windows.
OK.
So there is a known issue with--
I think it's Playground.
Let me just see here.
Give me one second.
Yeah, I just want to check something.
Yes.
So I'm going to open up the Playground repository here.
So WordPress Playground is what powers WPNow and Studio
and all those things.
There is, as far as I know, a Windows-related issue related
to the host file system or something like that.
I think it's this one.
So there are some Windows-specific issues
with accessing files.
I can't remember exactly where I saw it.
But it is a known issue with Playground.
It is something that I know the Playground developers are
working on.
But unfortunately, that is a currently unknown issue
with anything that Playground uses on a Windows environment.
Trying to add, I think, its media files
or upload plugin files, upload theme files
doesn't quite work yet.
So what I would recommend, if you want to log that,
is to go to the Playground--
let's just go, yeah, let's load the Playground.
Go to the WordPress Playground GitHub repository
and log the issue there and see if you can help them
debug and test the issue.
Because as far as I know, there is a known concern.
And it would be great if we can get
that fixed for Windows users.
So do check that out.
Unfortunately, I don't have an answer for you on that one.
It is currently a known issue.
And I'm sorry that I don't have a better answer for you.
OK.
Let me get back to my footer pattern here.
Let me get this working.
Let me attempt block recovery.
Let's exit the code editor.
Let's attempt block recovery.
OK.
That's working.
Let's make sure the code is correct.
Scroll all the way down.
Yeah, that looks much better.
Copyright block, copyright 2024, that looks so much better.
Excellent.
So let's go back to the visual editor.
So now, if I save this and then write this to my theme--
let's just save all those changes.
That should work.
So let's see here.
Thank you, AskHamino as well, for sharing the GitHub issue.
You found it there.
That's actually issue.
There we go.
VSCode, can't upload media on Windows.
There we go.
Thank you so much for sharing that.
So it is a known issue.
And do add your thoughts there and your experiences.
I know that Adam said something about getting this fixed
and how to fix this.
But yeah, it is there.
Hamino, is that you?
You obviously knew it as well.
So cool.
Thank you for sharing that link with us.
Great.
OK, where was I?
OK, so I've exported this.
Let's see in my theme.
Yes, there's the copyright date block.
So that all works brilliantly.
Cool, so I can develop themes.
I can develop plugins.
I can develop custom plugins for my themes.
It all just works.
And that is because I have those pieces of software
installed on my local environment.
So because I have the access to the files with Studio
sitting on my hard drive, I install those things.
I install Node.js, NVM, and it just works.
So that, to me, is another cool thing I like about Studio.
It is essentially just replicating the core WordPress
file experience on my local hard drive.
And I can do everything in that environment
that I want to be able to do.
What that also means is that I can do--
and I'm going to kind of jump ahead here.
I'm going to pull this one up.
And I'm going to jump it ahead.
We'll get into debugging in a second.
But that also means that I can do WPCLI commands
on the site on my local machine.
Now, if you don't know what WPCLI is--
and I've just realized I'm so excited about Studio.
That means I'm talking very, very fast.
So if you need me to slow down, let me know.
I do get excited.
I do talk fast on these live streams.
So I apologize.
It's one of the things that I have to force myself
to do when I'm running an online workshop, a proper formalized
online workshop.
But to install WPCLI on your local machine,
there are some instructions that you can run.
There are alternative methods that you can run it.
Talks about WordPress versions.
You can use these commands.
You can run it.
And essentially, I have followed all of these steps.
And I can run WP--
let's just actually clear out of here
and go back to my home directory.
I can just run WP-- info, and it's installed
system-wide on my machine.
So what that means is I can, if I just open up my terminal
to the site that I'm working on, I
can do things like run WP plugin list, for example.
And it shows me a list of all my plugins.
And if I wanted to, I can go WP plugin install.
And I'm going to have to think of a plugin now.
I think WordPress SEO is one.
I think that's Yoast.
Yes, it's Yoast.
There we go.
So I can just run that from the command line.
I can do cool things like WP Search Replace, which
allows me to prepare my database.
And let's say-- where is it?
Let's do this.
Let's say Search Replace live stream with--
let's call it live stream.
No, no.
What is it called currently?
It's currently called live stream.
The site name.
Let's just do a quick check.
Yeah.
It's called _live stream.
Live stream.
Let's call it demo live stream.
That'll be the site name.
And let's do a dry run, because I don't actually
want to do the replacements.
But I can run those kind of commands on my database.
And it'll be able to do it for me.
So any WP CLI commands that I can run on a server,
I can run in my local environment.
As long as I have it installed on my operating system
from my terminal of my operating system,
I can change the directory.
I can run my WP CI commands.
I can do things like WP user add, I think it is.
WP help user.
WP user-- what is it called?
Create.
Oh, WP user create.
So I can do things like that.
If I want to create another user,
I can say WP user create.
And let's call him live stream.
And let's give him a--
I think it needs an email.
Yeah, it needs user login, user email.
So let's say WP user create live stream.
And let's say live at live stream dot test, for example.
And that'll create a user for me.
And I can use that user, and I can log in, and I can do things.
I can even-- if I wanted to from the command line,
I could say WP create--
sorry, WP user create, let's call it my name.
And then say role equals administrator,
I think it is, administrator.
Boom.
No, that was wrong.
Oh, user email I need, sorry.
So let's say create jposter.
Let's say create jposter@email.com.
That's not my actual email address.
But I can create a new administrator user.
And then I could go ahead and delete my current admin user.
So I could say WP user delete--
I think I just need to say admin.
This is probably going to break studio, and I'm OK with that.
But let's delete the admin.
OK, reassign is not possible.
Let's not proceed with that.
Let's reassign to my new admin user.
Reassign needs a value, reassign not passed.
Did I spell it wrong?
No.
OK, let's try this again.
WP user-- can you tell I haven't done this in a while?
Oh, user ID.
I need user ID.
OK, so it's WP reassign user, and my ID was ID 3.
So let's do that.
Oh, it's equals 3 probably, of course.
Sorry.
Equals 3.
There we go.
OK, so it's removed that user.
If I log in-- now, it's going to actually probably kick me out
because I haven't--
yeah, I'm not logged in as that user.
So let's test out my new user here.
Let's copy that, and let's go there.
I don't need password to save this, but there I am.
I'm logged in as my new user, JBosenger.
The new user has access to all the posts.
I want to see what happens if I now run this.
It actually probably will work.
Yeah, it does work because the cookie's
been stored in the browser.
So that still works.
I can still open my site.
That all still works.
I wonder if I can change my site name.
Let's see if that works.
I wonder if it uses the user or not.
It might not.
I don't know.
Let's see.
Let's have a look.
That didn't seem to work.
So I'm guessing it uses the username because you'll notice
here it has admin and password.
I expected this to break.
I'll be honest.
I don't actually expect this to work.
This is kind of a very--
I'm being very edgy.
I'm creating some edgy use cases.
But I like the fact-- so this is the kind of thing
that I could do before I push the site to production.
I can quickly delete the initial admin user,
create a proper-- because whenever
I push the site to production, I never
leave a user with an admin and a password
with a username admin.
I always create one under my own name
and then give it a correct password.
So that's the kind of thing I would
do before I push it up.
But I can also do things like there's a--
there's an option in--
actually, I want to see if this is going to work.
There's an option in WP CLI where you
could export your database.
And so I want to see if that's possible.
I'm not sure what it's called.
I think it's WPDB export or something like that.
Yeah, here we go.
No, not drop.
Check clean CLI columns, create drop, export.
Here we go.
So it should be a case of export to a file.
I just want a simple one.
OK, there's no simple examples here.
So let's just say--
let's just go-- yeah, let's just go this one,
WP export with add drop table.
So let me clear this out.
And what I like to do when I do exports,
I like to create a directory in my local environment called SQL.
And so let's switch to that.
Oh, it's probably not going to work.
So what I'm going to have to do is I'm probably
going to have to do that and then pass in the SQL directory
and then give it a name because I think file
is the name of the file.
Yes, file.
So that's going to have to go first.
So let's do that.
And then let's say SQL.
And let's call it livestream.sql.
I don't know if this is going to work.
Going from SQLite, but let's see.
Boom.
OK, failed to get a character set.
Access denied for username at here.
OK, so that doesn't work, which is interesting.
I understand why that doesn't work because it's
a SQLite database.
But there is another way to do this.
And I'll share that with you in a second.
But most of the WPCLI commands--
updating users, updating content, installing plugins and themes--
all theoretically should work from the terminal.
While we're talking about this, let's
talk about how to export the database.
So in the blog post that was launched--
no, not the blog post.
I'm talking absolute nonsense.
In the documentation-- where is the link to the doc?
Here we go.
So I'll share the doc link with you in the chat as well.
There is a way that you can use the SQLite command line
to export sites.
Basically, let me just get down there.
Sites overview, demo sites--
let's get on the side here.
Oh, no, wait.
Let's just go down, down, down, down, down.
Here we go.
So if you install SQLite, which if you're
on a Mac, which is currently the only version of Studio that
works, then you can just use Homebrew.
If you're using Homebrew or whatever your chosen way
of installing things, and you can just run brew install SQLite.
I do have SQLite on my machine.
I have installed it.
I installed it before today's session.
So if I say, which is SQLite 3, there it is.
And then with that information, you can just--
where's the blog post?
You can just run--
where is it?
Here we go.
You can just run this.
So I need to be inside of the root directory.
So there we go.
And I can paste that.
So I can say, wplite--
sorry, SQLite, wplcontentdatabase.ht.sqlite.
That's where the SQLite database is stored.
It's the dump.
And then we'll call it live stream.sql.
So that should work.
Let's open that up.
There it is.
And there is my transactions and my insert,
intues, and all of that.
My understanding is this should theoretically work
if I import this into a WordPress MySQL database.
Sorry, at least the MySQL database.
But there is the data that we need if we need to export it.
You can also access the database.
And there's two ways I want to see if we can do this.
So I didn't include this in my list of things
that I wanted to do today.
But while we're here, why not?
Let's go have a look.
So the first way I want to do is I
want to see if I can do this inside of WordPress.
There's a plugin that I've used in the past called SQL Buddy.
Let's do it from the command line.
Why not?
So let's say wp plugin install SQL Buddy,
I think is what it's called.
Yes, there it is.
Database management made easy.
Let's see if this works.
I don't know if it will.
I have no idea.
It's probably going to be expecting a MySQL database
with usernames and passwords and all of that kind of thing.
So we'll see if it works.
I should have activated it in that command as well,
but it's fine.
I'll do it from here.
So there's SQL Buddy.
Let's activate that.
And let's see if it works.
I have a feeling it won't, but I'm keen to find out.
And tables.
And hey, there we go.
There are the tables.
I'm actually really chuffed about that.
It just works.
It picks up the SQLites.
So I'm guessing that SQL Buddy just uses whatever the WordPress
install is using.
And because the WordPress install is using the SQLites
integration, it just works.
And that's so cool.
So when I'm hosting locally, when I'm developing locally,
I can use that plugin to access the tables.
So this is very, very cool.
I would mention, and I should mention this,
the SQL Buddy plugin is developed by a company called
Delicious Brains.
I used to work at Delicious Brains
before I joined automatic, which is why I know about the plugin.
The irony is that Delicious Brains is currently
owned by the folks at WP Engine.
So the competitor for Studio can use the plugin
of the competitor company inside of WordPress.
But that's really, really cool that it does just work.
And that's one way to access your database inside
of your WordPress install is by using something like SQL Buddy.
The other way--
and I'm pretty sure this is on the Studio documentation--
there is a app called SQLite Studio.
You can download it and install it.
I do already have it on my machine as well.
So there it is, SQLite Studio.
I used this, I think, last week when we were doing--
not last week, the week before when we were doing WPNow.
So this works exactly the same way.
I will add the database.
And then I will need to go and find it.
Now, I'm wondering if this is going to work this way.
Let's have a look.
So let's go to Jonathan Bostinger.
Let's go to Studio.
Let's go to Livestream.
I'm pretty sure it was in WPContent and then Database.
And it doesn't seem to show the hidden files or not.
Let me just check this.
WPContent Database, yeah.
So this was one of the issues that I discovered
with SQLite Studio or SQLite Studio
is even though if I go into Studio here,
I go to WPContent Database--
oh, wait.
I don't have my hidden files showing.
There it is.
Hidden files was command shift and period.
I wonder if that's going to work in here now.
Let's try that.
There it is.
So enable hidden files, first step.
And now I can select--
now, it doesn't seem to be--
there we go.
It'll be-- it's got all files.
Why can't I?
It doesn't seem to be allowing me to select that type of file,
which is slightly annoying.
I'll be honest.
But I did get it to work last week by simply just--
by simply just getting the path to the file.
So that one.
So doo, doo, doo, doo, doo.
So let's cancel this.
And there's the file.
And then it's .ht.database.ht.sequelite.
There we go.
And we'll just call it live stream.
Let's test the connection.
That's all good.
And there we go.
There's our database.
Ready to rock and roll.
Connect the database.
There we go.
There are all the tables.
Let's make sure it's the right table.
Let's browse.
Right.
There we go.
Let's have a look at the data.
And there's live stream and my user.
I'm not quite sure why Skillite Studio is having
trouble accessing those files.
Oh, I can drag and drop the file into the application.
Ah, I didn't know that.
OK, let's try that.
Let us disconnect this one and let us remove it.
Yes.
And then let's try this way around.
I'm going to just drag this little screen here.
I'm going to drag it on.
Put it under the database list.
OK, so that does work.
That's kind of cool.
So that's an easier way to do it.
I'm not sure why it's not working with the other way.
I wonder if it's a naming thing.
I'm not sure.
But that is one way to do it as well.
Personally, I prefer the plugin because I've
got it inside of my WordPress site.
I don't do a lot of database changes.
If I do, they're mostly because of custom tables
that I'm working on.
But I like being able to have it in the browser.
I spend most of my time in the browser,
so having another app open for me just doesn't make sense.
Disclaimer, once you're ready to push the site live,
delete the SQL Buddy plugin.
You don't want this plugin on production.
It's going to give people access to your database,
and that's just dangerous.
So don't do it.
You heard it here first.
So that was fun.
That was a whole thing.
We actually jumped straight ahead to database management,
so let's actually move that up in the list.
Let's go on to debugging.
So let's close down some tabs because I
like to have loads of tabs open.
We don't need that.
Debugging.
Can I debug my code in Studio?
And the answer is yes, to a certain degree.
So let me show you what I mean.
I can, just as I can with any other WordPress install,
I can go in, and I can go into the WP config file,
and I can add my custom debug values.
You can set these constants in WP CLI if you know about that.
It's one way to do it.
I tend to go the manual way.
I tend to go inside my config file,
and then I set up my debugging here.
So my chosen way to set up debugging
is set debug to true, debug display to false,
and debug log to true.
And then let's see if this creates a debug log.
So to get that to work, what I'm going to do
is inside of my copyright block plugin,
I'm going to add some code.
So what I'm going to do is I'm going to go add action init,
and I'm going to--
sorry, folks, my main monitor just went off.
That's why I'm looking weirdly at you.
I'm trying to figure out why my monitor went off
and switched it back on.
So I'm going to create--
like, I'm just using the prefix of the current plugin,
and I'm going to register a REST root,
because register REST root should happen on admin init,
not init.
So then I'm going to go function register REST root,
and then I'm going to go find some code to steal
because I can't remember it offhand.
So let's get an example of registering a custom REST
root.
There we go.
Let's just grab this one.
Oh, wait, here we go.
That one's a bit complicated.
Let's get a simpler one.
So we'll call it my plugin slug v2.
We'll say test.
Let's just format this code.
Something went wrong.
Oh, dear.
OK, never mind.
I know why that happened.
It's because I've updated my PHP version recently,
and I haven't had a chance to fix it.
So get method, we'll go callback.
Callback.
Let's just find a bit of callback.
This one, there we go.
OK.
Yeah, I want to change a few things here.
I'm going to call this live stream v1 test method get.
I'll call it create block get test.
If you've never seen registering REST root, don't stress.
Don't expect you to know what's going on here,
but I'll show you how this works in a sec.
So there we go.
And then we'll just need to register--
oh, actually, if we leave out that registration,
it should throw an error as well.
So that's actually cool.
So what I'm trying to do is I'm trying
to create code that will trigger an error, which is what I want.
So now if I refresh my WordPress site,
I shouldn't see any problems there,
but it should have logged an error to the debug log.
So let's see if it's created a debug log file.
Yes, there it is, debug.log.
Yay, errors.
I've never been so happy to see errors before in my life.
Yes, I'm weird that way.
And as you can see, it's telling me
that register REST root was called incorrectly.
REST API roots must be registered on the REST API
on it action.
And that's why I did that on purpose.
So that's lovely.
It's registering errors, so my debugging is working.
So I can code along happily, and I can see my debug log,
and I can see whatever errors happen.
So let's fix this bug.
So it's going to be registered on the REST API in it.
Let us clear out the debug log, and let us refresh the page.
OK, that should have triggered errors if there were errors.
And yay, there were no errors.
We're all good to go.
Our code is happy and jamming.
All right, so that's the standard WP debug options.
They all just work out of the box, as is standard default WordPress
install.
No need to configure or do anything special.
The other thing that I like to use is I like to use xdebug.
Now, I happen to know upfront that xdebug does not work on studio.
So if you use xdebug and it's like a core part of your development
process, I'm afraid studio is not going to work for you.
And I have an open GitHub issue that I
want to share with you to show you what
the discussion is around that.
So the issue is, again, a WordPress playground related
issue.
And you'll see there, it would be nice to have xdebug.
So there is some work happening on that.
Essentially, what needs to happen is the playground build
needs to have xdebug installed on it so that xdebug can run.
And so it's something that is being worked on.
It's a similar issue as the Windows file permissions issue.
So I'm hoping that it gets fixed soon and we can have it in studio.
But unfortunately, currently, it is not supported.
However, there is a debugging tool called Ray.
Now, Ray is actually developed by a Laravel focus company.
Laravel is a PHP framework that some developers use
to create custom applications.
That having been said, Ray also has a WordPress plugin.
So you should be able to install--
ooh, plugins got updated.
[LAUGHS]
That's cool.
It's got a new look and feel.
Wow, that must have just happened while we were busy
doing this livestream.
So if you search for Ray in the plugin directory,
you'll see Ray is there.
It hasn't been tested in the last few versions.
It doesn't need to.
It does still work.
And basically, once you've got the plugin installed,
you can call this Ray command, install the Ray app,
and then you can see the debugging happening on your Ray app.
So I think I've got Ray installed.
Yes, I do have Ray installed.
I'm pretty sure that it works on all versions of--
all versions of all operating systems.
I'm pretty sure it's cross-platform available.
I don't think it doesn't.
There is-- OK, let's restart Ray for the new version.
I haven't used it in a while.
So I think it does work on Windows.
Yeah, there we go.
Desktop app for Mac, Windows, and Linux.
There is a trial mode that you can use.
Trial mode basically logs the last 10 Ray calls.
So you can have Ray calls all over the place,
but let me do the last 10.
So it's perfect if you're just going to use Ray
in very simple environments.
What I don't know is whether Ray is just
going to work in Playground.
So let's find out.
So let's go to Plugins, and let's go and add a new plugin.
Let's install Ray.
Search for Ray at least.
Let's install it.
And activate it.
OK, so Ray doesn't have any configurations or settings
as far as I'm aware of.
Yeah, we should just theoretically
be able to use Ray as is.
So I'm going to open up Studio, and I'm going to go over here,
and I'm just going to-- in this code,
I'm just going to--
I'll do it inside another init hook.
So let's create another hook.
Let's just say init, and let's say create block test.
Ray.
And then let's create that function.
And let's call Ray, and then let's say testing Ray.
It doesn't have to be more complicated than that.
OK, so let's see if it comes up.
There has been a critical error on your website.
Let's check the debug log.
Call to undefined function Ray_curl_init.
OK, so Ray doesn't work because Ray needs curl installed.
I seem to recall--
I seem to recall in the Studio blog post,
there was something about curl.
And have a look.
So there is the GitHub repository,
because it is open source.
So let me just check here.
I think there was an issue logged with curl.
Yes, add support for recommended PHP modules,
things like curl xfimagic blah, blah, blah.
So there has been conversation around that.
So there's the xdebug one.
There's the PHP feature parity.
So there's definitely conversations happening
around those things.
But unfortunately, that means that Ray
is not possible to use either.
So you are limited to using the built-in WordPress debugging
options.
That's, for me, personally one of the things
that I don't like about Studio.
When I am debugging a bug in someone else's code,
I like to have xdebug installed.
So if you have an xdebug-enabled environment
and you're thinking of switching to Studio,
you're not going to have xdebug, unfortunately.
But so far, I want to be--
let's be perfectly honest here.
So far, xdebug is the only thing really that we haven't--
let's make it--
we'll strike through.
xdebug doesn't work.
Let's add the Windows issue, Windows files.
That's one thing that doesn't work that somebody has shared.
I hate the fact that strike through is hidden.
Anyway, but so far, everything else works.
What hasn't worked?
No, everything else has worked so far.
Cool.
Not bad.
Two out of one, two, three, four, five, six, seven, eight,
so far.
OK.
I'm going to jiggle things around a little bit
because I'm not going to spend too much time on pushing
to production.
We'll talk about it in a second.
Let's try and enable multi-site.
Let's see if that works.
I'm quite keen to do that.
So enabling multi-site.
If we have a look--
I'll fix that site later.
I'm going to create a new one-site for it now anyway.
If we have a look at WordPress multi-site,
creating a WordPress multi-site with an existing site
is essentially making sure that Pretty Permalinks works,
editing WP config, and you're good to go.
So let's see if we can do that.
So let us-- I'm going to delete this site.
Delete all the files.
I don't need it anymore.
And let's create a new multi-site.
So we'll just call it multi-site.
Let's call it studio multi-site.
I don't really care too much about the path, so that's fine.
And let's create that site.
Let's see if I can have a super coffee before it's finished.
I literally can't.
I literally have to click Create Site and grab my coffee,
and I can have my super coffee before it finishes.
So now we've done that.
We need to verify that Pretty Permalinks work.
So let us open the Site Admin and let us--
where are we now?
Let's go to Settings.
Let's go to Permalinks.
Let's just make it something simple, like post name,
and save those changes.
Let's check that that works by going to the Hello World post
and viewing it.
There we go.
Hello World works.
It has this index.php thing at the end,
but Hello World does work, so that's fine.
It's interesting.
If I remember correctly, I think WP now
didn't use the index.php.
So I'm not sure why Studio does, but it's not a huge train
system.
It's a train ladder, a train smash for me.
So Permalinks works.
So let's go and define WP Alarm Multisite to true,
and let's see what happens.
So let's open it up in VS Code.
I'm going to close down Livestream.
And let's go into the config.
And let's enable multisite.
And then let's see if it should create a network setup.
You cannot install a network of sites with a port number setup.
OK, that is expected.
Didn't know about that, but that kind of makes sense.
So that's one more it doesn't support.
I don't know how important that might be for folks.
I personally have not done a lot of multisite development.
If I have had to set up a version of the customer's site
as a multisite in my local environment,
so that would be something that I would
need to use something else.
So that's interesting.
That might get back to my desire to have nicer domain names.
So that's interesting.
I'm not going to log this, because currently right now
for me, this is not a requirement.
But if you belong to the studio team
and you're watching this, maybe something to look into.
I don't know.
I don't know how important this is.
But unfortunately, it doesn't work.
And that's OK.
It doesn't have to work out of the box every day.
Everything have to work.
All right, then let's talk about pushing to production.
Now, essentially, because you can export the database,
either using SQLite Studio or that command
that I showed you, or any one of those number of ways,
you can just do it the old fashioned way.
You can FTP your files up.
You can FTP your MySQL data app, and you're good to go.
However, I'm sure many, many folks
have different ways they want to be able to do these things.
One way that I like to push a site to production, especially
if it's a brand new site, is I install one of the free site
duplicator packaging plugins.
And one that I've used quite a bit
is a plugin called Duplicator.
So Duplicator is a plugin that allows you to create
a package of your current site.
So I'm going to install it now, and I'm going to see if it works.
I'm not going to try all of these plugins, like WP staging,
and WP migrate DB, and all of those.
If you do use those, I would like to ask you to try them out.
And then if they don't work, either feed them back
to your team or somehow feed that data back.
Because there are many different ways
to push sites to production.
I can't cover them all today, but I'm
going to try Duplicator and see if that works.
That's active.
So let's go into--
I think it's in Tools.
Here we go.
Create your first package so the thing comes up.
So let's create a package.
Let's see.
OK.
So this seems to not be working.
I wonder if this is a case of Duplicator
needing to support SQLite.
That might be the case.
But currently, this one doesn't work.
So if you want to try this out, test it out for yourself.
For me, this isn't a huge train smash, I'll be honest.
Because I generally just go the old school route anyway.
I export the MySQL files, or at least the MySQL database dump.
I zip all the files up, and then I push to production that way.
So not a huge train smash for me, but worth testing
if you're thinking about using Studio
and you want to use any one of these types of plugins.
So this one, I'm not going to say it can't do it.
I'm going to say with some caveats.
With some caveats.
Cool.
So that's kind of everything that I want to test out today.
And thank you for the ideas and the things
that you came through and shared and issues
that you've had with WPNow.
I wanted to show you, before we wrap up,
some of the specifically WordPress.com related things
that this can do.
I hope this works without sharing my password,
but I'm basically going to log into my WordPress.com account
now.
So it should just authorize, because I
should be logged in already, which is great I am.
And once it's authorized, what I can do now is I can--
come on, open Studio app, there we go.
I can share this site.
So if I click on the Share tab, I
can share a demo version of the site.
Share host to clone to the local site.
Push updates to the demo at any time,
and demo sites are deleted after seven days.
So if I click Add Demo Site, it basically
takes my local version of the site,
and it pushes it up to a demo URL on the WordPress.com hosting
environment.
It does take some time.
It's got to obviously create the site, provision the environment,
push the files up, push the data up.
But if you already have a WordPress.com account,
this is a great way to share these sites with your customers
as you're building them out.
It's a great way to create demo sites for theme developers,
or whatever the case may be.
They are deleted after seven days,
so if you want to have it something that is alive all
the time, you will need to keep updating it.
Maybe once every five days, make a change and push it,
or just push the update, or whatever the case may be.
But let's just let this finish, and we'll
see what this looks like.
Still creating.
It's almost there.
Well, I have time to have a super copy before it finishes.
Apparently, I will.
OK, and then there's your link.
So you can click on the link.
You can share it with whoever.
So there is the copy of my demo site.
Studio multi-site, there it is.
I wasn't able to obviously convert it, but there it is.
And then I can continue.
If I make changes to the site, I can click Update.
It'll update the changes.
When I'm done with the site, I can delete the site.
But this is a very quick and cool way to quickly demo
the site you're building for your client,
or whatever the case may be.
Let them check it out.
They can and should be able to log in with the same usernames
and passwords that you've created.
I don't think I have the username and password
that I created for my other user.
So that's going to be tricky.
I wonder-- let's do this.
Let's go into the site.
What was it called?
It was called multi-site.
Oh, wait.
This is multi-site.
So I still have the original admin password.
So that should work.
Yes.
That doesn't work.
Let's see what the password is for this job.
Settings.
OK, so it's admin, and that's the password.
I thought it was just password, but I guess it isn't.
Ah, there we go.
So that user works.
So you can create a user for your customer,
or just share the admin user with them
if it's a testing environment.
They can log in.
It does say it will be deleted from seven days.
But we should see our network set up.
There it is with-- now, this should work,
because I'm not using a port for the site.
So I could set up the multi-site here
and test it with a client that way.
I wouldn't maybe do that, but that should work.
But my settings are all there.
Any content that I've created will have been pushed up.
So that's one of the cool sort of--
let's call it pro features of this app.
It does require a free--
it is a free WordPress.com account.
But disclaimer, yes, I do work for automatic.
Automatic does own WordPress.com.
It is the version of hosting that Automatic owns that
is separate from the open source project.
But it's a great way to share demo sites with folks.
And then when you're ready, you can delete it.
And it will then delete the site,
and then it is cleared out, and you
never have to worry about it again.
And that is it.
That is all of the things that are available to you in Studio.
If you're looking for a very quick way
to set up a local environment, to test out some things,
to build a theme, to build a plugin,
to do a very quick site build for a customer,
if you don't already have one that you're tied to,
I recommend checking it out.
As I say, currently available on Mac,
Windows version's coming soon.
There is a way to build it for Linux,
and I think they're working on a Linux build as well.
But please do give it a try out and share all your feedback.
As you may have noticed in the Studio,
so the Studio GitHub link is on the home page of the Studio
blog, and you will see that folks have put all kinds
of feature requests through whether they will happen
or not is another story.
That's up to the development team behind it.
But I like the fact that it is open source, which
means I could, if I wanted to, fork Studio and add
any features that I want.
What I've also suggested is maybe
to create some kind of extensions, a way
that I could develop my own extensions,
and then I could develop extensions
that support what I specifically want for my setup of Studio.
So that might be interesting.
So if you do have any feedback, feel free to share it
with the team.
I can't guarantee that I will implement it,
because really it's up to the development team behind Studio
to decide what they're going to add and whatnot.
Like any open source project, you can't expect them to add
what you want necessarily.
But if you do find bugs in the current feature set,
please do share it with them so that they can improve it.
You'll see there's the upload media one that T. Hamano
shared with us earlier.
So do check that out and try it out.
Give it a bash.
It is currently going to become my new favorite way of setting
up local sites for my work, for my live streams,
for my workshops, for my educational content,
because it's just really, really quick,
and I really, really like that.
So yeah, that's Studio.
My very fast, very rambly, very excitable overview.
I do encourage you to give that a check out
and just have it as another tool in your tool belt.
If you are happy with your current local environment,
that's perfectly fine.
But give it a bash and see what you think.
All right.
That is me for today, folks.
I know we set aside an hour and a half for these things,
but I sometimes don't always use the full hour and a half.
I'm going to call it a day.
I'm probably not going to be around for another live stream
until at least two weeks from now.
So probably around about the 14th of May in two weeks' time.
We'll probably be in my another live stream.
I have invited Ari to join me for that live stream
so that we can discuss something that he was experiencing
contributing to WordPress.
I'm still waiting to hear back from him.
So Ari, if you're watching, get in touch with me, man.
I'd really love to have that conversation with you
and invite you on the stream
because there were some interesting comments
that you raised that I'd love to dive into.
Otherwise, for everybody else,
for those in the chat who are saying,
"Thank you, awesome talk.
I appreciate your time.
Thank you for joining me.
If I was so rambling and running fast, I do apologize.
As I say, I do get excited-able."
That's the wrong word.
Excitable is the right word.
But I hope that you've enjoyed the session
and I will see you in a roughly two weeks' time.
Keep an eye out.
Good grief.
Keep an eye out on the Learn WordPress Online Workshop.
So I always try and post my live streams
the week before I'm gonna have it.
So sign up for updates there
and you'll know when that's coming.
But otherwise, enjoy the rest of your week.
Enjoy the rest of your day and your week
and whatever's happening.
And I'll see you when I see you.
Bye.
[BLANK_AUDIO]