I have just deployed the WordPress application on my Kubernetes cluster following the instructions from https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/
Now I would like to populate the WordPress database with a lot of posts for testing purposes. I do not really care about the content of these posts. As far as I am concerned they can be completely random. All I care that there are a lot of them.
Is there a way to do it?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
As I can see you are using Kubernetes. There are few routes you could go.
- REST API: Write a light script (nodejs or php) that creates fake data and sends to rest route to create posts. You can then use cron hit rest route for creating posts.
- Plugin: Check Fakerpress plugin, I haven’t used it but it looks like something you can use.
Method 2
There is official test data available here:
https://codex.wordpress.org/Theme_Unit_Test
It’s an XML file that you can import from Tools > Import and imports a variety of posts, pages, and menus for the purpose of testing themes.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0