{"id":15024194,"url":"https://github.com/codesvault/wp-seeder","last_synced_at":"2026-01-04T15:12:08.584Z","repository":{"id":65208719,"uuid":"586465978","full_name":"CodesVault/wp-seeder","owner":"CodesVault","description":"Database seeder for WordPress","archived":false,"fork":false,"pushed_at":"2023-06-16T21:06:05.000Z","size":58845,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T17:03:33.539Z","etag":null,"topics":["database","mysql","mysql-database","seeder","seeders","wordpress","wordpress-php-library"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/codesvault/wp-seeder","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodesVault.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-08T08:34:42.000Z","updated_at":"2024-10-05T14:13:37.000Z","dependencies_parsed_at":"2023-01-15T15:00:54.448Z","dependency_job_id":null,"html_url":"https://github.com/CodesVault/wp-seeder","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodesVault%2Fwp-seeder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodesVault%2Fwp-seeder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodesVault%2Fwp-seeder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodesVault%2Fwp-seeder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodesVault","download_url":"https://codeload.github.com/CodesVault/wp-seeder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529764,"owners_count":21119576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","mysql","mysql-database","seeder","seeders","wordpress","wordpress-php-library"],"created_at":"2024-09-24T19:59:55.572Z","updated_at":"2026-01-04T15:12:08.579Z","avatar_url":"https://github.com/CodesVault.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WP Seeder\nAdd demo data in the Database from terminal.\n\n## Installation\nIt is required to install it using composer `composer install codesvault/wp-seeder`.\n\u003cbr\u003eIt supports PHP **\u003e= 7.4**\n\n\u003cbr\u003e\n\n\u003c!-- ![WP Seeder Demo](https://github.com/CodesVault/wp-seeder/blob/doc/demo/WP%20Seeder%20-%20Demo.gif) --\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## Uses\nTo create a new seeder, run `./vendor/bin/wpseed new` and provide necessary inputs.\n\u003cbr\u003eIt will generate `/seeders` directory in `/database` directory. Don't move this directory to other location, it must be here.\nIn the `/database/seeders` folder you will have your seeder which was automatically generated, the file name will be same as the class name that you had given input.\n\n\u003cbr\u003e\n\nNow change the `$table` property according to your table name where you want to store data. `$row` property is for number of rows you want to generate in the table. For generating demo data WP Seeder has build-in support of [FakerPHP](https://fakerphp.github.io/).\n\n```php\nclass yourClassName extends WPSeeder\n{\n    public $table = \"cv_users\";    // db table name without prefix, default is posts.\n    public $row = 5;      // number of db table row will create, default is 1.\n\n    public function run()\n    {\n        // add data that need to be inserted in database.\n        // array key is the column name, value is data that will be stored.\n        return array(\n            'name' =\u003e $this-\u003efaker()-\u003eunique()-\u003ename(),\n            'email' =\u003e $this-\u003efaker()-\u003eunique()-\u003eemail(),\n            'password' =\u003e $this-\u003efaker()-\u003eunique()-\u003epassword()\n        );\n    }\n}\n```\n\n\u003cbr\u003e\n\nIf you want to create more seeders for different tables then just repeate the above process.\n\u003cbr\u003eNow just run `./vendor/bin/wpseed store` in the terminal and data will be stored in the database.\n\n\u003cbr\u003e\n.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesvault%2Fwp-seeder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesvault%2Fwp-seeder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesvault%2Fwp-seeder/lists"}