CLI Import

Version: 1.0.1

CLI Import

Command Line Import

HTML Import Pro includes CLI support for automation and scheduled imports.

Basic Usage
php cli/joomla.php htmlimport:import [options]
Available Options
Option Description
--url URL to import
--sitemap Sitemap URL to parse and import
--file Path to HTML file
--profile Profile ID to use
--category Target category ID
--state Article state (1=published, 0=unpublished)
Example Commands

Import single URL:

php cli/joomla.php htmlimport:import --url="https://example.com/page"

Import from sitemap:

php cli/joomla.php htmlimport:import --sitemap="https://example.com/sitemap.xml"

Import with profile:

php cli/joomla.php htmlimport:import --url="https://example.com" --profile=1
Scheduled Imports

Use cron jobs for automated imports:

# Import from sitemap daily at 2 AM
0 2 * * * cd /path/to/joomla && php cli/joomla.php htmlimport:import --sitemap="https://example.com/sitemap.xml"
CLI Best Practices
  • Test commands manually before scheduling
  • Use profiles to ensure consistent settings
  • Monitor logs for any import issues
  • Set appropriate intervals for sitemap imports