Existing website
Fetch the products and collections of an existing shop into YAML under .castor/import/var/{project-slug}/, then turn
them into Sylius fixtures.
Fetch the website
Section titled “Fetch the website”castor sylius:import:existing:fetch https://shop.example.com --project=example| Option | Description |
|---|---|
url | URL of the website (normalized to its base URL) |
--project | Project slug (asked, or derived from the name, when omitted) |
--name | Shop name |
--description | Shop description |
The command discovers the sitemap (from robots.txt, with dedicated handling for Shopify and Magento), picks the
product and collection pages, and uses the AI configured in the prerequisites to extract the
collections.
The project is configured for an existing website import, so later commands reuse its URL.
You can also prepare the YAML yourself, without fetching a website.
Generate and load the fixtures
Section titled “Generate and load the fixtures”castor sylius:import:fixtures:generate --project=example --limit=100castor sylius:import:fixtures:load --project=exampleSee Fixtures for the options of these commands.
Push the fetched data to a server
Section titled “Push the fetched data to a server”To load the fixtures on a remote server without fetching the website from it, copy the import data of a project over SSH with rsync:
castor sylius:import:var:push --project=example --dry-run # show what would be copiedcastor sylius:import:var:push --project=example # copy itcastor sylius:import:var:push --project=example --delete # also delete remote files missing locallyConfigure the server in .castor/.env.local:
| Variable | Default | Description |
|---|---|---|
IMPORT_VAR_PUSH_SSH_HOST | — | SSH host (required) |
IMPORT_VAR_PUSH_REMOTE_DIR | — | Root of the remote project (required) |
IMPORT_VAR_PUSH_SSH_USER | debian | SSH user |
IMPORT_VAR_PUSH_SSH_PORT | 22 | SSH port |
IMPORT_VAR_PUSH_IDENTITY_FILE | SSH default key | Private key (~/ is expanded) |