Local WordPress with Herd, DBngin, and WP-CLI

Local WordPress development made easy with Laravel Herd and DBngin. We’ll use wp-cli to download, install, and manage a local WordPress environment in just a few minutes.

Relevant Links

  • https://herd.laravel.com/
  • https://dbngin.com/
  • https://developer.wordpress.org/cli/commands/

Full Transcript

AI-Generated and unedited as of yet

Okay, so recently I’ve been messing around with Larival Herd, which is a tool for kind of local PHP development.

It’s kind of a whole PHP local environment.

It does a lot of great things like just kind of spins up servers like in a PHP environment on your Mac really quick.

I don’t think they have Windows yet, so that’s just a little caveat there.

What it’s nice is that it just used to be really hard to do all these sorts of things and Herd makes it pretty easy.

And even though it’s built for the Larival world, it’s really great for WordPress.

A lot of WordPress developers I know are sort of moving to using it for their local environment because it just feels really fast.

It feels really clean and easy.

It’s just so much simpler than like spinning up Docker or these other tools, which are all great, but just, you know, this one’s pretty simple.

I’m using the free version.

There is a pro version.

I’ll scroll down and just find some of their pro features like like a mail hog type thing where it catches emails coming out of your local sites, X debug, debug logs, all those sort of stuff.

The pro features look really great.

I’m probably going to update at some point in time, but for now, even just the free version to play around with, I really recommend.

So we’re going to use that to build PHP.

And then we’re going to use DB engine, which is a free tool for very quickly getting like databases running.

It comes from table plus.

So if you’re doing any local development, whether you’re using, you know, local WP or Docker or anything, you’re probably using table plus at this point in time because it’s kind of the best tool.

So DB engine just comes from the people behind table press and it’s literally just a simple little app to turn on a MySQL like service and just have it running.

So, you know, back in the day, you would use a tool like you’d use, maybe just do all command line stuff or use a tool like a map that would, you know, give you that lamp stack and give you the, the server, give you the PHP, give you the database, all that stuff.

It’s kind of funny that we’ve gone to all in one tools like local WP, but if you kind of want to diversify your skill set a little bit, it’s nicer to, you know, play with some of these other ones.

So, Laravel, Herd and DB engine, two free apps download them and install them.

And then the third thing I’m going to use is WPC li, which if you’re not using, you’re definitely missing out.

It’s really the power users tool for WordPress.

And I have some other videos about that.

So you can definitely check those out.

So let’s get started.

So this is Laravel, Herd.

Right now there’s no sites.

What you basically do is you point it at a directory on your computer.

I have a couple of different directories or have local sites, but I cleaned all that out.

And right now it’s just pointing to an empty folder on my computer.

But as you start adding websites or repos or something into that folder, you’ll see them show up here.

And that’s what’s going to happen.

And the second thing we need is we need DB engine turned on.

And we just have to make sure that we start up a MySQL service so that it’s running, make sure the green lights turned on.

So you’re going to have those apps installed, have them turned on, have MySQL running.

So you got your PHP, your server and your MySQL, all kind of happening right here.

So now I need to make a site.

I’m going to do it all through the command line.

I’m not going to use any graphics.

I’m just going to like straight up in the command line.

I’m going to get us in, let’s see how fast we can do it to get to a new WordPress website.

And it’s going to be running basically WordPress, the latest beta version.

And we could use it for local development or testing or something like that.

Okay.

So here’s my terminal.

I’m open to this demos folder.

This is the folder where I’m going to be making websites.

I’m going to make a new directory.

We’re going to call it example.

This might be the directory that your website’s going to be in or it might be a repo that you pull down and you want to do this with an existing WordPress installation, but I’m going to jump into that example directory.

And what happens in herd is typically if I, if I refresh the list, so you’ll see here, herd has refreshed and now it’s showing example.test, which means any top level folder in my demos folder.

Now it comes a website.

And they add dot test as the domain.

And then I can also click this lock here and get like a sort of fake SSL certificate on it.

But as you can see, I didn’t put anything in the folder.

So it’s just a big four or four error, but we’re going to do it.

So first thing we’re going to do is in our example folder, we’re just going to run WP core download.

And what that’s actually going to do is it’s going to run the download of WordPress core.

That was really fast, faster than I thought it was going to be.

So what I’m going to do is we’re going to open up example.test.

And you’ll see here, we’re getting that setup installation screen.

Now if I try to go through with this, it’s actually not going to work because we set up a database.

We don’t have a WP config file.

There’s a few things we need to do, but you can see we already have WordPress kind of locally running in that folder just by downloading it.

So the first thing we’re going to do is we’re going to do a WP config create.

So we’re going to create a WP config file.

We have to pass it a bunch of variables and things like that because the defaults aren’t what we want.

So first we need a name for our database tape or our database.

I’m going to call it demo example.

It doesn’t really matter.

We need a user for DB Engine.

For DB Engine, I’ve seen that root is the typical user.

We’re going to pass it a DB pass and that’s typically nothing.

It’s an empty string.

So I’m going to pass it some quotes like that.

We need the host.

Where is it?

So by default, WP config usually looks at local host, but this one is actually going to be on the local IP address.

So that’s our host.

Yeah.

So we’re going to create a WP config file.

And what’s nice about this is in the future, you can point at different databases.

You can have different local environments, things like that.

Okay.

So we have our WP config file has been created.

Now the next step would be let’s run this, make sure it doesn’t freak out.

So WP config already exists.

You don’t need any of the rest of the config in this.

So you can try installing now.

But you can see here, our database that we’ve started in doesn’t work.

So we’re going to get all of that stuff set up.

So now that we’ve created our, we’ve config file, we need to actually create our database.

And again, WPC LI has a WP DB create.

And we just need to pass or we don’t even need to pass it anything because it’s going to look at our WP config file and it’s going to make the database with the name that we already passed it.

Success database created.

So let’s see if it has an issue again.

All right.

So now we’re back to the install.

It’s connected to the database and all those sort of stuff.

Now you can do this whole thing where you pick the language and you like fill out all the credentials and stuff like that.

But again, I’m going to do it with WPC LI.

I find it to be a little bit faster, a little bit easier.

So the command for this one is WPCor install.

So previously we did WPCor download where we brought the files down.

Now we’re going to do like an install and we’re going to actually have it do what you would do back in the old days like a manual process right here.

So we need to pass it a few parameters.

And if you ever want to dig into these parameters more, the WPC LI documentation kind of explains all of the different things.

You can dig deep into the different commands and stuff.

But really if this is something you’re doing a lot, you could probably make a little script or something like that.

I just kind of wanted to show what it actually looks like.

So WPCor install.

First, we’re going to do a URL and we know that Larival Heard is going to call it the folder name dot test.

So we’re just going to pass that example dot test.

A title and we’ll just say example is the title of our site.

And what do we need?

We need an admin user and we’re just going to go really basic here.

We need an admin password.

We’ll just say password.

So admin and password we can log in with.

And it’s going to want an admin email and we’ll just say test at example dot com.

We’re just not a good fake email address.

Probably better ones out there.

And we’re going to pass it the skip email flag, which doesn’t really matter.

But when you create a new user, it’s nice to skip that email in case this is somebody’s real email address, which I don’t think it is.

All right.

So what this is going to do is going to actually run this old five minute install screen, but it’s going to do it through here.

So again, this is stuff that you would eventually if you’re doing this a lot, you would maybe make a little automation for success.

WordPress installed successfully.

Now it’s refreshed this screen.

WordPress is already installed.

So let’s log in and we know we need to log in with admin and password.

I don’t think I typed that right.

And log in and boom, we have a WordPress installation running on Laravel or Herd running on dvengine for our database, which means if I want to explore the database, I can open table plus and look at all my database tables and columns.

I can continue using WPC li to install things so I can do something like WP plugin, install query monitor, my favorite plugin of all time, activate, and it’ll download and install that.

I can do something like WPCore update and update core to the latest beta, which is 6.7 dash beta three.

So that’ll actually move us to the updated WordPress 6.7 that hasn’t come out yet as the time of this release.

And it does that very fast.

It’s like it’s honestly a very fast server.

Feels like super speedy, feels a lot faster than a lot of the kind of legacy plugins.

So let me see.

Let’s refresh that query monitor is now running and we’re running 6.7 beta three and we can click over to the front end and boom.

It’s still running the old theme.

I thought when I updated it, it would be the new theme.

Let’s see.

Did it install the 2025?

There we go.

And you know, I don’t, I don’t not like this.

It’s very simple, but it’s kind of, I don’t know.

I don’t know why I like this as much as I do.

So there you go.

That’s Laravel herd DB engine to free applications.

I think table plus and herd both have pro versions that I think you’ll probably eventually want to get WPC LI, which is just, you know, the developer tool you got to have.

And that gets us a local environment, no Docker, no config files, no messing around with anything, just a handful of commands and you’re up and running.

If you’re using Laravel herd for WordPress development, definitely tell me in the comments, I want to hear what other people are doing.

If there’s other development environments that you’re excited about, let me know in the comments below and like this video and share it if you liked it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.