Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expurlimport

Import a URL map (CSV, JSON, .xlsx, .ods, Apache or nginx rules) into the URL translator, the wildcards and the redirects, as one batch that can be undone.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/expurlimport.md

On this page

exp:expurlimport

Import a URL map (CSV, JSON, .xlsx, .ods, Apache or nginx rules) into the URL translator, the wildcards and the redirects, as one batch that can be undone.

Script bin/php/expurlimport.php, code in kernel/private/classes/commands/expurlimport.php. Run it from the installation root, as the user the web server runs as:

./console exp:expurlimport --help
./console exp:url:import --help
php bin/php/expurlimport.php --help

Help text

Import a URL map into the URL translator, the wildcards and the redirects
Reads the file (CSV, JSON, .xlsx, .ods, Apache or nginx rules; the format from its name or content,
or --format), plans every row (new, changed, unchanged, duplicate, conflict, broken target, unknown
host, not importable) and imports the new ones, and the changed ones with --on-conflict=overwrite, as
one batch: exp:url:undo <batch> takes it back. Bare paths belong to the siteaccess of -s (default the
default siteaccess); a full address's host picks the siteaccess, or --host maps an old host to one.

./console exp:url:import old-site.csv --dry-run --report=var/tmp/plan.csv
./console exp:url:import old-site.htaccess -s site --on-conflict=overwrite
./console exp:url:import map.xlsx --host=www.old-site.com=site --output-format=json

Options

OptionValueHelp
--formatrequiredimport: the format of the file (csv, json, xlsx, ods, apache, nginx; default from its name or content); export: the format to write (default from --output, else csv); batches, undo, from-sitemap, from-404, suggest, test: text (default) or json (the machine output exp-url/1)
--languagerequiredimport: the language of rows without one (default the siteaccess's); export: only this language
--on-conflictrequiredWhat happens to an old address that has another entry already: skip (default) or overwrite
--dry-runPlan and check only: list what would be imported, write nothing
--reportrequiredimport: also write the plan, row by row, to this file (.json, or .csv); suggest, test: also write every row with its suggestions or its result to this file (.json, or .csv)
--hostrequiredAn old host and the siteaccess it stands for, old-site.com=site (a comma list or repeated): for full addresses of a host that is not this installation's
--loginrequiredRun as this user (recorded with the import and in the audit)
--output-formatrequiredimport, export: what the command prints, text (default) or json (the machine output exp-url/1); --format is the file's format there; from-sitemap, from-404, suggest: the format of the file written (csv, json, xlsx, ods, apache, nginx; default from --output, else csv)

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).

Arguments: [file].


Generated by ./console exp:help:examples from bin/php/expurlimport.php, kernel/private/classes/commands/expurlimport.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x