Search code examples
pythondjangoheroku

how to change herkou region from us to eu of a pre deployed app withou lossing any app data


i have pre deployed app on heroku but b default it region is us and i am from india so my load time is very much then expected so i want to change region to eu which exactly half of distance from us so my load time will improved

i also tried the documentation https://devcenter.heroku.com/articles/app-migration but i falied to migrate if someone did it before please guide me step by step it would be very helpful for me and other future reader

thank you for your time

i know a similar question asked before but there also refering to documentation which i tried so i am looking for step by step guide


Solution

  • here is step by step guide oh how to do it for changing heroku region from us to eu you cannot do it from setting so there is no such option provided b heroku fo changing app region from us to eu do in oder to din that you have to create a app for eu region like that

    heroku create <appname> --region eu
    

    but if you want to same name change name of your app and create a new app with same name here is the documentation https://devcenter.heroku.com/articles/renaming-apps

    when you done with the name you have to install a heroku fork plugin

    heroku plugins:install heroku-fork
    

    then for forkin you your existing us app to you new eu region app

    heroku fork --from sourceapp --to targetapp --region eu
    

    but before forking please enable maintaince mode on your existing app then do forking

    after forking for migrating your previous app data follow this article step https://devcenter.heroku.com/articles/app-migration#database-preparation

    then delete your previous app

    heroku apps:destroy
    

    if you are using custom domain then manage you dns acc to that