Download the PHP package motivast/wp-cli-seed-command without Composer

On this page you can find all versions of the php package motivast/wp-cli-seed-command. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-cli-seed-command

WP CLI Seed Command

CircleCI

WP CLI Seed Command is an extension for WP-CLI to seed database with sample data.

Why?

Working with advanced WordPress project require to provide test data for other developers or testing scripts. Working with MySQL dumps or exported data has a couple of disadvantages. Data from files like import file or MySQL dump are static you can not quickly scale from 10 random to 100 random posts, also you can not import local media files.

This command-line tools aim to solve these problems. You can write your seeds in PHP which gives you unlimited possibilities.

Installation

You can install WP CLI Seed Command like any other WP-CLI extension

If you want to install WP CLI Seed Command locally you can use composer in your project root directory

Getting started

WP CLI Seed is providing two commands wp seed for seeding database with data and wp scaffold seeder to quickly create new seeders. To create the main seeder the following command.

This command will create a Seeder.php file in the seeds directory with the following content.

Everything inside run method will be executed during seeding database. Inside it you can add any PHP code including WordPress functions. Let's change some WordPress options and add basic pages.

Now you can import your seeds executing following command.

Your WordPress options should change and new pages should be created.

Splitting files

When your project will grow you might want to split seeds into multiple files. Based on the example above you can split this into two files. Create 'Options.php' and 'Pages.php' seeders.

Newlly created seeders have to be included and executed in your main Seeder.php file. Change your already existing Seeder.php to handle new seeders.

Contribute

Please make sure to read the Contribution guide before making a pull request.

Thank you to all the people who already contributed to WP-CLI Seed Command!

License

The project is licensed under the MIT.

Copyright (c) 2019-present, Motivast


All versions of wp-cli-seed-command with dependencies

PHP Build Version
Package Version
Requires wp-cli/wp-cli Version ^2
wp-cli/scaffold-command Version ^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package motivast/wp-cli-seed-command contains the following files

Loading the files please wait ....