RepositoryPHPFRPháp
nlemoine

nlemoine/wp-cli-fixtures

Easily generate custom fake data for WordPress using YAML and WP-CLI

102sao
17fork
3issue
2lượt xem

🎯 Tạo dữ liệu test WordPress nhanh như chơi với wp-cli-fixtures

Dựa trên nelmio/alice + Faker, tạo hàng loạt dữ liệu giả thật chỉ bằng một file YAML.

wp-cli-fixtures là package WP-CLI giúp sinh dữ liệu mẫu (users, posts, terms, comments, attachments...) cho môi trường phát triển WordPress. Cài qua wp package install, rồi định nghĩa dữ liệu trong fixtures.yml.

✨ Điểm nổi bật

  • Tích hợp YAML DSL: dùng cú pháp YAML trực quan để mô tả thực thể và mối quan hệ.
  • Hỗ trợ Faker provider: sinh dữ liệu ngẫu nhiên thực tế như email, tên, ảnh, đoạn văn.
  • Templates & kế thừa: tái sử dụng cấu hình bằng (template) và (extends default).
  • Tham chiếu giữa các thực thể: dùng @entity*->ID để liên kết bài viết, ảnh, term...
  • Tạo media đa dạng: ảnh từ LoremPixel/Picsum, file PDF, ảnh tùy chỉnh.
  • Hỗ trợ ACF: tạo trường ACF bao gồm repeater, gallery, flexible content...
  • Tạo taxonomy tùy chỉnh: category, tag, hoặc taxonomy riêng như place.
  • Chạy qua WP-CLI: dễ tích hợp vào pipeline CI/CD hoặc script độc lập.

💡 Vì sao đáng chú ý

Thay vì viết tay từng bản ghi test, wp-cli-fixtures sinh toàn bộ dữ liệu mẫu chỉ với một file YAML. Phù hợp cho dự án cần test nhanh giao diện, logic hoặc plugin mà chưa có dữ liệu thật.


#WordPress #WPCLI #Fixtures #Faker #OpenSource #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryPHP
wp-cli/wp-cli

⚙️ WP-CLI framework

5.2k
Nov 25, 2026
RepositoryPHP
wp-cli/profile-command

Quickly identify what's slow with WordPress

295
Nov 23, 2026
RepositoryPHP
typisttech/image-optimize-command

Easily optimize images using WP CLI

173
Nov 3, 2026
RepositoryPHP
wp-cli/restful

Unlocking the potential of the WP REST API at the command line

155
Nov 24, 2026
RepositoryPHP
wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

105
Nov 26, 2026
RepositoryPHP
igorhrcek/wp-cli-secure-command

Secure package for WP CLI, built to provide an easier way of securing your WordPress installation

95
Feb 1, 2026
RepositoryPHP
wp-cli/db-command

Performs basic database operations using credentials stored in wp-config.php.

76
Nov 9, 2026
RepositoryPHP
wp-cli/server-command

Launches PHP's built-in web server for a specific WordPress installation.

68
Nov 9, 2026
RepositoryPHP
wp-cli/wp-super-cache-cli

A CLI interface for the WP Super Cache plugin

58
Nov 23, 2026