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:expurlfromsitemap

Start a URL map from an old site's sitemap (sitemap.xml, a sitemap index, .gz) or a crawl list: every old address as a row to fill in.

Download as PDF

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

On this page

exp:expurlfromsitemap

Start a URL map from an old site's sitemap (sitemap.xml, a sitemap index, .gz) or a crawl list: every old address as a row to fill in.

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

./console exp:expurlfromsitemap --help
./console exp:url:from-sitemap --help
php bin/php/expurlfromsitemap.php --help

Help text

Start a URL map from an old site's sitemap or a crawl list
Reads a sitemap (an address or a file): a <urlset>, a sitemap index with the sitemaps it names, either
gzip-compressed, or a crawl list with one address per line. Writes every old address once as a row
with an empty new_url, in any format exp:url:import reads: fill the targets in (exp:url:suggest helps),
then import. Only the addresses of the sitemap's own host are kept unless --only-host or --any-host.

./console exp:url:from-sitemap https://www.old-site.com/sitemap.xml --output=var/tmp/old-site.csv
./console exp:url:from-sitemap var/tmp/crawl.txt --limit=500 --output=var/tmp/old-site.xlsx
./console exp:url:from-sitemap https://www.old-site.com/sitemap_index.xml --any-host --format=json

Options

OptionValueHelp
--outputrequiredThe file to write (default the standard output; needed for xlsx and ods)
--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)
--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)
--limitrequiredbatches: how many of the last imports to list (default 20); from-sitemap, from-404, test: the most rows (default all)
--only-hostrequiredfrom-sitemap: keep only the addresses of this host (a comma list or repeated; default the host of the sitemap address, or of its first address)
--any-hostfrom-sitemap: keep the addresses of every host
--keep-duplicatesfrom-sitemap: keep an address listed more than once (default: once)
--full-urlsfrom-sitemap: write the old addresses with scheme and host (default: the path and query, as an import on this site needs them)
--timeoutrequiredfrom-sitemap, test: the seconds a request may take (default 15)
--insecurefrom-sitemap, test: do not verify TLS certificates (for test hosts with a self-signed one)

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: [source].


Generated by ./console exp:help:examples from bin/php/expurlfromsitemap.php, kernel/private/classes/commands/expurlfromsitemap.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