Skip to content
Niki Hansche edited this page Jun 21, 2020 · 3 revisions

I would like to contribute how I migrated a blog from self-hosted wordpress to Hugo on S3.

  1. Used the plugin version 1.6 to get the zip file

  2. extracted the zip file in a temp folder

  3. copied the posts directory

    cp -r posts hugo-project/content
    
  4. copied the wp-content directory

    cp -r wp-content hugo-project/static
    
  5. Change the URLs from old domain name to new domain name

    find hugo-project/content -type f -print0 | xargs -0 sed -i -e 's/example.com/example.org/g'
    
  6. Allow inline-html in config.toml

    [markup]
      [markup.goldmark]
        [markup.goldmark.renderer]
          unsafe = true
    
  7. Sync up to S3 with s3cmd

    s3cmd sync --recursive --delete-removed --acl-public hugo-project/public s3://mybucket.example.com
    
Clone this wiki locally