Skip to content
Available for new work
Pages in Blog

ReferencePremium

CoullWorks Blog for Magento 2 CLI, cron and queue reference

The import command and its options, the Magento commands used with the blog, the cron jobs and the message queue consumer.

Updated 16 November 2026Back to the package pageBuy

bin/magento commands#

bin/magento coullworks:blog:import#

Import a blog from Magefan Blog, Mageplaza Blog, Aheadworks Blog, Mirasvit Blog MX or a WordPress export (WXR) into CoullWorks Blog. Exit codes: 0 done, 1 done with errors, 2 refused or bad input. Prints the job id, status, per-entity counts (created, updated, skipped, failed, warnings, conflicts), 301 redirect counts per page type, the redirect-map path and a pointer to the job log. Runs in the process now (not through cron).

Argument or optionKindWhat it does
source (argument)required argumentThe source, and the only values the help lists: magefan, wordpress, mageplaza, aheadworks, mirasvit. Any other value exits 2 with "is not an import source". amasty is the one exception: the command still recognises the name, creates a job and refuses it with a message that its tables could not be verified, so it exits 2 and the job shows as Refused in the job log. Nothing is imported.
--filevalue optionThe WordPress export file (wordpress only).
--dry-runflag optionRead everything and report, writing nothing but the job log.
--include-pagesflag optionAlso import WordPress pages as posts.
--storevalue optionImport into this store view code only.
--author-mapvalue optionMap WordPress logins to existing authors: login:author_url_key,....
--old-base-urlvalue optionThe address the old posts lived under, for the 301 redirects.
--category-basevalue optionWordPress: the path before a category slug on the old site (default: category).
--tag-basevalue optionWordPress: the path before a tag slug on the old site (default: tag).

Magento commands used with the blog#

CommandWhat it does
bin/magento indexer:reindex coullworks_blog_postFull reindex of the CoullWorks Blog Search indexer; run once after changing Algolia settings or upgrading the module.
bin/magento indexer:set-mode schedule coullworks_blog_postRecommended mode (Update by Schedule); also set the same mode on coullworks_blog_post_category, _tag and _author.
bin/magento queue:consumers:start coullworksBlogAiStepRuns the AI step consumer (MySQL queue topic coullworks_blog.ai.step) instead of waiting for cron.
bin/magento cron:runRuns the module cron group coullworks_blog (publish scheduled, import run, AI queue, AI retention, licence check, image variants).
bin/magento module:enable CoullWorks_Blog / CoullWorks_BlogGraphQlInstall steps from the READMEs (composer require coullworks/module-blog, setup:upgrade, setup:di:compile, setup:static-content:deploy -f, cache:flush).

Cron jobs#

All jobs run in the coullworks_blog cron group.

JobScheduleWhat it does
coullworks_blog_publish_scheduled* * * * *Publishes posts whose status is Scheduled once their Publish At time has passed, and disables posts past their Disable At time (PostScheduler). Class CoullWorks\Blog\Cron\PublishScheduled::execute.
coullworks_blog_import_run* * * * *Runs one queued admin import job at a time (jobs started from Content > CoullWorks Blog > Import). Class CoullWorks\Blog\Cron\RunImport::execute.
coullworks_blog_ai_queue*/5 * * * *Starts queued AI briefs, "Bulk Queue Concurrency" at a time, and stops at the monthly spend cap. Class CoullWorks\Blog\Cron\AiQueue::execute.
coullworks_blog_ai_retention30 3 * * *Clears generated text older than "Keep Generated Text (days)" and keeps the run, tokens, sources and claims. Class CoullWorks\Blog\Cron\AiRetention::execute.
coullworks_blog_license_check17 4 * * *Daily licence check against the licensing server; the answer is cached and signed with the install crypt key. Class CoullWorks\Blog\Cron\LicenseCheck::execute.
coullworks_blog_image_variants40 3 * * *Nightly batch (100 posts at a time) that makes the responsive copies (480, 960 and 1440 px widths, only below the original width) of featured images under media/coullworks_blog/cache, listed in a srcset; the same copies are made when a post is saved. Class CoullWorks\Blog\Cron\GenerateImageVariants::execute.

Cron group settings: The six jobs run in their own group, so Magento's cron:run must be scheduled. Admin notice appears when an AI step has waited more than 10 minutes with no consumer running. Values: schedule_generate_every 1, schedule_ahead_for 4, schedule_lifetime 2, history_cleanup_every 10, history_success_lifetime 60, history_failure_lifetime 600, use_separate_process 0.

Message queue#

Topic coullworks_blog.ai.step on the MySQL (db) connection, queue coullworks_blog_ai_step, consumer coullworksBlogAiStep handled by Model\Ai\Queue\StepConsumer::process. Step names: research, rerun, outline, write, images, refresh.

Available for new work

UK based · PHP · Python · JS · TS. Every first call is free.