Download a WordPress Site with wget

WordPress URLs often create messy files like index.html?p=1759. Use this command for a clean offline copy:

wget -m -p -k -np -l 2 --adjust-extension --restrict-file-names=windows https://example.com

Flags explained:

  • -m mirror mode
  • -p requisites (images, CSS, JS)
  • -k convert links
  • -np no parent
  • -l 2 limit depth
  • --adjust-extension add .html
  • --restrict-file-names=windows clean filenames

✅ Result: a browsable offline WordPress site without messy filenames.

Leave a Reply