1. 17
    Add Fake Data to a WordPress Instance with the Faker Press Plugin
    1m 34s

Add Fake Data to a WordPress Instance with the Faker Press Plugin

Share this video with your friends

Send Tweet
Published 2 years ago
Updated 2 years ago

One of the benefits of Headless CMS is that you can build the frontend (almost) however you would like. For instance, you don't have to create a WordPress site. You can use any new cutting edge technology like React or Vue.

In this lesson, we'll add fake data to our WordPress instance with the Faker Press Plugin. We can easily add new users, posts, custom posts, and comments.

Having fake data provides additional information about how to structure our data in a Headless solution.

Instructor: [0:00] We want to simulate my greeting a blog or website that has been around for a while, who's gathered quite a lot of content. We're going to have a plugin to help us with that.

[0:08] Plugin we're going to use is called FakerPress. I'll install it and activate it. We've got a new menu item called FakerPress here. I'm heading to the top level. I see that for it to erase all my fake data, I just need to type, let it go.

[0:21] It starts with posts at the top, but I'm actually going to start from the bottom. I'm going to create some new users. I'm going to create three new users that would have different roles. Maybe an editor, an author, and they've been generated. Deshawn, Tony.

[0:34] I've got email addresses for them. We've got rules for them. At the moment, I don't have to have anything else for them.

[0:40] Now that we have users, let's go ahead and create some posts. I'm going to create 15 new posts. I'm going to create them from sometime this year. As well as posts, I want to create some shares too. I want all of our authors to be pro along.

[0:56] It's creating them in batches of 15. Now, when I go and visit my chairs, I see I've got lots of chairs, and some of them are scheduled for the future.

[1:04] The last thing I want to add then is comments, so FakerPress again, and comments. I'm going to add comments to my chairs, as well. Again, I'll set them to filter them to comments being in the past year. Let's do 100 comments. If I go and have a look at my site, this is an interesting article that has three comments.

[1:22] Now that I have a larger collection of posts, of different types, and the selection of users, along with more comments. I can look at how to adapt a site like this to serve as a headless CMS.